|
|
@ -276,6 +276,7 @@ public class AnimationFactory { |
|
|
|
// if the delta of euler angles is higher than PI, we create intermediate keyframes
|
|
|
|
// if the delta of euler angles is higher than PI, we create intermediate keyframes
|
|
|
|
// since we are using quaternions and slerp for rotation interpolation, we cannot interpolate over an angle higher than PI
|
|
|
|
// since we are using quaternions and slerp for rotation interpolation, we cannot interpolate over an angle higher than PI
|
|
|
|
int prev = getPreviousKeyFrame(keyFrameIndex, keyFramesRotation); |
|
|
|
int prev = getPreviousKeyFrame(keyFrameIndex, keyFramesRotation); |
|
|
|
|
|
|
|
if (prev != -1) { |
|
|
|
//previous rotation keyframe
|
|
|
|
//previous rotation keyframe
|
|
|
|
Rotation prevRot = keyFramesRotation[prev]; |
|
|
|
Rotation prevRot = keyFramesRotation[prev]; |
|
|
|
//the maximum delta angle (x,y or z)
|
|
|
|
//the maximum delta angle (x,y or z)
|
|
|
@ -303,6 +304,7 @@ public class AnimationFactory { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|