unc.cdva.graphics.animations
Class TextureAnimationHandler
java.lang.Object
unc.cdva.graphics.animations.TextureAnimationHandler
- Direct Known Subclasses:
- PathwayEndHandler, PathwayHandler, ReticleHandler
public abstract class TextureAnimationHandler
- extends java.lang.Object
Super class for texture animation handler objects. The
contructor of this class will load the textures for the
child class, the child simply needs to define the name of
the texture file, and the number of texture files
associated with that name. See constructor comments for
more details.
- Author:
- Guillaume Conte, Dan Van Atta
Field Summary |
protected java.util.Vector<com.sun.opengl.util.texture.Texture> |
textures
Stores the texture objects. |
Constructor Summary |
TextureAnimationHandler(java.lang.String texturePath,
int numTextures)
Instantiates the pathway end handler, loads textures
from file. |
Method Summary |
abstract com.sun.opengl.util.texture.Texture |
handle(int state)
Returns a texture corresponding to the objects state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
textures
protected java.util.Vector<com.sun.opengl.util.texture.Texture> textures
- Stores the texture objects.
TextureAnimationHandler
public TextureAnimationHandler(java.lang.String texturePath,
int numTextures)
- Instantiates the pathway end handler, loads textures
from file. Texture files have a standard naming
convention. They start with a name, then have a
number, then a .tga. This allows for multiple
animations per object.
- Parameters:
texturePath
- Simply specify the path and name of the
texture file (do NOT include the number or
.tga extendsion).numTextures
- The number of texture files to be loaded.
handle
public abstract com.sun.opengl.util.texture.Texture handle(int state)
- Returns a texture corresponding to the objects state.
- Parameters:
state
- The objects state which we are interested
in.
- Returns:
- A texture corresponding to the state
indicated by the state parameter.