com.sun.j3d.utils.behaviors.interpolators
Class KBSplinePathInterpolator
java.lang.Object
|
+--javax.media.j3d.SceneGraphObject
|
+--javax.media.j3d.Node
|
+--javax.media.j3d.Leaf
|
+--javax.media.j3d.Behavior
|
+--javax.media.j3d.Interpolator
|
+--com.sun.j3d.utils.behaviors.interpolators.KBSplinePathInterpolator
- Direct Known Subclasses:
- KBRotPosScaleSplinePathInterpolator
- public abstract class KBSplinePathInterpolator
- extends javax.media.j3d.Interpolator
KBSplinePathInterpolator behavior. This class defines the base class for
all Kochanek-Bartels (also known as TCB or Tension-Continuity-Bias)
Spline Path Interpolators.
- Since:
- Java3D 1.2
|
Field Summary |
protected float |
currentU
This value is the distance between knots
value which can be used in further calculations by the subclass. |
protected KBKeyFrame[] |
keyFrames
|
protected int |
lowerKnot
|
protected int |
upperKnot
|
| Fields inherited from class javax.media.j3d.Interpolator |
defaultWakeupCriterion |
| Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
|
Constructor Summary |
KBSplinePathInterpolator(javax.media.j3d.Alpha alpha,
KBKeyFrame[] keys)
Constructs a new KBSplinePathInterpolator object that interpolates
between keyframes. |
|
Method Summary |
protected void |
computePathInterpolation()
This method computes the bounding knot indices and interpolation value
"CurrentU" given the current value of alpha and the knots[] array. |
void |
duplicateNode(javax.media.j3d.Node originalNode,
boolean forceDuplicate)
|
int |
getArrayLength()
This method retrieves the length of the key frame array. |
KBKeyFrame |
getKeyFrame(int index)
This method retrieves the key frame at the specified index. |
| Methods inherited from class javax.media.j3d.Interpolator |
getAlpha, initialize, setAlpha |
| Methods inherited from class javax.media.j3d.Behavior |
getEnable, getSchedulingBoundingLeaf, getSchedulingBounds, getView, postId, processStimulus, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, updateNodeReferences, wakeupOn |
| Methods inherited from class javax.media.j3d.Node |
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
| Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability, duplicateSceneGraphObject, getCapability, getUserData, isCompiled, isLive, setCapability, setUserData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keyFrames
protected KBKeyFrame[] keyFrames
currentU
protected float currentU
- This value is the distance between knots
value which can be used in further calculations by the subclass.
lowerKnot
protected int lowerKnot
upperKnot
protected int upperKnot
KBSplinePathInterpolator
public KBSplinePathInterpolator(javax.media.j3d.Alpha alpha,
KBKeyFrame[] keys)
- Constructs a new KBSplinePathInterpolator object that interpolates
between keyframes. It takes at least two key frames. The first key
frame's knot must have a value of 0.0 and the last knot must have a
value of 1.0. An intermediate key frame with index k must have a
knot value strictly greater than the knot value of a key frame with
index less than k. Once this constructor has all the valid key frames
it creates its own list of key fames that duplicates the first key frame
at the beginning of the list and the last key frame at the end of the
list.
- Parameters:
alpha - the alpha object for this interpolatorkeys - an array of KBKeyFrame. Requires at least two key frames.
getArrayLength
public int getArrayLength()
- This method retrieves the length of the key frame array.
- Returns:
- the number of key frames
getKeyFrame
public KBKeyFrame getKeyFrame(int index)
- This method retrieves the key frame at the specified index.
- Parameters:
index - the index of the key frame requested- Returns:
- the key frame at the associated index
computePathInterpolation
protected void computePathInterpolation()
- This method computes the bounding knot indices and interpolation value
"CurrentU" given the current value of alpha and the knots[] array.
duplicateNode
public void duplicateNode(javax.media.j3d.Node originalNode,
boolean forceDuplicate)
- Overrides:
duplicateNode in class javax.media.j3d.Node