Class KBRotPosScaleSplinePathInterpolator
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
com.sun.j3d.utils.behaviors.interpolators.KBRotPosScaleSplinePathInterpolator
KBRotPosScaleSplinePathInterpolator behavior. This class defines a
behavior that varies the rotational, translational, and scale components
of its target TransformGroup by using the Kochanek-Bartels cubic spline
interpolation to interpolate among a series of key frames
(using the value generated by the specified Alpha object). The
interpolated position, orientation, and scale are used to generate
a transform in the local coordinate system of this interpolator.
-
Field Summary
Fields inherited from class com.sun.j3d.utils.behaviors.interpolators.KBSplinePathInterpolator
currentU, keyFrames, lowerKnot, upperKnotFields inherited from class javax.media.j3d.TransformInterpolator
axis, axisInverse, targetFields inherited from class javax.media.j3d.Interpolator
defaultWakeupCriterionFields 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
ConstructorsConstructorDescriptionKBRotPosScaleSplinePathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, KBKeyFrame[] keys) Constructs a new KBRotPosScaleSplinePathInterpolator object that varies the rotation, translation, and scale of the target TransformGroup's transform. -
Method Summary
Modifier and TypeMethodDescriptioncloneNode(boolean forceDuplicate) Copies KBRotPosScaleSplinePathInterpolator information fromoriginalNodeinto the current node.voidcomputeTransform(float alphaValue, Transform3D transform) Computes the new transform for this interpolator for a given alpha value.voidduplicateNode(Node originalNode, boolean forceDuplicate) Copies KBRotPosScaleSplinePathInterpolator information fromoriginalNodeinto the current node.Deprecated.voidsetAxisOfRotPosScale(Transform3D axisOfRotPosScale) Deprecated.As of Java 3D version 1.3, replaced byTransformInterpolator.setTransformAxis(Transform3D)voidsetKeyFrame(int index, KBKeyFrame keyFrame) Set the key frame at the specified index tokeyFramevoidsetKeyFrames(KBKeyFrame[] keyFrame) Set all the key framesMethods inherited from class com.sun.j3d.utils.behaviors.interpolators.KBSplinePathInterpolator
computePathInterpolation, computePathInterpolation, getArrayLength, getKeyFrameMethods inherited from class javax.media.j3d.TransformInterpolator
getTarget, getTransformAxis, processStimulus, setTarget, setTransformAxis, updateNodeReferencesMethods inherited from class javax.media.j3d.Interpolator
getAlpha, initialize, setAlphaMethods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, wakeupOnMethods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickableMethods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
-
Constructor Details
-
KBRotPosScaleSplinePathInterpolator
public KBRotPosScaleSplinePathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, KBKeyFrame[] keys) Constructs a new KBRotPosScaleSplinePathInterpolator object that varies the rotation, translation, and scale of the target TransformGroup's transform. At least 2 key frames are required for this interpolator. 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.- Parameters:
alpha- the alpha object for this interpolatortarget- the TransformGroup node affected by this interpolatoraxisOfTransform- the transform that specifies the local coordinate system in which this interpolator operates.keys- an array of key frames that defien the motion path
-
-
Method Details
-
setAxisOfRotPosScale
Deprecated.As of Java 3D version 1.3, replaced byTransformInterpolator.setTransformAxis(Transform3D) -
getAxisOfRotPosScale
Deprecated.As of Java 3D version 1.3, replaced byTransformInterpolator.getTransformAxis() -
setKeyFrame
Set the key frame at the specified index tokeyFrame- Overrides:
setKeyFramein classKBSplinePathInterpolator- Parameters:
index- Index of the key frame to changekeyFrame- The new key frame
-
setKeyFrames
Set all the key frames- Overrides:
setKeyFramesin classKBSplinePathInterpolator- Parameters:
keyFrame- The new key frames
-
computeTransform
Computes the new transform for this interpolator for a given alpha value.- Specified by:
computeTransformin classTransformInterpolator- Parameters:
alphaValue- alpha value between 0.0 and 1.0transform- object that receives the computed transform for the specified alpha value- Since:
- Java 3D 1.3
-
cloneNode
Copies KBRotPosScaleSplinePathInterpolator information fromoriginalNodeinto the current node. This method is called from thecloneNodemethod which is, in turn, called by thecloneTreemethod.- Overrides:
cloneNodein classNode- Parameters:
forceDuplicate- when set totrue, causes theduplicateOnCloneTreeflag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTreevariable determines whether NodeComponent data is duplicated or copied.- Throws:
RestrictedAccessException- if this object is part of a live or compiled scenegraph.- See Also:
-
duplicateNode
Copies KBRotPosScaleSplinePathInterpolator information fromoriginalNodeinto the current node. This method is called from thecloneNodemethod which is, in turn, called by thecloneTreemethod.- Overrides:
duplicateNodein classKBSplinePathInterpolator- Parameters:
originalNode- the original node to duplicate.forceDuplicate- when set totrue, causes theduplicateOnCloneTreeflag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTreevariable determines whether NodeComponent data is duplicated or copied.- Throws:
RestrictedAccessException- if this object is part of a live or compiled scenegraph.- See Also:
-
TransformInterpolator.getTransformAxis()