|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.effect.particle.AbstractParticleEffect
public abstract class AbstractParticleEffect
This class represents an abstract particle effect. It uses particles and particle containers
Constructor Summary | |
---|---|
AbstractParticleEffect(float x,
float y,
float z,
float size,
int numberOfParticles,
long maxPartAge,
long creationIntervall)
Creates a new particle effect with the specified parameters |
Method Summary | |
---|---|
void |
draw(javax.media.opengl.GL gl)
Draws the particle effect to the scene. |
long |
getCreationInterval()
Returns the particle creation interval. |
long |
getMaxPartAge()
Returns the max particle age. |
int |
getMaxParticleCount()
Returns the maximum number of particles for the effect at the same time. |
float |
getParticleSize()
Returns the particle size. |
Point3D |
getPosition()
Returns the position of the particle effect |
java.lang.String |
getTexturePath()
Returns the path to the assigned texture, null else. |
void |
setEnabled(boolean enable)
Sets whether the particle effect shall be drawn |
void |
setPosition(float x,
float y,
float z)
Sets the position of the effect |
void |
setPosition(Point3D position)
Sets the position of the effect |
void |
setTexture(java.lang.String path)
Assigns the texture associated to the specified file path to the particle effect. |
void |
update(long elapsedTime)
Updates the particles of the particle effect |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractParticleEffect(float x, float y, float z, float size, int numberOfParticles, long maxPartAge, long creationIntervall)
x
- x-coordinatey
- y-coordinatez
- z-coordinatesize
- particle sizenumberOfParticles
- number of maximum particles to usemaxPartAge
- maximum age of a particlecreationIntervall
- intervall between the generation of two
particles (in miliseconds)Method Detail |
---|
public long getMaxPartAge()
public float getParticleSize()
public long getCreationInterval()
public int getMaxParticleCount()
public void setPosition(Point3D position)
position
- effect's positionpublic void setPosition(float x, float y, float z)
x
- x-coordinatey
- y-coordinatez
- z-coordinatepublic Point3D getPosition()
public void setTexture(java.lang.String path)
path
- path the texturepublic java.lang.String getTexturePath()
null
else.
public void setEnabled(boolean enable)
enable
- draw particle effect? --> true = yes, false = nopublic void draw(javax.media.opengl.GL gl)
gl
- public void update(long elapsedTime)
elapsedTime
- time between two frames
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |