|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.effect.particle.AbstractParticle
de.rico.engine.effect.particle.DLParticle
public class DLParticle
This class represents a particle used as part of a particle system to produce graphical effects. It is realized as a display list. Note: Display list particles (DLParticle) can be slower than directly drawn particles (DDParticle). I suppose thuis is due to the need to create a dislplay list for everey particle.
Constructor Summary | |
---|---|
DLParticle(float size,
long maxAge)
Creates a new particle object with the specified parameters |
Method Summary | |
---|---|
void |
createDisplayList(javax.media.opengl.GL gl)
This method creates the display list for the particle object. |
void |
deleteDisplayList(javax.media.opengl.GL gl)
Deletes the particle's display list |
void |
draw(javax.media.opengl.GL gl,
float x,
float y,
float z,
com.sun.opengl.util.texture.Texture texture)
Draws the particle to the scene |
Methods inherited from class de.rico.engine.effect.particle.AbstractParticle |
---|
getAplha, getColor, getCurrentAge, getEndColor, getMass, getMaximumAge, getPosition, getRotation, getSize, getStartColor, getVelocity, setAlpha, setColor, setCurrentAge, setEndColor, setMass, setMaximumAge, setPosition, setPosition, setRotation, setRotation, setRotationFactor, setSize, setStartColor, setVelocity, setVelocity |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DLParticle(float size, long maxAge)
size
- size of the particlemaxAge
- maximum age the particle can reach (in miliseconds)Method Detail |
---|
public void deleteDisplayList(javax.media.opengl.GL gl)
gl
- public void createDisplayList(javax.media.opengl.GL gl)
gl
- public void draw(javax.media.opengl.GL gl, float x, float y, float z, com.sun.opengl.util.texture.Texture texture)
draw
in class AbstractParticle
gl
- x
- x-coordinatey
- y-coordinatez
- z-coordinatetexture
- texture to assign to the particel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |