ACCESS_TYPE_RANDOM, ACCESS_TYPE_SEQUENTIAL, MODE_JUMP, MODE_LOOP, MODE_PATH
Constructor and Description |
---|
Dynamic5D()
Default constructor.
|
Dynamic5D(int duration,
float count)
Constructor setting the speed of interpolation and the number of revolutions.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int location,
Static5D v)
Adds a new Static5D to the location'th place in our List of Points to interpolate through.
|
void |
add(Static5D v)
Adds a new Static5D to the end of our list of Points to interpolate through.
|
Static5D |
getPoint(int location)
Returns the location'th Static5D.
|
boolean |
remove(int location)
Removes a location'th Point from the List of Points we interpolate through.
|
boolean |
remove(Static5D v)
Removes all occurrences of Point v from the List of Points to interpolate through.
|
void |
removeAll()
Removes all Points.
|
void |
setNoise(Static5D noise)
Sets the 'smoothness' of interpolation.
|
void |
setPoint(int location,
float x,
float y,
float z,
float w,
float v)
Resets the location'th Point.
|
get, getConvexity, getCount, getDimension, getDuration, getNumPoints, onPause, resetToBeginning, setAccessType, setConvexity, setCount, setDuration, setMode
public Dynamic5D()
public Dynamic5D(int duration, float count)
Dynamic.MODE_LOOP
, Dynamic.MODE_PATH
or Dynamic.MODE_JUMP
.duration
- number of milliseconds it takes to do one revolution.count
- number of revolutions we will do. Count<=0 means 'infinite'.public Static5D getPoint(int location)
location
- the index of the Point we are interested in.public void setPoint(int location, float x, float y, float z, float w, float v)
location
- the index of the Point we are setting.x
- New value of its first float.public void add(Static5D v)
Only a reference to the Point gets added to the List; this means that one can add a Point
here, and later on Static5D.set(float,float,float,float,float)
it to some new value and
the change will be seamlessly reflected in the interpolated path.
A Point can be added multiple times.
v
- The Point to add.public void add(int location, Static5D v)
location
- Index in our List to add the new Point at.v
- The Static5D to add.public boolean remove(Static5D v)
v
- The Point to remove.true
if we have removed at least one Point.public boolean remove(int location)
location
- index of the Point we want to remove.true
if location is valid, i.e. if 0<=location<getNumPoints().public void removeAll()
public void setNoise(Static5D noise)
When Noise=0 (the default), we interpolate between our Points through the most smooth path possible. Increasing noise makes the Dynamic increasingly deviate from this path, pseudo-randomly speeding up and slowing down, etc.
noise
- The noise level. Permitted range: 0 <= noise <= 1.