| 
 | j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.util.interpolator.Interpolator
org.j3d.util.interpolator.Coordinate2DInterpolator
public class Coordinate2DInterpolator
An interpolator that works with 2D positional coordinates.
The interpolation routine is just a simple linear interpolation between each of the points. The interpolator may take arbitrarily spaced keyframes and compute correct values.
| Field Summary | 
|---|
| Fields inherited from class org.j3d.util.interpolator.Interpolator | 
|---|
| allocatedSize, ARRAY_INCREMENT, currentSize, DEFAULT_SIZE, interpolationType, keys, LINEAR, STEP | 
| Constructor Summary | |
|---|---|
| Coordinate2DInterpolator()Create a new linear interpolator instance with the default size for the number of key values. | |
| Coordinate2DInterpolator(int size)Create an linear interpolator with the given basic size. | |
| Coordinate2DInterpolator(int size,
                         int type)Create a interpolator with the given basic size using the interpolation type. | |
| Method Summary | |
|---|---|
|  void | addKeyFrame(float key,
            float[] coords)Add a key frame set of values at the given key point. | 
|  float[] | floatValue(float key)Get the interpolated value of the point at the given key value. | 
|  java.lang.String | toString() | 
| Methods inherited from class org.j3d.util.interpolator.Interpolator | 
|---|
| clear, findKeyIndex | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Coordinate2DInterpolator()
public Coordinate2DInterpolator(int size)
size - The starting number of items in interpolator
public Coordinate2DInterpolator(int size,
                                int type)
size - The starting number of items in interpolatortype - The type of interpolation scheme to use| Method Detail | 
|---|
public void addKeyFrame(float key,
                        float[] coords)
key - The value of the key to usecoords - The coordinates at this keypublic float[] floatValue(float key)
key - The key value to get the position for
public java.lang.String toString()
toString in class java.lang.Object| 
 | j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||