hmi.graphics.opengl.state
Class GLStateComponentList

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

public class GLStateComponentList
extends Object
implements GLRenderObject

A list of GLStateComponents. For each StateComponent type, identified by its Id, at most one instance can be part of a GLStateComponentList.

Author:
Job Zwiers

Field Summary
private  int arraySize
           
private  int[] compId
           
private static int DEFAULTSIZE
           
private  int size
           
private  GLStateComponent[] stateComp
           
 
Constructor Summary
GLStateComponentList()
          Create an empty state component list.
 
Method Summary
 void addStateComponent(GLStateComponent sc)
          Inserts some GL state component object into the list, such that the list remains sorted by means of the id values.
 StringBuilder appendContent(StringBuilder buf, int tab)
           
private  void ensureArraySize(int requestedSize)
           
 int findIndex(int scId)
           
 GLStateComponent getStateComponent(int scId)
          Return the GLStateComponent stored for index id, or null if no list element was found for the specified id
 void glInit(GLRenderContext glc)
          Required by GLRenderObject interface.
 void glRender(GLRenderContext glc)
          Required by GLRenderObject interface.
 String toString()
          Yields a String representation of the (ids of) the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arraySize

private int arraySize

stateComp

private GLStateComponent[] stateComp

compId

private int[] compId

size

private int size

DEFAULTSIZE

private static final int DEFAULTSIZE
See Also:
Constant Field Values
Constructor Detail

GLStateComponentList

public GLStateComponentList()
Create an empty state component list.

Method Detail

ensureArraySize

private void ensureArraySize(int requestedSize)

addStateComponent

public void addStateComponent(GLStateComponent sc)
Inserts some GL state component object into the list, such that the list remains sorted by means of the id values.


getStateComponent

public GLStateComponent getStateComponent(int scId)
Return the GLStateComponent stored for index id, or null if no list element was found for the specified id


findIndex

public final int findIndex(int scId)

appendContent

public StringBuilder appendContent(StringBuilder buf,
                                   int tab)

toString

public String toString()
Yields a String representation of the (ids of) the list

Overrides:
toString in class Object

glInit

public void glInit(GLRenderContext glc)
Required by GLRenderObject interface.

Specified by:
glInit in interface GLRenderObject

glRender

public void glRender(GLRenderContext glc)
Required by GLRenderObject interface.

Specified by:
glRender in interface GLRenderObject