com.jme.animation
Class TextureKeyframeController

java.lang.Object
  extended by com.jme.scene.Controller
      extended by com.jme.animation.TextureKeyframeController
All Implemented Interfaces:
Savable, java.io.Serializable

public class TextureKeyframeController
extends Controller

TextureKeyframeController applies transform matrices to the texture matrix based on keyframe times. Allow for highly controllable texture animation. Iterpolation can be used to allow flowing animation (lava flows) or turned off for a "flip book" animation (similar to gif animations).

Author:
Mark Powell
See Also:
Serialized Form

Field Summary
static int IT_LINEAR
           
static int IT_STEP
           
 
Fields inherited from class com.jme.scene.Controller
RT_CLAMP, RT_CYCLE, RT_WRAP
 
Constructor Summary
TextureKeyframeController()
           
TextureKeyframeController(Texture texture)
           
 
Method Summary
 void addData(float[] times, Matrix4f[] transforms, int[] interp)
           
 java.lang.Class getClassTag()
           
 Texture getTexture()
           
 void read(JMEImporter e)
           
 void setTexture(Texture texture)
           
 void update(float time)
          Defined by extending classes, update is a signal to Controller that it should update whatever object(s) it is controlling.
 void write(JMEExporter e)
           
 
Methods inherited from class com.jme.scene.Controller
getControllerValues, getMaxTime, getMinTime, getRepeatType, getSpeed, isActive, setActive, setControllerValues, setMaxTime, setMinTime, setRepeatType, setSpeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IT_STEP

public static final int IT_STEP
See Also:
Constant Field Values

IT_LINEAR

public static final int IT_LINEAR
See Also:
Constant Field Values
Constructor Detail

TextureKeyframeController

public TextureKeyframeController()

TextureKeyframeController

public TextureKeyframeController(Texture texture)
Method Detail

addData

public void addData(float[] times,
                    Matrix4f[] transforms,
                    int[] interp)

setTexture

public void setTexture(Texture texture)

getTexture

public Texture getTexture()

update

public void update(float time)
Description copied from class: Controller
Defined by extending classes, update is a signal to Controller that it should update whatever object(s) it is controlling.

Specified by:
update in class Controller
Parameters:
time - The time in seconds between the last call to update and the current one

write

public void write(JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class Controller
Throws:
java.io.IOException

read

public void read(JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class Controller
Throws:
java.io.IOException

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface Savable
Overrides:
getClassTag in class Controller