hmi.graphics.opengl.scenegraph
Class VGLNode

java.lang.Object
  extended by hmi.graphics.opengl.scenegraph.VGLNode
All Implemented Interfaces:
GLRenderObject
Direct Known Subclasses:
PhysicalHumanVGLNode, SimpleLight, SimpleLight

public class VGLNode
extends Object
implements GLRenderObject

A VGL node combines a VJoint (tree) with a GLRenderList. The GLRenderList objects will usually link to the global transform matrix of the VJoint.

Author:
Job Zwiers

Field Summary
private  GLRenderObject marker
           
private  VJoint root
          The VJoint root determines the transformation for this VGLNode.
private  GLRenderList shapeList
          The GLRenderList shapeList specifies GLRenderObjects to be rendered.
 
Constructor Summary
VGLNode(String name)
          Creates a new VGLNode, specified name and capacity 1.
VGLNode(String name, int capacity)
          Creates a VGLNode with allocated root, with specified name, and with allocated shapeList, with specified capacity.
VGLNode(VJoint root, GLRenderList shapeList)
          Creates a VGLNode with specified root and shapeList.
 
Method Summary
 void addChild(VGLNode childNode)
          Adds the root of the childNode as a VJoint child, and appends all shapeList elements from the childNode to the shapeList of this VGLNode.
 void addGLShape(GLShape glShape)
          Adds some GLShape, and links it to the root of this VGLNode
 void addMarker()
           
 void addMarker(GLRenderObject marker)
           
 GLRenderList getGLShapeList()
           
 VJoint getRoot()
           
 void glInit(GLRenderContext gl)
          OpenGL initialization.
 void glRender(GLRenderContext gl)
          OpenGL rendering.
 void prependGLShape(GLShape glShape)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

root

private VJoint root
The VJoint root determines the transformation for this VGLNode.


shapeList

private GLRenderList shapeList
The GLRenderList shapeList specifies GLRenderObjects to be rendered.


marker

private GLRenderObject marker
Constructor Detail

VGLNode

public VGLNode(String name)
Creates a new VGLNode, specified name and capacity 1.


VGLNode

public VGLNode(String name,
               int capacity)
Creates a VGLNode with allocated root, with specified name, and with allocated shapeList, with specified capacity.


VGLNode

public VGLNode(VJoint root,
               GLRenderList shapeList)
Creates a VGLNode with specified root and shapeList. It is assumed here that the list elements are linked to the appropriate VJoint already, which need not be the root of this VGLNode.

Method Detail

getGLShapeList

public GLRenderList getGLShapeList()

getRoot

public VJoint getRoot()

prependGLShape

public void prependGLShape(GLShape glShape)

addGLShape

public void addGLShape(GLShape glShape)
Adds some GLShape, and links it to the root of this VGLNode


addChild

public void addChild(VGLNode childNode)
Adds the root of the childNode as a VJoint child, and appends all shapeList elements from the childNode to the shapeList of this VGLNode.


addMarker

public void addMarker(GLRenderObject marker)

addMarker

public void addMarker()

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