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
javax.media.j3d.TransformInterpolator
com.sun.j3d.utils.behaviors.interpolators.KBSplinePathInterpolator
- Direct Known Subclasses:
KBRotPosScaleSplinePathInterpolator
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
FieldsModifier and TypeFieldDescriptionprotected float
This value is the distance between knots value which can be used in further calculations by the subclass.protected KBKeyFrame[]
An array of KBKeyFrame for interpolatorprotected int
The lower knotprotected int
The upper knotFields inherited from class javax.media.j3d.TransformInterpolator
axis, axisInverse, target
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_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
-
Constructor Summary
ConstructorsConstructorDescriptionKBSplinePathInterpolator
(Alpha alpha, KBKeyFrame[] keys) Deprecated.KBSplinePathInterpolator
(Alpha alpha, TransformGroup target, KBKeyFrame[] keys) Constructs a new KBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and an default axisOfTranform set to identity.KBSplinePathInterpolator
(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, KBKeyFrame[] keys) Constructs a new KBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and axisOfTransform. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Deprecated.As of Java 3D version 1.3, replaced bycomputePathInterpolation(float)
protected void
computePathInterpolation
(float alphaValue) This method computes the bounding knot indices and interpolation value "CurrentU" given the current value of the knots[] array and the specified alpha valuevoid
duplicateNode
(Node originalNode, boolean forceDuplicate) Copies all KBSplinePathInterpolator information fromoriginalNode
into the current node.int
This method retrieves the length of the key frame array.getKeyFrame
(int index) This method retrieves the key frame at the specified index.void
setKeyFrame
(int index, KBKeyFrame keyFrame) Set the key frame at the specified index tokeyFrame
void
setKeyFrames
(KBKeyFrame[] keyFrames) Set allthe key framesMethods inherited from class javax.media.j3d.TransformInterpolator
computeTransform, getTarget, getTransformAxis, processStimulus, setTarget, setTransformAxis, updateNodeReferences
Methods inherited from class javax.media.j3d.Interpolator
getAlpha, initialize, setAlpha
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, wakeupOn
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
-
Field Details
-
keyFrames
An array of KBKeyFrame for interpolator -
currentU
protected float currentUThis value is the distance between knots value which can be used in further calculations by the subclass. -
lowerKnot
protected int lowerKnotThe lower knot -
upperKnot
protected int upperKnotThe upper knot
-
-
Constructor Details
-
KBSplinePathInterpolator
Deprecated.As of Java 3D version 1.3, replaced byKBSplinePathInterpolator(Alpha, TransformGroup, TCBKeyFrame[])
-
KBSplinePathInterpolator
Constructs a new KBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and an default axisOfTranform set to identity. 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 interpolatortarget
- the TransformGroup node affected by this interpolatorkeys
- an array of KBKeyFrame. Requires at least two key frames.- Since:
- Java 3D 1.3
-
KBSplinePathInterpolator
public KBSplinePathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, KBKeyFrame[] keys) Constructs a new KBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and axisOfTransform. 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 interpolatortarget
- the TransformGroup node affected by this interpolatoraxisOfTransform
- the transform that defines the local coordinatekeys
- an array of KBKeyFrame. Requires at least two key frames- Since:
- Java 3D 1.3
-
-
Method Details
-
getArrayLength
public int getArrayLength()This method retrieves the length of the key frame array.- Returns:
- the number of key frames
-
getKeyFrame
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
-
setKeyFrame
Set the key frame at the specified index tokeyFrame
- Parameters:
index
- Index of the key frame to changekeyFrame
- The new key frame- Since:
- Java 3D 1.3
-
setKeyFrames
Set allthe key frames- Parameters:
keyFrames
- The new key frame- Since:
- Java 3D 1.3
-
computePathInterpolation
protected void computePathInterpolation()Deprecated.As of Java 3D version 1.3, replaced bycomputePathInterpolation(float)
-
computePathInterpolation
protected void computePathInterpolation(float alphaValue) This method computes the bounding knot indices and interpolation value "CurrentU" given the current value of the knots[] array and the specified alpha value- Parameters:
alphaValue
- alpha value between 0.0 and 1.0- Since:
- Java 3D 1.3
-
duplicateNode
Copies all KBSplinePathInterpolator information fromoriginalNode
into the current node. This method is called from thecloneNode
method which is, in turn, called by thecloneTree
method.- Overrides:
duplicateNode
in classNode
- Parameters:
originalNode
- the original node to duplicate.forceDuplicate
- when set totrue
, causes theduplicateOnCloneTree
flag to be ignored. Whenfalse
, the value of each node'sduplicateOnCloneTree
variable determines whether NodeComponent data is duplicated or copied.- Throws:
RestrictedAccessException
- if this object is part of a live or compiled scenegraph.- See Also:
-
KBSplinePathInterpolator(Alpha, TransformGroup, TCBKeyFrame[])