| java.lang.Object com.sun.perseus.model.MotionRefValues
MotionRefValues | public class MotionRefValues implements RefValues(Code) | | version: $Id: MotionRefValues.java,v 1.3 2006/06/29 10:47:33 ln156897 Exp $ |
Constructor Summary | |
public | MotionRefValues(AnimateMotion motion) Builds a new MotionRefValues associated with the given AnimateMotion
instance. |
Method Summary | |
public Object[] | compute(int si, float p) Computes the value for the input interpolated values. | public int | getComponents() the number of components. | public float | getLength() Computes the length of the RefValues. | public float | getLength(int si) | public Segment | getSegment(int i) Parameters: i - requested segment index. | public void | getSegmentAtDist(float[] sisp, float dist) Computes the segment index for the given normalized distance.
Parameters: sisp - a float array where the mapped si and sp values should be stored. Parameters: dist - the distance for which the segment indices should becomputed. | public int | getSegments() | public void | initialize() Should be called after the RefValue's configuration is complete
to give the implementation a chance to initialize
internal data and cache values. | public void | makeDiscrete() Adds a new time segment so accomodate for discreet behavior.
If there is only one segment for discreet animations, the
last value is never shown. |
length | float length(Code) | | Used to store the length of this RefValues
|
nSegLength | float[] nSegLength(Code) | | Used to store the normalized length of each segment
|
segLength | float[] segLength(Code) | | Used to store the length of each segment
|
segments | MotionSegment[] segments(Code) | | This RefValues Segments. They can be CompositeSegment or MotionSegment
instances.
|
w | float[][] w(Code) | | A working array to return a value from the compute method.
|
MotionRefValues | public MotionRefValues(AnimateMotion motion)(Code) | | Builds a new MotionRefValues associated with the given AnimateMotion
instance.
Parameters: motion - the associated AnimateMotion |
compute | public Object[] compute(int si, float p)(Code) | | Computes the value for the input interpolated values.
There should be as many entries in the return array as there
are components in the RefValues.
Parameters: si - the current segment index Parameters: p - the current penetration Parameters: the - interpolated value. |
getComponents | public int getComponents()(Code) | | the number of components. There is an array of float for each component. |
getLength | public float getLength()(Code) | | Computes the length of the RefValues. This is meant for paced timing
computation.
the total length of refValues, along each component. Therefore, there are as many entries in the returned array as there arecomponents in RefValues. |
getLength | public float getLength(int si)(Code) | | Computes the length of segment at index si
Parameters: si - the segment index. |
getSegment | public Segment getSegment(int i)(Code) | | Parameters: i - requested segment index. Segment at index i |
getSegmentAtDist | public void getSegmentAtDist(float[] sisp, float dist)(Code) | | Computes the segment index for the given normalized distance.
Parameters: sisp - a float array where the mapped si and sp values should be stored. Parameters: dist - the distance for which the segment indices should becomputed. This value is normalized to the [0, 1] interval. |
getSegments | public int getSegments()(Code) | | the number of segments in refValues |
initialize | public void initialize()(Code) | | Should be called after the RefValue's configuration is complete
to give the implementation a chance to initialize
internal data and cache values.
|
makeDiscrete | public void makeDiscrete()(Code) | | Adds a new time segment so accomodate for discreet behavior.
If there is only one segment for discreet animations, the
last value is never shown. To accomodate for that, this
method should add a segment to the RefValues so that the
last animation value is shown during the last value interval
of a discreet animation.
|
|
|