|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.geom.particle.BaseEmitter org.j3d.geom.particle.PolylineEmitter
public class PolylineEmitter
An emitter that generates particles along a single polyline length.
Time limits on the maximum age based on wall-clock existance time. Generates particles with no velocity but placed along the line.
Field Summary |
---|
Fields inherited from class org.j3d.geom.particle.BaseEmitter |
---|
color, initialMass, lifetime, lifetimeVariation, particleCount, randomiser, speed, surfaceArea, variation |
Constructor Summary | |
---|---|
PolylineEmitter()
Construct a new default emitter. |
|
PolylineEmitter(int maxTime,
int maxParticleCount,
float[] lineCoords,
float[] color,
float[] direction,
float speed,
float variation)
Construct a new emitter instance for a point emitter. |
|
PolylineEmitter(int maxTime,
int maxParticleCount,
float[] lineCoords,
int numCoords,
float[] color,
float[] direction,
float speed,
float variation)
Construct a new emitter instance for a point emitter. |
Method Summary | |
---|---|
boolean |
initialize(Particle particle)
Initialize a particle based on the rules defined by this initializer. |
int |
numParticlesToCreate(int timeDelta)
The number of particles that should be created and initialised this frame. |
void |
setDirection(float x,
float y,
float z)
Change the initial velocity that the particles are endowed with by modifying the direction. |
void |
setEmitterLine(float[] lineCoords)
Change the line coordinates used as the emitter position. |
void |
setEmitterLine(float[] lineCoords,
int numCoords)
Change the line coordinates used as the emitter position. |
void |
setMaxParticleCount(int maxCount)
Adjust the maximum number of particles that this initializer is going to work with. |
void |
setParticleLifetime(int time)
Change the maximum lifetime of the particles. |
void |
setSpeed(float speed)
Change the initial speed that the particles are endowed with. |
Methods inherited from class org.j3d.geom.particle.BaseEmitter |
---|
getColor, getLifetimeVariation, getMass, getMaxParticleCount, getParticleLifetime, getParticleVariation, getSpeed, getSurfaceArea, setColor, setLifetimeVariation, setMass, setParticleVariation, setSurfaceArea |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolylineEmitter()
public PolylineEmitter(int maxTime, int maxParticleCount, float[] lineCoords, float[] color, float[] direction, float speed, float variation)
maxTime
- The time length of the particles to exist in millisecondsmaxParticleCount
- The maximum number of particles to managelineCoords
- The line to emit fromcolor
- The initial color of particles (4 component)speed
- The speed of the particles to start withdirection
- The direction the particles are sent invariation
- The amount of variance for the initial valuespublic PolylineEmitter(int maxTime, int maxParticleCount, float[] lineCoords, int numCoords, float[] color, float[] direction, float speed, float variation)
maxTime
- The time length of the particles to exist in millisecondsmaxParticleCount
- The maximum number of particles to managelineCoords
- The line to emit fromnumCoords
- The number of coordinates to read from lineCoordscolor
- The initial color of particles (4 component)speed
- The speed of the particls to start withvariation
- The amount of variance for the initial valuesMethod Detail |
---|
public void setMaxParticleCount(int maxCount)
setMaxParticleCount
in interface ParticleInitializer
setMaxParticleCount
in class BaseEmitter
maxCount
- The new maximum particle count to usepublic void setParticleLifetime(int time) throws java.lang.IllegalArgumentException
setParticleLifetime
in interface ParticleInitializer
setParticleLifetime
in class BaseEmitter
time
- The new lifetime, in milliseconds
java.lang.IllegalArgumentException
- The lifetime is zero or negativepublic int numParticlesToCreate(int timeDelta)
timeDelta
- The delta between the last frame and this one in
milliseconds
public boolean initialize(Particle particle)
particle
- The particle instance to initialize
public void setSpeed(float speed)
setSpeed
in interface ParticleInitializer
setSpeed
in class BaseEmitter
speed
- The magnitude of the speed to usepublic void setDirection(float x, float y, float z)
x
- The x component of the velocity directiony
- The y component of the velocity directionz
- The z component of the velocity directionpublic void setEmitterLine(float[] lineCoords)
lineCoords
- The line to emit frompublic void setEmitterLine(float[] lineCoords, int numCoords)
lineCoords
- The line to emit fromnumCoords
- The number of coordinates to read from lineCoords
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |