public class CubicSplineCurve
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private CubicSplineSegment[] |
cubicSplineSegment |
int |
numSegments |
private float |
totalCurveLength |
| Constructor and Description |
|---|
CubicSplineCurve()
Default constructor
|
CubicSplineCurve(CubicSplineSegment[] s)
This method takes a list of spline segments creates the
CubicSplineCurve.
|
CubicSplineCurve(TCBKeyFrame[] keys)
This method takes a list of key frames and creates spline segments
from it.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
computeTotalCurveLength() |
CubicSplineSegment |
getSegment(int index)
This method returns the CubicSplineSegments pointed to by index
|
float |
getTotalCurveLength()
This method returns the total length of the entire CubicSplineCurve
motion path.
|
void |
setSegments(CubicSplineSegment[] s)
This method takes a list of spline segments to replace the existing
set of CubicSplineSegments that comprise the current CubicSplineCurve
motion path.
|
private float totalCurveLength
private CubicSplineSegment[] cubicSplineSegment
public int numSegments
CubicSplineCurve()
CubicSplineCurve(TCBKeyFrame[] keys)
keys - the list of key frames that specify the motion pathCubicSplineCurve(CubicSplineSegment[] s)
the - list of segments that comprise the complete motion pathpublic void setSegments(CubicSplineSegment[] s)
s - the list of segments that comprise the complete motion pathpublic CubicSplineSegment getSegment(int index)
index - the index of the CubicSplineSegment requiredprivate void computeTotalCurveLength()
public float getTotalCurveLength()
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.