public abstract class AVParticleSystem extends org.j3d.geom.particle.ParticleSystem implements NodeUpdateListener
The node updater is registered for bounds changing events every frame. However, data changed listeners are not registered, unless per-vertex colours are being generated. If a derived class wishes to update other aspects, such as normals, texture coordinates or vertex attributes, then they will need to make their own arrangements to request the updates.
Per-vertex colours can be turned on or off by the derived class simply
by changing the return value from numColorComponents() to be
zero.
| Modifier and Type | Field and Description |
|---|---|
protected float[] |
colors
Array containing the current color values
|
protected float[] |
normals
Array containing the current normals
|
protected Geometry |
particleGeometry
The shape containing the geometry
|
protected boolean |
sendNewArrays
Flag indicating we also need to force-feed new arrays to the particles
because the user upped the particle count last frame.
|
protected float[][] |
texCoords
Array containing the current texture coordinates.
|
protected float[] |
vertices
Array containing the current position coordinates
|
| Constructor and Description |
|---|
AVParticleSystem(String systemType,
int particleCount)
Create a new particle system that represents the given type.
|
| Modifier and Type | Method and Description |
|---|---|
Geometry |
getNode()
Get the scene graph object that represents this particle system and can
be inserted into the scene graph.
|
protected void |
initializeArrays()
Set up the arrays used internally now.
|
void |
setMaxParticleCount(int maxCount)
Change the maximum number of particles that can be generated.
|
protected void |
updateGeometry()
Update the arrays for the geometry object.
|
addParticleFunction, enableParticleCreation, enableTextureCoordinates, getMaxParticleCount, getParticleInitializer, getSystemName, initialize, insertParticleFunction, isParticleCreationEnabled, isTextureCoordinateEnabled, onRemove, removeParticleFunction, setErrorReporter, setParticleInitializer, setSystemName, setTexCoordFunction, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateNodeBoundsChanges, updateNodeDataChangesprotected float[] vertices
protected float[][] texCoords
protected float[] colors
protected float[] normals
protected Geometry particleGeometry
protected boolean sendNewArrays
public AVParticleSystem(String systemType, int particleCount)
systemType - An identifier describing the current system typeparticleCount - The max nuumber of particles to createprotected void updateGeometry()
updateGeometry in class org.j3d.geom.particle.ParticleSystempublic void setMaxParticleCount(int maxCount)
setMaxParticleCount in class org.j3d.geom.particle.ParticleSystemmaxCount - The new maximum particle count to useIllegalArgumentException - The particle count was negativepublic Geometry getNode()
protected void initializeArrays()
Copyright © 2001 - 2015 j3d.org