public class CubicSplineSegment
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) Point3f |
c0 |
(package private) Point3f |
c1 |
(package private) Point3f |
c2 |
(package private) Point3f |
c3 |
(package private) float |
dda |
(package private) float |
ddb |
(package private) float |
dsa |
(package private) float |
dsb |
(package private) Point3f |
e0 |
(package private) Point3f |
e1 |
(package private) Point3f |
e2 |
(package private) Point3f |
e3 |
(package private) TCBKeyFrame[] |
keyFrame |
(package private) float |
length |
(package private) int |
linear |
(package private) static double[] |
modCoeff |
(package private) static double[] |
modRoot |
(package private) float |
one_minus_b_in |
(package private) float |
one_minus_b_out |
(package private) float |
one_minus_c_in |
(package private) float |
one_minus_c_out |
(package private) float |
one_minus_t_in |
(package private) float |
one_minus_t_out |
(package private) float |
one_plus_b_in |
(package private) float |
one_plus_b_out |
(package private) float |
one_plus_c_in |
(package private) float |
one_plus_c_out |
| Constructor and Description |
|---|
CubicSplineSegment()
Default constructor
|
CubicSplineSegment(TCBKeyFrame kf0,
TCBKeyFrame kf1,
TCBKeyFrame kf2,
TCBKeyFrame kf3)
Creates a cubic spline segment between two key frames using the
key frames provided.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
computeCommonCoefficients(TCBKeyFrame kf0,
TCBKeyFrame kf1,
TCBKeyFrame kf2,
TCBKeyFrame kf3) |
private void |
computeHermiteCoefficients(TCBKeyFrame kf0,
TCBKeyFrame kf1,
TCBKeyFrame kf2,
TCBKeyFrame kf3) |
float |
computeLength(float u)
Computes the length of the curve at a given point between
key frames.
|
private float |
computeSpeed(float u) |
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.
|
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.
|
void |
getInterpolatedQuaternion(float u,
Quat4f newQuat)
Computes the interpolated quaternion along the curve at
a given point between key frames.
|
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.
|
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.
|
static final double[] modRoot
static final double[] modCoeff
TCBKeyFrame[] keyFrame
Point3f c0
Point3f c1
Point3f c2
Point3f c3
Point3f e0
Point3f e1
Point3f e2
Point3f e3
float one_minus_t_in
float one_minus_c_in
float one_minus_b_in
float one_plus_c_in
float one_plus_b_in
float ddb
float dda
float one_minus_t_out
float one_minus_c_out
float one_minus_b_out
float one_plus_c_out
float one_plus_b_out
float dsb
float dsa
float length
int linear
CubicSplineSegment()
CubicSplineSegment(TCBKeyFrame kf0, TCBKeyFrame kf1, TCBKeyFrame kf2, TCBKeyFrame kf3)
kf0 - (i - 1)th Key Framekf1 - ith Key Framekf2 - (i + 1)th Key Framekf3 - (i + 2)th Key Frameprivate void computeCommonCoefficients(TCBKeyFrame kf0, TCBKeyFrame kf1, TCBKeyFrame kf2, TCBKeyFrame kf3)
private void computeHermiteCoefficients(TCBKeyFrame kf0, TCBKeyFrame kf1, TCBKeyFrame kf2, TCBKeyFrame kf3)
public float computeLength(float u)
u - specifies the point between keyframes where 0 <= u <= 1.private float computeSpeed(float u)
public void getInterpolatedQuaternion(float u,
Quat4f newQuat)
u - specifies the point between keyframes where 0 <= u <= 1.newQuat - returns the value of the interpolated quaternionpublic void getInterpolatedScale(float u,
Point3f newScale)
u - specifies the point between keyframes where 0 <= u <= 1.newScale - returns the interpolated x,y,z scale value in a Point3fpublic void getInterpolatedPosition(float u,
Point3f newPos)
u - specifies the point between keyframes where 0 <= u <= 1.newPos - returns the interpolated x,y,z position in a Point3fpublic void getInterpolatedPositionVector(float u,
Vector3f newPos)
u - specifies the point between keyframes where 0 <= u <= 1.newPos - returns the interpolated x,y,z position in a Vector3f.public float getInterpolatedValue(float u)
u - specifies the point between keyframes where 0 <= u <= 1.Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.