edu.sdsc.mbt.viewers.GLViewerImpl
Class Renderable

java.lang.Object
  extended byedu.sdsc.mbt.viewers.GLViewerImpl.Renderable

public class Renderable
extends java.lang.Object

Provides a renderable object which contains all properties needed to regenerate geometry for a visible representation of some data. As the viewer processes incomming state change events from the tookit, the viewer sets dirty bit states in instances of this class so that during the next render pass, the viewer can quickly determine whether content needs to be update before it is redrawn. The "setDirty" and "getDisplayList" methods are synchronized to avoid test/set race conditions between the application thread and rendering thread.


Constructor Summary
Renderable()
          Constructor with basic initialization (empty display list and dirty).
 
Method Summary
 int getDisplayList(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, com.sun.opengl.util.GLUT glut)
          If the renderable is dirty, regenerate the display list and set the dirty state to false, then return the display list.
 void setDirty()
          Set the dirty state to true (generally called by an application to indicate that the display list should be re-generated).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Renderable

public Renderable()
Constructor with basic initialization (empty display list and dirty).

Method Detail

setDirty

public final void setDirty()
Set the dirty state to true (generally called by an application to indicate that the display list should be re-generated).


getDisplayList

public int getDisplayList(javax.media.opengl.GL gl,
                          javax.media.opengl.glu.GLU glu,
                          com.sun.opengl.util.GLUT glut)
If the renderable is dirty, regenerate the display list and set the dirty state to false, then return the display list. This method must be overridden by a sub-class.