com.threerings.opengl.util
Class Grid

java.lang.Object
  extended by com.threerings.opengl.util.SimpleRenderable
      extended by com.threerings.opengl.util.SimpleTransformable
          extended by com.threerings.opengl.util.Grid
All Implemented Interfaces:
Compositable, Enqueueable
Direct Known Subclasses:
EditorGrid

public class Grid
extends SimpleTransformable

Renders an unlit reference grid on the XY plane, centered about the origin.


Field Summary
 
Fields inherited from class com.threerings.opengl.util.SimpleTransformable
_transform
 
Fields inherited from class com.threerings.opengl.util.SimpleRenderable
_batch, _ctx, _priority, _queue
 
Constructor Summary
Grid(GlContext ctx, int lines, float spacing)
          Creates a new grid with the specified number of lines in each direction and the given spacing between the lines.
 
Method Summary
protected  RenderState[] createStates()
          Creates the state set for this object.
 Color4f getColor()
          Returns a reference to the grid color.
 
Methods inherited from class com.threerings.opengl.util.SimpleTransformable
enqueue, getCenter, getTransform
 
Methods inherited from class com.threerings.opengl.util.SimpleRenderable
composite, createBatch, draw, getStates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grid

public Grid(GlContext ctx,
            int lines,
            float spacing)
Creates a new grid with the specified number of lines in each direction and the given spacing between the lines.

Method Detail

getColor

public Color4f getColor()
Returns a reference to the grid color.


createStates

protected RenderState[] createStates()
Description copied from class: SimpleRenderable
Creates the state set for this object.

Overrides:
createStates in class SimpleTransformable