Revision 3ac42a4c
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/type/Dynamic.java | ||
---|---|---|
193 | 193 |
old = new float[mDimension]; |
194 | 194 |
} |
195 | 195 |
|
196 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
197 |
|
|
198 |
void initDynamic() |
|
199 |
{ |
|
200 |
mStartTime = -1; |
|
201 |
mCorrectedTime = 0; |
|
202 |
} |
|
203 |
|
|
196 | 204 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
197 | 205 |
|
198 | 206 |
public static void onPause() |
src/main/java/org/distorted/library/type/DynamicQuat.java | ||
---|---|---|
36 | 36 |
|
37 | 37 |
public class DynamicQuat extends Dynamic implements Data4D |
38 | 38 |
{ |
39 |
|
|
39 |
|
|
40 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 41 |
// Here we implement our own Cache as we need something slightly different. |
42 | 42 |
// omega, sinOmega, cosOmega - angle between pair of quaternions, its sinus and cosinus. |
... | ... | |
130 | 130 |
mDuration = duration; |
131 | 131 |
mCount = count; |
132 | 132 |
mLastPos = -1; |
133 |
mAccessType = ACCESS_TYPE_RANDOM;
|
|
133 |
mAccessType= ACCESS_TYPE_RANDOM; |
|
134 | 134 |
mDimension = 4; |
135 |
mSegment = -1; |
|
136 |
|
|
137 |
initDynamic(); |
|
135 | 138 |
} |
136 | 139 |
|
137 | 140 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
324 | 327 |
* {@link Dynamic#MODE_LOOP}, {@link Dynamic#MODE_PATH} or {@link Dynamic#MODE_JUMP}. |
325 | 328 |
**/ |
326 | 329 |
synchronized void interpolate(float[] buffer, int offset, float time) |
327 |
{
|
|
330 |
{ |
|
328 | 331 |
switch(numPoints) |
329 | 332 |
{ |
330 | 333 |
case 0: buffer[offset ] = 0.0f; |
Also available in: Unified diff
Properly initialize DynamicQuat.