j3d.org Code

org.j3d.geom.particle
Interface ParticleFunction

All Known Implementing Classes:
BoundingBoxParticleFunction, ColorRampFunction, FrameCountParticleFunction, GravityParticleFunction, MaxTimeParticleFunction, PhysicsFunction, WindParticleFunction

public interface ParticleFunction

ParticleFunction is the basic interface for functions that can modify the fields of a Particle. A function may act on any of the fields of a particle, though typically it is on the size and position. Some movement functions will modify the force/energy of a particle while others will convert the energy into position deltas.

Version:
$Revision: 2.0 $
Author:
Daniel Selman

Method Summary
 boolean apply(Particle particle)
          Apply this function to the given particle right now.
 boolean isEnabled()
          Check to see if this function has been enabled or not currently.
 boolean newFrame(int deltaT)
          Notification that the system is about to do an update of the particles and to do any system-level initialisation.
 void setEnabled(boolean state)
          Set the enabled state of this function.
 

Method Detail

isEnabled

boolean isEnabled()
Check to see if this function has been enabled or not currently.

Returns:
True if this is enabled

setEnabled

void setEnabled(boolean state)
Set the enabled state of this function. A disabled function will not be applied to particles during this update.

Parameters:
state - The new enabled state to set it to

apply

boolean apply(Particle particle)
Apply this function to the given particle right now.

Parameters:
particle - The particle that is being updated
Returns:
true if the particle continues to live, false otherwise

newFrame

boolean newFrame(int deltaT)
Notification that the system is about to do an update of the particles and to do any system-level initialisation.

Parameters:
deltaT - The elapsed time in milliseconds since the last frame
Returns:
true if this should force another update after this one

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org