com.threerings.opengl.effect
Class ParticleSystem

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

public class ParticleSystem
extends BaseParticleSystem

The particle system model implementation.


Nested Class Summary
static class ParticleSystem.Layer
          A single layer of the system.
 
Field Summary
protected  Box[] _groupBounds
          World space bounds of each group.
protected static Comparator<Particle> DEPTH_COMP
          Sorts particles by decreasing depth.
 
Fields inherited from class com.threerings.opengl.effect.BaseParticleSystem
_bounds, _completed, _config, _ctx, _influenceFlags, _layers, _localTransform, _nbounds, _parentViewTransform, _parentWorldTransform, _tickPolicy, _vector, _viewTransform, _warmed, _worldTransform
 
Fields inherited from class com.threerings.expr.SimpleScope
_parentScope
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
ParticleSystem(GlContext ctx, Scope parentScope, ParticleSystemConfig config)
          Creates a new particle system implementation.
 
Method Summary
protected  BaseParticleSystem.Layer createLayer(BaseParticleSystemConfig.Layer config)
          Creates a new layer for the supplied config.
protected  Box getGroupBounds(int idx)
          Returns the bounds of the group at the specified index.
protected  void resetBounds()
          Resets the bounds before the tick.
 
Methods inherited from class com.threerings.opengl.effect.BaseParticleSystem
composite, drawBounds, enqueue, getBounds, getInfluenceFlags, getTickPolicy, hasCompleted, reset, setConfig, tick, updateBounds, updateFromConfig
 
Methods inherited from class com.threerings.opengl.model.Model.Implementation
attach, createAnimation, createSurface, createSurfaces, createSurfaces, detach, detachAll, getAnimation, getAnimations, getIntersection, getPlayingAnimations, getPointWorldTransform, getScopeName, isImplementation, setTickPolicy, 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

_groupBounds

protected Box[] _groupBounds
World space bounds of each group.


DEPTH_COMP

protected static final Comparator<Particle> DEPTH_COMP
Sorts particles by decreasing depth.

Constructor Detail

ParticleSystem

public ParticleSystem(GlContext ctx,
                      Scope parentScope,
                      ParticleSystemConfig config)
Creates a new particle system implementation.

Method Detail

createLayer

protected BaseParticleSystem.Layer createLayer(BaseParticleSystemConfig.Layer config)
Description copied from class: BaseParticleSystem
Creates a new layer for the supplied config.

Specified by:
createLayer in class BaseParticleSystem

resetBounds

protected void resetBounds()
Description copied from class: BaseParticleSystem
Resets the bounds before the tick.

Overrides:
resetBounds in class BaseParticleSystem

getGroupBounds

protected Box getGroupBounds(int idx)
Returns the bounds of the group at the specified index.