j3d.examples.particles
Class Shape3DParticleSystem

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Group
              extended by j3d.examples.particles.Shape3DParticleSystem
All Implemented Interfaces:
IParticleLifeCycleListener, IParticleSystem

public class Shape3DParticleSystem
extends javax.media.j3d.Group
implements IParticleSystem, IParticleLifeCycleListener

A particle system that uses any Shape3D as a particle. This particle system uses the user data of each Shape3D particle to maintain scene graph information. The collision bounds of the shape is assigned by the shape factory based on the radius of the particle. The collision bounds is a BoundingBox.


Field Summary
 
Fields inherited from class javax.media.j3d.Group
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
Shape3DParticleSystem(ParticleEmitter anEmitter, IShape3DFactory aFactory)
           
 
Method Summary
 void aboutToDie(java.util.List aList, float dt)
           
 void aboutToEmit(java.util.List aList, float dt)
           
 javax.media.j3d.BranchGroup getBranchGroup(Particle aParticle)
           
 javax.media.j3d.Shape3D getShape(Particle aParticle)
           
 javax.media.j3d.TransformGroup getTransformGroup(Particle aParticle)
           
 boolean isAlive()
           
 boolean isDead()
           
 void nextFrame(float dt)
          Called during the animation of the particle system.
 void updated(java.util.List aList, float dt)
           
 
Methods inherited from class javax.media.j3d.Group
addChild, cloneNode, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface j3d.examples.particles.IParticleSystem
getLocalToVworld
 

Constructor Detail

Shape3DParticleSystem

public Shape3DParticleSystem(ParticleEmitter anEmitter,
                             IShape3DFactory aFactory)
Method Detail

aboutToDie

public void aboutToDie(java.util.List aList,
                       float dt)
Specified by:
aboutToDie in interface IParticleLifeCycleListener

aboutToEmit

public void aboutToEmit(java.util.List aList,
                        float dt)
Specified by:
aboutToEmit in interface IParticleLifeCycleListener

getBranchGroup

public javax.media.j3d.BranchGroup getBranchGroup(Particle aParticle)

getShape

public javax.media.j3d.Shape3D getShape(Particle aParticle)

getTransformGroup

public javax.media.j3d.TransformGroup getTransformGroup(Particle aParticle)

isAlive

public boolean isAlive()
Specified by:
isAlive in interface IParticleSystem
Returns:
true if this particle system is still alive.

isDead

public boolean isDead()
Specified by:
isDead in interface IParticleSystem
Returns:
true if this particle system is dead.

nextFrame

public void nextFrame(float dt)
Description copied from interface: IParticleSystem
Called during the animation of the particle system.

Specified by:
nextFrame in interface IParticleSystem

updated

public void updated(java.util.List aList,
                    float dt)
Specified by:
updated in interface IParticleLifeCycleListener