Package | Description |
---|---|
org.gicentre.utils.network.traer.physics |
Physics library for use with Processing.
|
Modifier and Type | Class and Description |
---|---|
class |
Attraction
This class implements TwoBodyForce to represent an inverse-square law force with a force
constant and minimal distance.
|
class |
Spring
Class for representing a physical spring by extending
TwoBodyForce to calculate
the force with a spring constant (Spring.ks ), damping factor (Spring.d ), and an
ideal length (Spring.l ). |
class |
TargetedForce
A
Force that has its subject Particle s already specified, and hence does
not support the Force.apply(Particle) method. |
class |
TwoBodyForce
TwoBodyForce is
Force between two specified Particle s, which extends
TargetedForce and simplifies implementation of custom Forces. |
class |
UniversalForce
A
Force that is applied to Particle s at the user's discretion, and hence
does not support the Force.apply() method. |
Modifier and Type | Method and Description |
---|---|
AbstractForce |
UniversalForce.apply()
|
AbstractForce |
ParticleSystem.getCustomForce(int i)
Provides the custom force at the given position in the collection of custom forces stored in this particle system.
|
AbstractForce |
ParticleSystem.removeCustomForce(int i)
Removes the custom force at the given position in the collection of custom forces stored in this particle system.
|
AbstractForce |
AbstractForce.turnOff()
Turns the force off.
|
AbstractForce |
AbstractForce.turnOn()
Turns the force on.
|
AbstractForce |
AbstractForce.turnOn(boolean isOn)
Sets the force to the given state.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<AbstractForce> |
ParticleSystem.customForces()
Deprecated.
Replace in favour of the more consistently named getCustomForces().
|
java.util.Collection<AbstractForce> |
ParticleSystem.getCustomForces()
Provides a collection of the custom forces currently defined as part of this particle system.
|
Modifier and Type | Method and Description |
---|---|
ParticleSystem |
ParticleSystem.addCustomForce(AbstractForce customForce)
Adds a custom force to those in this particle system.
|
ParticleSystem |
ParticleSystem.removeCustomForce(AbstractForce customForce)
Removes the given custom force from the collection of custom forces stored in this particle system if it exists.
|