unc.cdva.graphics.animations
Class TextureAnimation

java.lang.Object
  extended by unc.cdva.graphics.animations.TextureAnimation

public class TextureAnimation
extends java.lang.Object

Class implementing a texture based animation of an object. It uses the Strategy Pattern to determine how the texture of the object has to be modified.

Author:
slug

Constructor Summary
TextureAnimation(TextureAnimationHandler handler)
          Create a TextureAnimation object, and attach to it a handler
 
Method Summary
 TextureAnimation clone()
          Create a cloned version of the animation that possess the same value
 TextureAnimationHandler getHandler()
           
 com.sun.opengl.util.texture.Texture getTexture()
           
 void setHandler(TextureAnimationHandler handler)
           
 void update(int state)
          Update the animation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextureAnimation

public TextureAnimation(TextureAnimationHandler handler)
Create a TextureAnimation object, and attach to it a handler

Parameters:
handler - handler of the animation
Method Detail

update

public void update(int state)
Update the animation

Parameters:
state - new state of the animation

clone

public TextureAnimation clone()
Create a cloned version of the animation that possess the same value

Overrides:
clone in class java.lang.Object
Returns:
cloned object

getTexture

public com.sun.opengl.util.texture.Texture getTexture()
Returns:
the texture

getHandler

public TextureAnimationHandler getHandler()
Returns:
the handler

setHandler

public void setHandler(TextureAnimationHandler handler)
Parameters:
handler - the handler to set