simogl.effect.particle
Class DDParticle

java.lang.Object
  extended by simogl.effect.particle.AbstractParticle
      extended by simogl.effect.particle.DDParticle

public class DDParticle
extends AbstractParticle

This class represents a particle that uses the direct drawing technique.

Author:
Frank Bruns

Constructor Summary
DDParticle(float posX, float posY, float posZ, float velX, float velY, float velZ, long maxAge)
          Creates a new particle
DDParticle(float size, Point3D position, Point3D velocity, long maxAge)
          Creates a new particle
 
Method Summary
 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 simogl.effect.particle.AbstractParticle
getAplha, getColor, getCurrentAge, getFace, getMass, getMaximumAge, getPosition, getSize, getVelocity, setAlpha, setColor, setCurrentAge, setMass, setMaximumAge, setPosition, setPosition, setSize, setVelocity, setVelocity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDParticle

public DDParticle(float size,
                  Point3D position,
                  Point3D velocity,
                  long maxAge)
Creates a new particle

Parameters:
size - size of the particle
position - particle's position
velocity - particle's velocity
maxAge - maximum age the particle can reach (in miliseconds)

DDParticle

public DDParticle(float posX,
                  float posY,
                  float posZ,
                  float velX,
                  float velY,
                  float velZ,
                  long maxAge)
Creates a new particle

Parameters:
posX - x-coordinate
posY - y-coordinate
posZ - z-coordinate
velX - x-velocity
velY - y-velocity
velZ - z-velocity
maxAge - maximum age the particle can reach (in miliseconds)
Method Detail

draw

public 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

Specified by:
draw in class AbstractParticle
Parameters:
gl -
x - x-coordinate
y - y-coordinate
z - z-coordinate
texture - texture to assign to the particle