espresso3d.engine.lowlevel.texture
Class E3DAnimatedTextureFrame

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.lowlevel.texture.E3DAnimatedTextureFrame

public class E3DAnimatedTextureFrame
extends E3DEngineItem

Author:
Curt A single frame of animation for an animated texture. Multiple frames are combined to create an animated texture for objects that support it.

Constructor Summary
E3DAnimatedTextureFrame(E3DEngine engine, java.lang.String textureName, double life)
          Create an animated texture frame.
 
Method Summary
 double getAge()
          Returns the age of the frame (how long its been rendererd already)
 double getLife()
          Gets the life of the frame (number of seconds it renders before going to the next frame)
 E3DTexture getTexture()
          Returns the E3DTexture object for this frame
protected  boolean isFrameChangeNeeded(double lastFrameTimeSeconds)
           
 void reset()
          Resets the frame's age.
 void setLife(double life)
          Gets the life of the frame (number of seconds it renders before going to the next frame)
 void setTexture(E3DTexture texture)
          Sets the textue for the frame
protected  boolean update(double lastFrameTimeSeconds)
           
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

E3DAnimatedTextureFrame

public E3DAnimatedTextureFrame(E3DEngine engine,
                               java.lang.String textureName,
                               double life)
Create an animated texture frame.

Parameters:
engine - Engine the texture will reside in
textureName - Name of the texture for this frame
life - Length of time (Seconds) this frame will be rendered before going to the next
Method Detail

reset

public void reset()
Resets the frame's age. Normally only used by the engine


getLife

public double getLife()
Gets the life of the frame (number of seconds it renders before going to the next frame)

Returns:

setLife

public void setLife(double life)
Gets the life of the frame (number of seconds it renders before going to the next frame)

Parameters:
life - Number of seconds to render this frame

getTexture

public E3DTexture getTexture()
Returns the E3DTexture object for this frame

Returns:

setTexture

public void setTexture(E3DTexture texture)
Sets the textue for the frame

Parameters:
texture -

getAge

public double getAge()
Returns the age of the frame (how long its been rendererd already)

Returns:

update

protected boolean update(double lastFrameTimeSeconds)

isFrameChangeNeeded

protected boolean isFrameChangeNeeded(double lastFrameTimeSeconds)