Revision bdb341bc
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/EffectQueueVertex.java | ||
---|---|---|
104 | 104 |
|
105 | 105 |
if( mInter[1][i]!=null ) // region |
106 | 106 |
{ |
107 |
mInter[1][i].interpolateMain(mUniforms, NUM_UNIFORMS*i+8, mCurrentDuration[i]); |
|
107 |
mInter[1][i].interpolateMain(mUniforms, NUM_UNIFORMS*i+8, mCurrentDuration[i], step);
|
|
108 | 108 |
} |
109 | 109 |
|
110 | 110 |
if( mInter[2][i]!=null ) // center |
111 | 111 |
{ |
112 |
mInter[2][i].interpolateMain(mUniforms, NUM_UNIFORMS*i+6, mCurrentDuration[i]); |
|
112 |
mInter[2][i].interpolateMain(mUniforms, NUM_UNIFORMS*i+6, mCurrentDuration[i], step);
|
|
113 | 113 |
|
114 | 114 |
mUniforms[NUM_UNIFORMS*i+6] = mUniforms[NUM_UNIFORMS*i+6]-mObjHalfX; |
115 | 115 |
mUniforms[NUM_UNIFORMS*i+7] =-mUniforms[NUM_UNIFORMS*i+7]+mObjHalfY; |
... | ... | |
194 | 194 |
EffectNames.fillWithUnities(eln.ordinal(), mUniforms, NUM_UNIFORMS*mNumEffects); |
195 | 195 |
|
196 | 196 |
if( data instanceof Dynamic5D) |
197 |
{ |
|
197 | 198 |
mInter[0][mNumEffects] = (Dynamic5D)data; |
199 |
} |
|
198 | 200 |
else if( data instanceof Static5D) |
199 | 201 |
{ |
200 | 202 |
Static5D tmp = (Static5D)data; |
... | ... | |
223 | 225 |
EffectNames.fillWithUnities(eln.ordinal(), mUniforms, NUM_UNIFORMS*mNumEffects); |
224 | 226 |
|
225 | 227 |
if( data instanceof Dynamic3D) |
228 |
{ |
|
226 | 229 |
mInter[0][mNumEffects] = (Dynamic3D)data; |
230 |
} |
|
227 | 231 |
else if( data instanceof Static3D) |
228 | 232 |
{ |
229 | 233 |
Static3D tmp = (Static3D)data; |
... | ... | |
250 | 254 |
EffectNames.fillWithUnities(eln.ordinal(), mUniforms, NUM_UNIFORMS*mNumEffects); |
251 | 255 |
|
252 | 256 |
if( data instanceof Dynamic1D) |
257 |
{ |
|
253 | 258 |
mInter[0][mNumEffects] = (Dynamic1D)data; |
259 |
} |
|
254 | 260 |
else if( data instanceof Static1D) |
255 | 261 |
{ |
256 | 262 |
mInter[0][mNumEffects] = null; |
... | ... | |
273 | 279 |
EffectNames.fillWithUnities(eln.ordinal(), mUniforms, NUM_UNIFORMS*mNumEffects); |
274 | 280 |
|
275 | 281 |
if( data instanceof Dynamic1D) |
282 |
{ |
|
276 | 283 |
mInter[0][mNumEffects] = (Dynamic1D)data; |
284 |
} |
|
277 | 285 |
else if( data instanceof Static1D) |
278 | 286 |
{ |
279 | 287 |
mInter[0][mNumEffects] = null; |
... | ... | |
320 | 328 |
} |
321 | 329 |
|
322 | 330 |
if( center instanceof Dynamic2D) |
331 |
{ |
|
323 | 332 |
mInter[2][mNumEffects] = (Dynamic2D)center; |
333 |
} |
|
324 | 334 |
else if( center instanceof Static2D) |
325 | 335 |
{ |
326 | 336 |
mInter[2][mNumEffects] = null; |
Also available in: Unified diff
Dynamics: Introduce 2 Modes of operation:
- 'random access' mode, where we are able to call a single Dynamic from multiple thread simultaneously.
- 'sequential' mode, which only permits sequential interpolation from one client.
The second mode has an advantage when one needs to change mDuration: it keeps on interpolating smoothly. In the first mode, this is not possible.