com.threerings.opengl.geometry
Class SimpleGeometry

java.lang.Object
  extended by com.threerings.opengl.geometry.Geometry
      extended by com.threerings.opengl.geometry.SimpleGeometry

public class SimpleGeometry
extends Geometry

A simple geometry implementation that returns the same array state and draw command for all passes.


Field Summary
 
Fields inherited from class com.threerings.opengl.geometry.Geometry
EMPTY
 
Constructor Summary
SimpleGeometry()
          For convenience, creates a geometry instance that calls the draw() method (which must be overridden) to draw the geometry in immediate mode.
SimpleGeometry(ArrayState arrayState, SimpleBatch.DrawCommand drawCommand)
          Creates a geometry instance with the specified array state and draw command.
SimpleGeometry(boolean modifiesColorState, int primitiveCount)
          For convenience, creates a geometry instance that calls the draw() method (which must be overridden) to draw the geometry in immediate mode.
SimpleGeometry(SimpleBatch.DrawCommand drawCommand)
          Creates a geometry instance with the specified draw command and no array state.
 
Method Summary
 ArrayState getArrayState(int pass)
          Returns the array state for the specified pass.
 SimpleBatch.DrawCommand getDrawCommand(int pass)
          Returns the draw command for the specified pass.
 
Methods inherited from class com.threerings.opengl.geometry.Geometry
getBoneMatrices, getCenter, getCoordSpace, requiresUpdate, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleGeometry

public SimpleGeometry()
For convenience, creates a geometry instance that calls the draw() method (which must be overridden) to draw the geometry in immediate mode.


SimpleGeometry

public SimpleGeometry(boolean modifiesColorState,
                      int primitiveCount)
For convenience, creates a geometry instance that calls the draw() method (which must be overridden) to draw the geometry in immediate mode.

Parameters:
modifiesColorState - whether or not the draw method modifies the color state.
primitiveCount - the primitive count to report to the renderer.

SimpleGeometry

public SimpleGeometry(SimpleBatch.DrawCommand drawCommand)
Creates a geometry instance with the specified draw command and no array state.


SimpleGeometry

public SimpleGeometry(ArrayState arrayState,
                      SimpleBatch.DrawCommand drawCommand)
Creates a geometry instance with the specified array state and draw command.

Method Detail

getArrayState

public ArrayState getArrayState(int pass)
Description copied from class: Geometry
Returns the array state for the specified pass.

Specified by:
getArrayState in class Geometry

getDrawCommand

public SimpleBatch.DrawCommand getDrawCommand(int pass)
Description copied from class: Geometry
Returns the draw command for the specified pass.

Specified by:
getDrawCommand in class Geometry


Copyright © 2011. All Rights Reserved.