hmi.graphics.opengl
Class GLShape

java.lang.Object
  extended by hmi.graphics.opengl.GLShape
All Implemented Interfaces:
GLRenderObject

public class GLShape
extends Object
implements GLRenderObject

A GLShape is a GLRenderObject that encapsulates geometry (a GLRenderObject), a transform matrix, and a GLState (again a GLRenderObject);


Field Summary
static int GEOM
           
protected  GLRenderList glGeometryList
           
protected  GLRenderList glStateList
           
(package private)  float[] mv
           
private  String name
           
static int STATE
           
protected  float[] transformMatrix
           
private  boolean visible
           
 
Constructor Summary
GLShape()
           
GLShape(String name)
           
 
Method Summary
 void addGLGeometry(GLRenderObject glGeometry)
          Adds some GLRenderObject that defines the visual appearance of this VirtualObject
 void addGLState(GLRenderObject glState)
          Adds some GLRenderObject that defines the visual appearance of this VirtualObject
 GLRenderList getGeometryList()
           
 String getId()
           
 String getInfo()
           
 GLRenderList getStateList()
           
 void glInit(GLRenderContext gl)
          OpenGL initialization.
 void glRender(GLRenderContext gl)
          OpenGL rendering.
 void hide()
           
 void linkToTransformMatrix(float[] transformMatrix)
          Sets a link to the specified matrix.
 void printInfo(int mod)
           
 void show()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

glStateList

protected GLRenderList glStateList

glGeometryList

protected GLRenderList glGeometryList

name

private String name

transformMatrix

protected float[] transformMatrix

visible

private boolean visible

STATE

public static final int STATE
See Also:
Constant Field Values

GEOM

public static final int GEOM
See Also:
Constant Field Values

mv

float[] mv
Constructor Detail

GLShape

public GLShape()

GLShape

public GLShape(String name)
Method Detail

getId

public String getId()

getInfo

public String getInfo()

getGeometryList

public GLRenderList getGeometryList()

getStateList

public GLRenderList getStateList()

hide

public void hide()

show

public void show()

printInfo

public void printInfo(int mod)

addGLGeometry

public void addGLGeometry(GLRenderObject glGeometry)
Adds some GLRenderObject that defines the visual appearance of this VirtualObject


addGLState

public void addGLState(GLRenderObject glState)
Adds some GLRenderObject that defines the visual appearance of this VirtualObject


linkToTransformMatrix

public void linkToTransformMatrix(float[] transformMatrix)
Sets a link to the specified matrix. The transpose of the latter will be used as OpenGL transformation matrix, that is, the specified matrix should be in row-major order. The matrix is not copied, so modifications to the matrix will have the effect of animating this GLShape object.


glInit

public void glInit(GLRenderContext gl)
OpenGL initialization.

Specified by:
glInit in interface GLRenderObject

glRender

public void glRender(GLRenderContext gl)
OpenGL rendering.

Specified by:
glRender in interface GLRenderObject

toString

public String toString()
Overrides:
toString in class Object