Revision bdb341bc
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/type/DynamicQuat.java | ||
---|---|---|
133 | 133 |
mMode = MODE_LOOP; |
134 | 134 |
mDuration = duration; |
135 | 135 |
mCount = count; |
136 |
mLastPos = -1; |
|
137 |
mAccessMode= ACCESS_RANDOM; |
|
136 | 138 |
mDimension = 4; |
137 | 139 |
} |
138 | 140 |
|
... | ... | |
321 | 323 |
* @param time Time of interpolation. Time=0.0 would return the first Point, Time=0.5 - the last, |
322 | 324 |
* time=1.0 - the first again, and time 0.1 would be 1/5 of the way between the first and the last Points. |
323 | 325 |
*/ |
324 |
public synchronized void interpolate(float[] buffer, int offset, float time)
|
|
326 |
synchronized void interpolate(float[] buffer, int offset, float time) |
|
325 | 327 |
{ |
326 | 328 |
switch(numPoints) |
327 | 329 |
{ |
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.