|
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
public abstract class Interpolator
An interpolator that works with 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 | |
|---|---|
protected int |
allocatedSize
The current size of the array data |
protected static int |
ARRAY_INCREMENT
The number of items to increment the array with |
protected int |
currentSize
Current total number of items in the array |
protected static int |
DEFAULT_SIZE
The default number of items in the interpolator |
protected int |
interpolationType
The type of interpolation routine to use |
protected float[] |
keys
The keys as a single array for fast searching |
static int |
LINEAR
The interpolator should act as a linear interpolator between keys |
static int |
STEP
The interpolator should act as a step interpolator between keys |
| Constructor Summary | |
|---|---|
protected |
Interpolator()
Create a new interpolator instance with the default size for the number of key values. |
protected |
Interpolator(int size)
Create an interpolator with the given basic size. |
protected |
Interpolator(int size,
int type)
Create a interpolator with the given basic size and interpolation type. |
| Method Summary | |
|---|---|
void |
clear()
Reset the interpolator to be empty so that new key values are replacing the old ones. |
protected int |
findKeyIndex(float key)
Find the key in the array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LINEAR
public static final int STEP
protected static final int DEFAULT_SIZE
protected static final int ARRAY_INCREMENT
protected int allocatedSize
protected int currentSize
protected float[] keys
protected final int interpolationType
| Constructor Detail |
|---|
protected Interpolator()
protected Interpolator(int size)
size - The starting number of items in interpolator
protected Interpolator(int size,
int type)
size - The starting number of items in interpolatortype - The type of interpolation routine to do| Method Detail |
|---|
public void clear()
protected int findKeyIndex(float key)
key - The key to search for
|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||