j3d.examples.particles
Class ShapeParticleSystem
java.lang.Object
javax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Group
j3d.examples.particles.ShapeParticleSystem
- All Implemented Interfaces:
- ParticleLifeCycleListener, ParticleSystemInterface
public class ShapeParticleSystem
- extends javax.media.j3d.Group
- implements ParticleSystemInterface, ParticleLifeCycleListener
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.
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 |
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 |
ShapeParticleSystem
public ShapeParticleSystem(ParticleEmitter anEmitter,
ShapeFactoryInterface aFactory)
aboutToDie
public void aboutToDie(java.util.List aList,
float dt)
- Specified by:
aboutToDie
in interface ParticleLifeCycleListener
aboutToEmit
public void aboutToEmit(java.util.List aList,
float dt)
- Specified by:
aboutToEmit
in interface ParticleLifeCycleListener
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 ParticleSystemInterface
- Returns:
true
if this particle system is still alive.
isDead
public boolean isDead()
- Specified by:
isDead
in interface ParticleSystemInterface
- Returns:
true
if this particle system is dead.
nextFrame
public void nextFrame(float dt)
- Description copied from interface:
ParticleSystemInterface
- Called during the animation of the particle system.
- Specified by:
nextFrame
in interface ParticleSystemInterface
updated
public void updated(java.util.List aList,
float dt)
- Specified by:
updated
in interface ParticleLifeCycleListener