net.java.joglutils.msg.elements
Class GLModelMatrixElement

java.lang.Object
  extended by net.java.joglutils.msg.elements.Element
      extended by net.java.joglutils.msg.elements.ModelMatrixElement
          extended by net.java.joglutils.msg.elements.GLModelMatrixElement

public class GLModelMatrixElement
extends ModelMatrixElement

Represents the model matrix, which is the transformation applied to objects in the scene, and causes side-effects in OpenGL.


Field Summary
 
Fields inherited from class net.java.joglutils.msg.elements.ModelMatrixElement
matrix, temp
 
Constructor Summary
GLModelMatrixElement()
           
 
Method Summary
static void enable(State defaultState)
           
static GLModelMatrixElement getInstance(State state)
           
 void makeEltIdent()
          Sets this element to the identity matrix.
 void multElt(Mat4f matrix)
          Multiplies this element by the given matrix.
 Element newInstance()
          Creates a new instance initialized to the default values for the state element.
 void pop(State state, Element previousTopElement)
          Pops the element, allowing for side effects to occur.
 void push(State state)
          Pushes the element, allowing for side effects to occur.
 
Methods inherited from class net.java.joglutils.msg.elements.ModelMatrixElement
getMatrix, getStateIndex, isEnabled, makeIdent, mult
 
Methods inherited from class net.java.joglutils.msg.elements.Element
getDepth, getNext, getNextInStack, setDepth, setNext, setNextInStack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLModelMatrixElement

public GLModelMatrixElement()
Method Detail

newInstance

public Element newInstance()
Description copied from class: Element
Creates a new instance initialized to the default values for the state element. All concrete Element subclasses must implement this operation.

Overrides:
newInstance in class ModelMatrixElement

getInstance

public static GLModelMatrixElement getInstance(State state)

enable

public static void enable(State defaultState)

push

public void push(State state)
Description copied from class: Element
Pushes the element, allowing for side effects to occur. Default method does nothing.

Overrides:
push in class ModelMatrixElement

pop

public void pop(State state,
                Element previousTopElement)
Description copied from class: Element
Pops the element, allowing for side effects to occur. Default method does nothing. NOTE that it is not legal to call State.getElement() in the implementation of this method, which is why the previous top element is provided as an argument.

Overrides:
pop in class Element

makeEltIdent

public void makeEltIdent()
Description copied from class: ModelMatrixElement
Sets this element to the identity matrix.

Overrides:
makeEltIdent in class ModelMatrixElement

multElt

public void multElt(Mat4f matrix)
Description copied from class: ModelMatrixElement
Multiplies this element by the given matrix.

Overrides:
multElt in class ModelMatrixElement