com.sun.j3d.utils.behaviors.interpolators
Class CubicSplineSegment
java.lang.Object
|
+--com.sun.j3d.utils.behaviors.interpolators.CubicSplineSegment
- public class CubicSplineSegment
- extends java.lang.Object
The CubicSplineSegment class creates the representation of a
TCB (Kochanek-Bartels Spline). This class takes 4 key frames as
its input (using TCBKeyFrame). If interpolating between the ith
and (i+1)th key frame then the four key frames that need to
be specified are the (i-1)th, ith, (i+1)th
and (i+2)th keyframes in order. The CubicSegmentClass
then pre-computes the hermite interpolation basis coefficients if the
(i+1)th frame has the linear flag set to zero. These are used to
calculate the interpolated position, scale and quaternions when they
requested by the user using the getInterpolated* methods. If the the
(i+1)th frame's linear flag is set to 1 then the class uses
linear interpolation to calculate the interpolated position, sccale and
quaternions it returns through the getInterpolated* methods.
- Since:
- Java3D 1.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
computeLength
public float computeLength(float u)
getInterpolatedQuaternion
public void getInterpolatedQuaternion(float u,
Quat4f newQuat)
getInterpolatedScale
public void getInterpolatedScale(float u,
Point3f newScale)
getInterpolatedPosition
public void getInterpolatedPosition(float u,
Point3f newPos)
getInterpolatedPositionVector
public void getInterpolatedPositionVector(float u,
Vector3f newPos)
getInterpolatedValue
public float getInterpolatedValue(float u)