|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.geom.particle.BaseEmitter
org.j3d.geom.particle.PointEmitter
public class PointEmitter
Particle emitter that generates particles with an initial speed and direction from a single point in space.
| Field Summary |
|---|
| Fields inherited from class org.j3d.geom.particle.BaseEmitter |
|---|
color, initialMass, lifetime, lifetimeVariation, particleCount, randomiser, speed, surfaceArea, variation |
| Constructor Summary | |
|---|---|
PointEmitter()
Construct a new default emitter. |
|
PointEmitter(int maxTime,
int maxParticleCount,
float[] position,
float[] direction,
float[] color,
float speed,
float variation)
Construct a new emitter instance for a point emitter that gives the particle a random force direction and strength. |
|
| 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 |
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 |
setPosition(float x,
float y,
float z)
Change the basic position that the particles are being generated from. |
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 PointEmitter()
public PointEmitter(int maxTime,
int maxParticleCount,
float[] position,
float[] direction,
float[] color,
float speed,
float variation)
maxTime - The time length of the particles to exist in millisecondsmaxParticleCount - The maximum number of particles to manageposition - The emitting position in the local spacedirection - The emitting direction in the local spacespeed - The initial color of particles (4 component)variation - The amount of variance for the initial values| Method Detail |
|---|
public void setMaxParticleCount(int maxCount)
setMaxParticleCount in interface ParticleInitializersetMaxParticleCount in class BaseEmittermaxCount - The new maximum particle count to use
public void setParticleLifetime(int time)
throws java.lang.IllegalArgumentException
setParticleLifetime in interface ParticleInitializersetParticleLifetime in class BaseEmittertime - 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 setPosition(float x,
float y,
float z)
x - The x component of the locationy - The y component of the locationz - The z component of the locationpublic void setSpeed(float speed)
setSpeed in interface ParticleInitializersetSpeed in class BaseEmitterspeed - The magnitude of the speed to use
public 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 direction
|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||