unc.cdva.graphics.models
Class TextureAnimatedObject

java.lang.Object
  extended by unc.cdva.graphics.models.TextureAnimatedObject
All Implemented Interfaces:
Object3D

public class TextureAnimatedObject
extends java.lang.Object
implements Object3D

Encapsulate an object with a texture based animation

Author:
Guillaume Conte

Constructor Summary
TextureAnimatedObject(StaticListObject baseObject, TextureAnimation animation)
          Inits a texture animated object with a base object and an animation
 
Method Summary
 Object3D clone()
          Clone the object (copy all the attributes)
 TextureAnimation getAnimation()
           
 StaticListObject getBaseObject()
           
 void render(javax.media.opengl.GL gl)
          Render an object.
 void setAnimation(TextureAnimation animation)
           
 void setBaseObject(StaticListObject baseObject)
           
 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

TextureAnimatedObject

public TextureAnimatedObject(StaticListObject baseObject,
                             TextureAnimation animation)
Inits a texture animated object with a base object and an animation

Parameters:
baseObject - base object
animation - corresponding animation
Method Detail

render

public void render(javax.media.opengl.GL gl)
Description copied from interface: Object3D
Render an object. By default the object is rendered in the first opengl basis. The transformations are performed in the rendering engine according to the data stored in the corresponding interactive item

Specified by:
render in interface Object3D
Parameters:
gl - gl context
See Also:
Object3D.render(javax.media.opengl.GL)

clone

public Object3D clone()
Description copied from interface: Object3D
Clone the object (copy all the attributes)

Specified by:
clone in interface Object3D
Overrides:
clone in class java.lang.Object
Returns:
cloned object
See Also:
Object.clone()

update

public void update(int state)
Update the animation

Parameters:
state -

getBaseObject

public StaticListObject getBaseObject()
Returns:
the baseObject

setBaseObject

public void setBaseObject(StaticListObject baseObject)
Parameters:
baseObject - the baseObject to set

getAnimation

public TextureAnimation getAnimation()
Returns:
the animation

setAnimation

public void setAnimation(TextureAnimation animation)
Parameters:
animation - the animation to set