|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Constraint
Interface for additional constraints.
The constraint has to be added to the world after creation.
It is considered in the simulation by calling the following methods
in the @link World.tick()
.
precalculate(float)
is called once initiallyapplyMomentum(float)
is called at each solving iterationpostStep()
is called once after the solving iteration
Field Summary | |
---|---|
static int |
JOINT
Type indicator for joints. |
static int |
MOTOR
Type indicator for motors. |
static int |
SCRIPT
Type indicator for scripts. |
static int |
SPRING
Type indicator for springs. |
Method Summary | |
---|---|
boolean |
applyMomentum(float invTimestepFX)
Applies the momentum to the body/bodies. |
boolean |
concernsBody(Body b)
Checks whether the constraint applies to a body. |
Constraint |
copy(Body[] bodyMapping)
Copies the constraint. |
boolean |
equals(Constraint other)
Checks for equality of two constraints. |
float |
getImpulseFX()
Gets the virtual work of the constraint. |
UserData |
getUserData()
|
void |
postStep()
Cleans up after constraint iteration. |
void |
precalculate(float invTimestepFX)
Precomputes static values. |
Field Detail |
---|
static final int JOINT
static final int SPRING
static final int SCRIPT
static final int MOTOR
Method Detail |
---|
void precalculate(float invTimestepFX)
invTimestepFX
- the inverse timestep of the simulationboolean applyMomentum(float invTimestepFX)
invTimestepFX
- the inverse timestep of the simulationvoid postStep()
float getImpulseFX()
Constraint copy(Body[] bodyMapping)
bodyMapping
- A mapping of the body indices from the old world to the new
boolean concernsBody(Body b)
b
- the body to check
boolean equals(Constraint other)
other
- the constraint to compare
UserData getUserData()
|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |