Method | Description | |
---|---|---|
AddBody ( RigidBody body ) : void |
Adds a RigidBody to the world.
|
|
AddBody ( |
||
AddConstraint ( Constraint constraint ) : void |
Add a Constraint to the world.
|
|
Clear ( ) : void |
Removes all objects from the world and removes all memory cached objects.
|
|
JitterWorld ( |
Create a new instance of the World class.
|
|
RemoveBody ( RigidBody body ) : bool |
Removes a RigidBody from the world.
|
|
RemoveBody ( |
||
RemoveConstraint ( Constraint constraint ) : bool |
Add a Constraint to the world. Fast, O(1).
|
|
ResetResourcePools ( ) : void |
In Jitter many objects get added to stacks after they were used. If a new object is needed the old object gets removed from the stack and is reused. This saves some time and also garbage collections. Calling this method removes all cached objects from all stacks.
|
|
SetDampingFactors ( float angularDamping, float linearDamping ) : void |
Every computation Step the angular and linear velocity of a RigidBody gets multiplied by this value.
|
|
SetInactivityThreshold ( float angularVelocity, float linearVelocity, float time ) : void |
Sets parameters for the RigidBody deactivation process. If the bodies angular velocity is less than the angular velocity threshold and its linear velocity is lower then the linear velocity threshold for a specific time the body gets deactivated. A body can be reactivated by setting RigidBody.IsActive to true. A body gets also automatically reactivated if another moving object hits it or the CollisionIsland the object is in gets activated.
|
|
SetIterations ( int iterations, int smallIterations ) : void |
Jitter uses an iterativ approach to solve collisions and contacts. You can set the number of iterations Jitter should do. In general the more iterations the more stable a simulation gets but also costs computation time. The number of iterations for collision and contact should be between 3 - 30. More iterations means more stability and also a longer calculation time. |
|
Step ( float timestep, bool multithread ) : void |
Integrates the whole world a timestep further in time.
|
|
Step ( float totalTime, bool multithread, float timestep, int maxSteps ) : void |
Integrates the whole world several fixed timestep further in time.
|
Method | Description | |
---|---|---|
ArbiterCallback ( object obj ) : void | ||
CheckDeactivation ( ) : void | ||
CollisionDetected ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector point1, Jitter.LinearMath.JVector point2, Jitter.LinearMath.JVector normal, float penetration ) : void | ||
HandleArbiter ( int iterations, bool multiThreaded ) : void | ||
Integrate ( bool multithread ) : void | ||
IntegrateCallback ( object obj ) : void | ||
IntegrateForces ( ) : void | ||
RemoveBody ( RigidBody body, bool removeMassPoints ) : bool | ||
UpdateArbiterContacts ( |
||
UpdateContacts ( ) : void |
public AddBody ( RigidBody body ) : void | ||
body | RigidBody | The body which should be added. |
return | void |
public AddBody ( |
||
body | ||
return | void |
public AddConstraint ( Constraint constraint ) : void | ||
constraint | Constraint | The constraint which should be removed. |
return | void |
public JitterWorld ( |
||
collision | The collisionSystem which is used to detect
/// collisions. See for example: |
|
return | System |
public RemoveBody ( RigidBody body ) : bool | ||
body | RigidBody | The body which should be removed. |
return | bool |
public RemoveBody ( |
||
body | ||
return | bool |
public RemoveConstraint ( Constraint constraint ) : bool | ||
constraint | Constraint | The constraint which should be added. |
return | bool |
public SetDampingFactors ( float angularDamping, float linearDamping ) : void | ||
angularDamping | float | The factor multiplied with the angular velocity. /// The default value is 0.85. |
linearDamping | float | The factor multiplied with the linear velocity. /// The default value is 0.85 |
return | void |
public SetInactivityThreshold ( float angularVelocity, float linearVelocity, float time ) : void | ||
angularVelocity | float | The threshold value for the angular velocity. The default value /// is 0.1. |
linearVelocity | float | The threshold value for the linear velocity. The default value /// is 0.1 |
time | float | The threshold value for the time in seconds. The default value is 2. |
return | void |
public SetIterations ( int iterations, int smallIterations ) : void | ||
iterations | int | The number of contact iterations. Default value 10. |
smallIterations | int | The number of contact iteration used for smaller (two and three constraint) systems. Default value 4. |
return | void |
public Step ( float timestep, bool multithread ) : void | ||
timestep | float | The timestep in seconds. /// It should be small as possible to keep the simulation stable. /// The physics simulation shouldn't run slower than 60fps. /// (timestep=1/60). |
multithread | bool | If true the engine uses several threads to /// integrate the world. This is faster on multicore CPUs. |
return | void |
public Step ( float totalTime, bool multithread, float timestep, int maxSteps ) : void | ||
totalTime | float | The time to integrate. |
multithread | bool | If true the engine uses several threads to /// integrate the world. This is faster on multicore CPUs. |
timestep | float | The timestep in seconds. /// It should be small as possible to keep the simulation stable. /// The physics simulation shouldn't run slower than 60fps. /// (timestep=1/60). |
maxSteps | int | The maximum number of substeps. After that Jitter gives up /// to keep up with the given totalTime. |
return | void |