unc.cdva.graphics.models
Class StaticListObject

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

public class StaticListObject
extends java.lang.Object
implements Object3D

An OBJ model implementation that renders the data as a display list.

Author:
Kevin Glass, Guillaume (Adapted to handle arbitrary type of polygons, textures and shader programs)

Constructor Summary
StaticListObject()
          Create a new OBJ model
StaticListObject(ObjData data, com.sun.opengl.util.texture.Texture texture, ShaderProgram shader, javax.media.opengl.GL gl)
          Create a new OBJ model that will render the object data specified in OpenGL
 
Method Summary
 Object3D clone()
          Clone the object (copy all the attributes)
 int getListId()
           
 com.sun.opengl.util.texture.Texture getTexture()
           
 void render(javax.media.opengl.GL gl)
          Render the OBJ Model
 void setListId(int listId)
           
 void setTexture(com.sun.opengl.util.texture.Texture texture)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticListObject

public StaticListObject()
Create a new OBJ model


StaticListObject

public StaticListObject(ObjData data,
                        com.sun.opengl.util.texture.Texture texture,
                        ShaderProgram shader,
                        javax.media.opengl.GL gl)
Create a new OBJ model that will render the object data specified in OpenGL

Parameters:
data - The data to be rendered for this model
Method Detail

render

public void render(javax.media.opengl.GL gl)
Render the OBJ Model

Specified by:
render in interface Object3D
Parameters:
gl - gl context

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:
Object3D.clone()

getListId

public int getListId()
Returns:
the listId

getTexture

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

setListId

public void setListId(int listId)
Parameters:
listId - the listId to set

setTexture

public void setTexture(com.sun.opengl.util.texture.Texture texture)
Parameters:
texture - The texture to set.