|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcs567.particles.ParticleSystem
public class ParticleSystem
Maintains dynamic lists of Particle and Force objects, and provides access to their state for numerical integration of dynamics.
Constructor Summary | |
---|---|
ParticleSystem()
Basic constructor. |
Method Summary | |
---|---|
void |
addForce(Force f)
Adds a force object (until removed) |
void |
advanceTime(double dt)
Incomplete/Debugging implementation of Forward-Euler step. |
Particle |
createParticle(javax.vecmath.Point2d p0)
Creates particle and adds it to the particle system. |
void |
display(javax.media.opengl.GL gl)
Displays Particle and Force objects. |
Particle |
getNearestParticle(javax.vecmath.Point2d x)
Helper-function that computes nearest particle to the specified (deformed) position. |
void |
removeForce(Force f)
Useful for removing temporary forces, such as user-interaction spring forces. |
void |
reset()
Moves all particles to undeformed/materials positions, and sets all velocities to zero. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParticleSystem()
Method Detail |
---|
public void addForce(Force f)
public void removeForce(Force f)
public Particle createParticle(javax.vecmath.Point2d p0)
p0
- Undeformed/material position.
public Particle getNearestParticle(javax.vecmath.Point2d x)
public void reset()
public void advanceTime(double dt)
public void display(javax.media.opengl.GL gl)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |