com.threerings.opengl.gui
Class ComponentBillboard

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.opengl.model.Model.Implementation
          extended by com.threerings.opengl.gui.ComponentBillboard
All Implemented Interfaces:
Scope, ScopeUpdateListener, Compositable, Enqueueable, Intersectable, Tickable

public class ComponentBillboard
extends Model.Implementation
implements Enqueueable

A component billboard model implementation.


Field Summary
protected  SimpleBatch _batch
          The batch that we submit to the renderer.
protected  Transform3D _billboardLocalTransform
          The billboard local transform.
protected  Transform3D _billboardViewTransform
          The billboard view transform.
protected  Box _bounds
          The bounds of the model.
protected  ComponentBillboardConfig _config
          The model configuration.
protected  GlContext _ctx
          The application context.
protected  int _influenceFlags
          Flags indicating which influences can affect the model.
protected  Transform3D _localTransform
          The local transform.
protected  Box _nbounds
          Holds the bounds of the model when updating.
protected  Transform3D _parentViewTransform
          The parent view transform.
protected  Transform3D _parentWorldTransform
          The parent world transform.
protected  RenderQueue _queue
          The queue into which we place our batch.
protected  Component _root
          The root component.
protected  Updater _updater
          The transform updater.
protected  Transform3D _worldTransform
          The world transform.
 
Fields inherited from class com.threerings.expr.SimpleScope
_parentScope
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
ComponentBillboard(GlContext ctx, Scope parentScope, ComponentBillboardConfig config)
          Creates a new billboard implementation.
 
Method Summary
 void composite()
          Adds this object's Dependencys and Enqueueables to the compositor in preparation for rendering.
 void drawBounds()
          Draws the bounds of the model in immediate mode.
 void enqueue()
          Enqueues this object for rendering.
 Box getBounds()
          Returns a reference to the bounds of the model.
 int getInfluenceFlags()
          Returns a set of flags indicating the types of influences that affect the model.
 void setConfig(ComponentBillboardConfig config)
          Sets the configuration of this model.
 void updateBounds()
          Updates the bounds of the model.
protected  void updateFromConfig()
          Updates the model to match its new or modified configuration.
 
Methods inherited from class com.threerings.opengl.model.Model.Implementation
attach, createAnimation, createSurface, createSurfaces, createSurfaces, detach, detachAll, getAnimation, getAnimations, getIntersection, getPlayingAnimations, getPointWorldTransform, getScopeName, getTickPolicy, hasCompleted, isImplementation, reset, setTickPolicy, tick, wasAdded, willBeRemoved
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, dispose, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctx

protected GlContext _ctx
The application context.


_queue

protected RenderQueue _queue
The queue into which we place our batch.


_batch

protected SimpleBatch _batch
The batch that we submit to the renderer.


_config

protected ComponentBillboardConfig _config
The model configuration.


_root

protected Component _root
The root component.


_updater

protected Updater _updater
The transform updater.


_parentWorldTransform

@Bound(value="worldTransform")
protected Transform3D _parentWorldTransform
The parent world transform.


_parentViewTransform

@Bound(value="viewTransform")
protected Transform3D _parentViewTransform
The parent view transform.


_localTransform

@Bound
protected Transform3D _localTransform
The local transform.


_billboardViewTransform

protected Transform3D _billboardViewTransform
The billboard view transform.


_billboardLocalTransform

protected Transform3D _billboardLocalTransform
The billboard local transform.


_worldTransform

protected Transform3D _worldTransform
The world transform.


_influenceFlags

protected int _influenceFlags
Flags indicating which influences can affect the model.


_bounds

protected Box _bounds
The bounds of the model.


_nbounds

protected Box _nbounds
Holds the bounds of the model when updating.

Constructor Detail

ComponentBillboard

public ComponentBillboard(GlContext ctx,
                          Scope parentScope,
                          ComponentBillboardConfig config)
Creates a new billboard implementation.

Method Detail

setConfig

public void setConfig(ComponentBillboardConfig config)
Sets the configuration of this model.


enqueue

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

Specified by:
enqueue in interface Enqueueable

getInfluenceFlags

public int getInfluenceFlags()
Description copied from class: Model.Implementation
Returns a set of flags indicating the types of influences that affect the model.

Overrides:
getInfluenceFlags in class Model.Implementation

getBounds

public Box getBounds()
Description copied from class: Model.Implementation
Returns a reference to the bounds of the model.

Overrides:
getBounds in class Model.Implementation

updateBounds

public void updateBounds()
Description copied from class: Model.Implementation
Updates the bounds of the model.

Overrides:
updateBounds in class Model.Implementation

drawBounds

public void drawBounds()
Description copied from class: Model.Implementation
Draws the bounds of the model in immediate mode.

Overrides:
drawBounds in class Model.Implementation

composite

public void composite()
Description copied from interface: Compositable
Adds this object's Dependencys and Enqueueables to the compositor in preparation for rendering.

Specified by:
composite in interface Compositable
Overrides:
composite in class Model.Implementation

updateFromConfig

protected void updateFromConfig()
Updates the model to match its new or modified configuration.