|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 | +--javax.media.j3d.PathInterpolator
PathInterpolator behavior. This class defines the base class for all Path Interpolators. Subclasses have access to the computePathInterpolation() method, which computes the currentInterpolationValue given the current time and alpha. The method also computes the currentKnotIndex, which is based on the currentInterpolationValue. The currentInterpolationValue is calculated by linearly interpolating among a series of predefined knots (using the value generated by the specified Alpha object). The first knot must have a value of 0.0 and the last knot must have a value of 1.0. An intermediate knot with index k must have a value strictly greater than any knot with index less than k.
Field Summary | |
protected float |
currentInterpolationValue
This value is the ratio between knot values indicated by the currentKnotIndex variable. |
protected int |
currentKnotIndex
This value is the index of the current base knot value, as determined by the alpha function. |
Fields 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_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary | |
PathInterpolator(Alpha alpha,
float[] knots)
Deprecated. As of Java 3D version 1.3, replaced by PathInterpolator(Alpha, TransformGroup, float[]) |
|
PathInterpolator(Alpha alpha,
TransformGroup target,
float[] knots)
Constructs a new PathInterpolator object that interpolates between the knot values in the knots array. |
|
PathInterpolator(Alpha alpha,
TransformGroup target,
Transform3D axisOfTransform,
float[] knots)
Constructs a new PathInterpolator object that interpolates between the knot values in the knots array. |
Method Summary | |
protected void |
computePathInterpolation()
Deprecated. As of Java 3D version 1.3, replaced by computePathInterpolation(float) |
protected void |
computePathInterpolation(float alphaValue)
Computes the base knot index and interpolation value given the specified value of alpha and the knots[] array. |
int |
getArrayLengths()
Retrieves the length of the knots array. |
float |
getKnot(int index)
Retrieves the knot at the specified index. |
void |
getKnots(float[] knots)
Copies the array of knots from this interpolator into the specified array. |
void |
setKnot(int index,
float knot)
Sets the knot at the specified index for this interpolator. |
protected void |
setKnots(float[] knots)
Replaces the existing array of knot values with the specified array. |
Methods 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, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected float currentInterpolationValue
computePathInterpolation(alphaValue)
method from the subclass's
computeTransform() method. Then this variable will hold a valid
value which can be used in further calculations by the subclass.
protected int currentKnotIndex
computePathInterpolation(alphaValue)
method from the subclass's
computeTransform() method. Then this variable will hold a valid
value which can be used in further calculations by the subclass.
Constructor Detail |
public PathInterpolator(Alpha alpha, float[] knots)
PathInterpolator(Alpha, TransformGroup, float[])
alpha
- the alpha object for this interpolator.knots
- an array of knot values that specify interpolation
points.public PathInterpolator(Alpha alpha, TransformGroup target, float[] knots)
alpha
- the alpha object for this interpolator.target
- the transformgroup node effected by this pathInterpolatorknots
- an array of knot values that specify interpolation
points.public PathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, float[] knots)
alpha
- the alpha object for this interpolator.target
- the transform node effected by this positionInterpolatoraxisOfTransform
- the transform that defines the local coordinateknots
- an array of knot values that specify interpolation
points.Method Detail |
public int getArrayLengths()
public void setKnot(int index, float knot)
index
- the index to be changedknot
- the new knot valuepublic float getKnot(int index)
index
- the index of the value requested
protected void setKnots(float[] knots)
knots
- a new array of knot values that specify
interpolation points.public void getKnots(float[] knots)
knots
- array that will receive the knots.protected void computePathInterpolation(float alphaValue)
alphaValue
- alpha value between 0.0 and 1.0protected void computePathInterpolation()
computePathInterpolation(float)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |