|
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.BooleanInterpolator
public class BooleanInterpolator
An interpolator that works with boolean values.
For linear interpolation this class will operate as such: On interval n to n+1 where n=v0 and n+1=v1 the value will be v0 for all values from n to (n + (n+1 - n) / 2) and v1 from > (n + (n+1 - n) / 2) to n + 1
The interpolation routine is either a stepwise or 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 | |
|---|---|
BooleanInterpolator()
Create a new sequencer instance with the default size for the number of key values. |
|
BooleanInterpolator(int size)
Create a step interpolator with the given basic size. |
|
BooleanInterpolator(int size,
int type)
Create a interpolator with the given basic size using the interpolation type. |
|
| Method Summary | |
|---|---|
void |
addKeyFrame(float key,
boolean value)
Add a key frame set of values at the given key point. |
boolean |
booleanValue(float key)
Get the interpolated value of the point at the given key value. |
java.lang.String |
toString()
Create a string representation of this interpolator's values |
| 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 BooleanInterpolator()
public BooleanInterpolator(int size)
size - The starting number of items in interpolator
public BooleanInterpolator(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,
boolean value)
key - The value of the key to usevalue - The scalar value at this keypublic boolean booleanValue(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 | |||||||||