| java.lang.Object com.sun.j3d.utils.behaviors.interpolators.KBCubicSplineSegment
KBCubicSplineSegment | public class KBCubicSplineSegment (Code) | | The KBCubicSplineSegment class creates the representation of a
Kochanek-Bartel's (also known as the TCB or Tension-Continuity-Bias
Spline. This class takes 4 key frames as its input (using KBKeyFrame).
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 KBCubicSegmentClass
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, scale, heading
pitch and bank it returns through the getInterpolated* methods.
since: Java3D 1.2 |
Method Summary | |
public float | computeLength(float u) Computes the length of the curve at a given point between
key frames.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. | public float | getInterpolatedBank(float u) Computes the interpolated bank along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. | public float | getInterpolatedHeading(float u) Computes the interpolated heading along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. | public float | getInterpolatedPitch(float u) Computes the interpolated pitch along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. | public void | getInterpolatedPosition(float u, Point3f newPos) Computes the interpolated position along the curve at a given point
between key frames and returns a Point3f with the interpolated
x, y, and z scale components. | public void | getInterpolatedPositionVector(float u, Vector3f newPos) Computes the interpolated position along the curve at a given point
between key frames and returns a Vector3f with the interpolated
x, y, and z scale components. | public void | getInterpolatedScale(float u, Point3f newScale) Computes the interpolated scale along the curve at a given point
between key frames and returns a Point3f with the interpolated
x, y, and z scale components. | public float | getInterpolatedValue(float u) Computes the ratio of the length of the spline from the ith
key frame to the position specified by u to the length of the entire
spline segment from the ith key frame to the (i+1)
th key frame. |
c0c1c2c3 | Point3f c0c1c2c3(Code) | | |
e0e1e2e3 | Point3f e0e1e2e3(Code) | | |
modCoeff | final static double modCoeff(Code) | | |
modRoot | final static double modRoot(Code) | | |
one_minus_b_in | float one_minus_b_in(Code) | | |
one_minus_b_out | float one_minus_b_out(Code) | | |
one_minus_c_in | float one_minus_c_in(Code) | | |
one_minus_c_out | float one_minus_c_out(Code) | | |
one_minus_t_in | float one_minus_t_in(Code) | | |
one_minus_t_out | float one_minus_t_out(Code) | | |
one_plus_b_in | float one_plus_b_in(Code) | | |
one_plus_b_out | float one_plus_b_out(Code) | | |
one_plus_c_in | float one_plus_c_in(Code) | | |
one_plus_c_out | float one_plus_c_out(Code) | | |
KBCubicSplineSegment | KBCubicSplineSegment()(Code) | | |
KBCubicSplineSegment | KBCubicSplineSegment(KBKeyFrame kf0, KBKeyFrame kf1, KBKeyFrame kf2, KBKeyFrame kf3)(Code) | | Creates a cubic spline segment between two key frames using the
key frames provided. If creating a spline between the ith frame and
the (i+1)th frame then send down the (i - 1)th,
ith , (i+1)th and the (i+2)th key
frames.
Parameters: kf0 - (i - 1)th Key Frame Parameters: kf1 - ith Key Frame Parameters: kf2 - (i + 1)th Key Frame Parameters: kf3 - (i + 2)th Key Frame |
computeLength | public float computeLength(float u)(Code) | | Computes the length of the curve at a given point between
key frames.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. |
getInterpolatedBank | public float getInterpolatedBank(float u)(Code) | | Computes the interpolated bank along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. returns the interpolated bank value |
getInterpolatedHeading | public float getInterpolatedHeading(float u)(Code) | | Computes the interpolated heading along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. returns the interpolated heading value |
getInterpolatedPitch | public float getInterpolatedPitch(float u)(Code) | | Computes the interpolated pitch along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. returns the interpolated pitch value |
getInterpolatedPosition | public void getInterpolatedPosition(float u, Point3f newPos)(Code) | | Computes the interpolated position along the curve at a given point
between key frames and returns a Point3f with the interpolated
x, y, and z scale components. This routine uses linear
interpolation if the (i+1)th key frame's linear
value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. Parameters: newPos - returns the interpolated x,y,z position in a Point3f |
getInterpolatedPositionVector | public void getInterpolatedPositionVector(float u, Vector3f newPos)(Code) | | Computes the interpolated position along the curve at a given point
between key frames and returns a Vector3f with the interpolated
x, y, and z scale components. This routine uses linear
interpolation if the (i+1)th key frame's linear
value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. Parameters: newPos - returns the interpolated x,y,z position in a Vector3f. |
getInterpolatedScale | public void getInterpolatedScale(float u, Point3f newScale)(Code) | | Computes the interpolated scale along the curve at a given point
between key frames and returns a Point3f with the interpolated
x, y, and z scale components. This routine uses linear
interpolation if the (i+1)th key frame's linear
value is equal to 1.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. Parameters: newScale - returns the interpolated x,y,z scale value in a Point3f |
getInterpolatedValue | public float getInterpolatedValue(float u)(Code) | | Computes the ratio of the length of the spline from the ith
key frame to the position specified by u to the length of the entire
spline segment from the ith key frame to the (i+1)
th key frame. When the (i+1)th key frame's linear
value is equal to 1, this is meaninful otherwise it should return u.
Parameters: u - specifies the point between keyframes where 0 <= u <= 1. the interpolated ratio |
|
|