Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## simogl.effect.particle
Class AbstractParticleEffect

    java.lang.Object
      simogl.effect.particle.AbstractParticleEffect

Direct Known Subclasses:
  ChimneySmoke, Explosion, Fire, Rain

    public abstract class AbstractParticleEffect

extends java.lang.Object

This class represents an abstract particle effect. It uses particles and particle containers

Author:
  Frank Bruns

Constructor Summary
`AbstractParticleEffect(float x, float y, float z, int numberOfParticles, long maxPartAge, long creationIntervall)` Creates a new particle effect with the specified parameters

Method Summary
`void` | `draw(javax.media.opengl.GL gl, long elapsedTime)` Draws the particle effect to the scene
`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` | `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

### AbstractParticleEffect

    public AbstractParticleEffect(float x,
                                  float y,
                                  float z,
                                  int numberOfParticles,
                                  long maxPartAge,
                                  long creationIntervall)

  Creates a new particle effect with the specified parameters

  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
    `z` - z-coordinate
    `numberOfParticles` - number of maximum particles to use
    `maxPartAge` - maximum age of a particle
    `creationIntervall` - intervall between the generation of two particles (in miliseconds)

Method Detail

### setPosition

    public void setPosition(Point3D position)

  Sets the position of the effect

  Parameters:
    `position` - effect's position

### setPosition

    public void setPosition(float x,
                            float y,
                            float z)

  Sets the position of the effect

  Parameters:
    `x` - x-coordinate
    `y` - y-coordinate
    `z` - z-coordinate

### setEnabled

    public void setEnabled(boolean enable)

  Sets whether the particle effect shall be drawn

  Parameters:
    `enable` - draw particle effect? --> true = yes, false = no

### draw

    public void draw(javax.media.opengl.GL gl,
                     long elapsedTime)

  Draws the particle effect to the scene

  Parameters:
    `gl` -
    `elapsedTime` - time between two fames

### update

    public void update(long elapsedTime)

  Updates the particles of the particle effect

  Parameters:
    `elapsedTime` - time between two frames

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD