|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParticleInitializer
The ParticleInitializer is registered with a ParticleSystem and is responsible for creating and initialising the particles.
Method Summary | |
---|---|
void |
getColor(float[] val)
Get the value of the initial colour that particles are set to. |
float |
getLifetimeVariation()
Get the amount of variation in the lifetime of the particles generated. |
float |
getMass()
Get the current mass assigned to each particle. |
int |
getMaxParticleCount()
Fetch the current value of the maximum particle count. |
int |
getParticleLifetime()
Get the current maximum lifetime of the particles. |
float |
getParticleVariation()
Get the amount of variation in the properties of the particles generated. |
float |
getSpeed()
Get the current speed that particles are initialised with. |
float |
getSurfaceArea()
Get the current surface area assigned to particles. |
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 |
setColor(float r,
float g,
float b,
float alpha)
Set the initial color that that the particle is given. |
void |
setLifetimeVariation(float variation)
Change the variation factor for the emitted particles. |
void |
setMass(float mass)
Change the mass of the particle. |
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 |
setParticleVariation(float variation)
Change the variation factor for the particles' properties, and does not effect the lifetime variation. |
void |
setSpeed(float speed)
Change the initial speed that the particles are endowed with. |
void |
setSurfaceArea(float area)
Change the apparent surface area. |
Method Detail |
---|
void setMaxParticleCount(int maxCount)
maxCount
- The new maximum particle count to useint getMaxParticleCount()
void setParticleLifetime(int time) throws java.lang.IllegalArgumentException
time
- The new lifetime, in seconds
java.lang.IllegalArgumentException
- The lifetime is zero or negativeint getParticleLifetime()
void setLifetimeVariation(float variation) throws java.lang.IllegalArgumentException
variation
- The new variation amount
java.lang.IllegalArgumentException
- The variation amount was within [0,1]float getLifetimeVariation()
void setParticleVariation(float variation)
variation
- The new variation amountfloat getParticleVariation()
int numParticlesToCreate(int timeDelta)
timeDelta
- The delta between the last frame and this one in
milliseconds
boolean initialize(Particle particle)
particle
- The particle instance to initialize
void setColor(float r, float g, float b, float alpha)
r
- The red component of the colorg
- The green component of the colorb
- The blue component of the coloralpha
- The alpha component of the colorvoid getColor(float[] val)
val
- An array of length 4 to copy the internal values intovoid setSurfaceArea(float area) throws java.lang.IllegalArgumentException
area
- The new surface area value to use, in metres squared
java.lang.IllegalArgumentException
- The surface area value was negativefloat getSurfaceArea()
void setMass(float mass) throws java.lang.IllegalArgumentException
mass
- The mass of an individual particle
java.lang.IllegalArgumentException
- The mass value was negativefloat getMass()
void setSpeed(float speed)
speed
- The magnitude of the speed to usefloat getSpeed()
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |