com.threerings.opengl.util
Class SimpleTransformable

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

public abstract class SimpleTransformable
extends SimpleRenderable

Extends SimpleRenderable to include a world space transform so that subclasses can render themselves in model space.


Field Summary
protected  Transform3D _transform
          The world space transform.
 
Fields inherited from class com.threerings.opengl.util.SimpleRenderable
_batch, _ctx, _priority, _queue
 
Constructor Summary
protected SimpleTransformable()
          Creates an uninitialized transformable.
  SimpleTransformable(GlContext ctx)
          Creates a new simple transformable.
  SimpleTransformable(GlContext ctx, String queue)
          Creates a new simple transformable.
  SimpleTransformable(GlContext ctx, String queue, int priority)
          Creates a new simple transformable.
  SimpleTransformable(GlContext ctx, String queue, int priority, boolean modifiesColorState, int primitiveCount)
          Creates a new simple transformable.
 
Method Summary
protected  RenderState[] createStates()
          Creates the state set for this object.
 void enqueue()
          Enqueues this object for rendering.
protected  Vector3f getCenter()
          Returns the transformable's model space center.
 Transform3D getTransform()
          Returns a reference to the world space transform.
 
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
 

Field Detail

_transform

protected Transform3D _transform
The world space transform.

Constructor Detail

SimpleTransformable

public SimpleTransformable(GlContext ctx)
Creates a new simple transformable.


SimpleTransformable

public SimpleTransformable(GlContext ctx,
                           String queue)
Creates a new simple transformable.

Parameters:
queue - the name of the queue into which we place the batch.

SimpleTransformable

public SimpleTransformable(GlContext ctx,
                           String queue,
                           int priority)
Creates a new simple transformable.

Parameters:
queue - the name of the queue into which we place the batch.
priority - the priority level at which to enqueue the batch.

SimpleTransformable

public SimpleTransformable(GlContext ctx,
                           String queue,
                           int priority,
                           boolean modifiesColorState,
                           int primitiveCount)
Creates a new simple transformable.

Parameters:
queue - the name of the queue into which we place the batch.
priority - the priority level at which to enqueue the batch.
modifiesColorState - if true, invalidate the color state after calling the SimpleRenderable.draw() method.
primitiveCount - the primitive count to report to the renderer.

SimpleTransformable

protected SimpleTransformable()
Creates an uninitialized transformable.

Method Detail

getTransform

public Transform3D getTransform()
Returns a reference to the world space transform.


enqueue

public void enqueue()
Description copied from interface: Enqueueable
Enqueues this object for rendering.

Specified by:
enqueue in interface Enqueueable
Overrides:
enqueue in class SimpleRenderable

createStates

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

Overrides:
createStates in class SimpleRenderable

getCenter

protected Vector3f getCenter()
Returns the transformable's model space center.