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