j3d.examples.particles.influences
Class Repulse
java.lang.Object
j3d.examples.particles.influences.Repulse
- All Implemented Interfaces:
- ExternalInfluenceInterface
public class Repulse
- extends java.lang.Object
- implements ExternalInfluenceInterface
Represents a point in space that repulses (accelerates away)
particles from that point based on the distance between the
particle and the repulsing point.
Constructor Summary |
Repulse()
|
Repulse(float aRate,
javax.vecmath.Point3f aLocation)
|
Method Summary |
void |
apply(Particle aParticle,
float dt)
Apply this (possibly time varying) influence
to the particle for the time interval. |
void |
initializeParticle(Particle aParticle)
Initialize a particle prior to the first emission. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Repulse
public Repulse()
Repulse
public Repulse(float aRate,
javax.vecmath.Point3f aLocation)
initializeParticle
public void initializeParticle(Particle aParticle)
- Description copied from interface:
ExternalInfluenceInterface
- Initialize a particle prior to the first emission.
- Specified by:
initializeParticle
in interface ExternalInfluenceInterface
- Parameters:
aParticle
- - the particle to initialize.
apply
public void apply(Particle aParticle,
float dt)
- Description copied from interface:
ExternalInfluenceInterface
- Apply this (possibly time varying) influence
to the particle for the time interval.
- Specified by:
apply
in interface ExternalInfluenceInterface
- Parameters:
aParticle
- - The particle to updatedt
- - The time interval (in seconds) since the last apply