Property | Type | Description | |
---|---|---|---|
BodyAdded | BodyDelegate | ||
BodyRemoved | BodyDelegate | ||
Enabled | bool | ||
FixtureAdded | FixtureDelegate | ||
FixtureRemoved | FixtureDelegate | ||
Gravity | Vector2 | ||
Island | |||
JointAdded | JointDelegate | ||
JointRemoved | JointDelegate |
Method | Description | |
---|---|---|
AddBody ( |
Create a rigid body.
|
|
AddBreakableBody ( |
||
AddController ( |
||
AddJoint ( |
Create a joint to constrain bodies together. This may cause the connected bodies to cease colliding.
|
|
ClearForces ( ) : void |
Call this after you are done with time steps to clear the forces. You normally call this after each call to Step, unless you are performing sub-steps. By default, forces will be automatically cleared, so you don't need to call this function.
|
|
ProcessChanges ( ) : void |
All adds and removes are cached by the World duing a World step. To process the changes before the world updates again, call this method.
|
|
QueryAABB ( bool>.Func |
Query the world for all fixtures that potentially overlap the provided AABB.
|
|
RayCast ( RayCastCallback callback, Vector2 point1, Vector2 point2 ) : void |
Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the starting point.
|
|
RemoveBody ( |
Destroy a rigid body. Warning: This automatically deletes all associated shapes and joints.
|
|
RemoveBreakableBody ( |
||
RemoveController ( |
||
RemoveJoint ( |
Destroy a joint. This may cause the connected bodies to begin colliding.
|
|
Step ( float dt ) : void |
Take a time step. This performs collision detection, integration, and consraint solution.
|
|
TestPoint ( Vector2 point ) : |
||
TestPointAll ( Vector2 point ) : List |
Returns a list of fixtures that are at the specified point.
|
|
World ( Vector2 gravity ) : System |
Initializes a new instance of the World class.
|
Method | Description | |
---|---|---|
ProcessAddedBodies ( ) : void | ||
ProcessAddedJoints ( ) : void | ||
ProcessRemovedBodies ( ) : void | ||
ProcessRemovedJoints ( ) : void | ||
QueryAABBCallbackWrapper ( int proxyId ) : bool | ||
RayCastCallbackWrapper ( |
||
Solve ( |
||
SolveTOI ( |
Find TOI contacts and solve them.
|
public AddBreakableBody ( |
||
breakableBody | ||
return | void |
public AddController ( |
||
controller | ||
return | void |
public AddJoint ( |
||
joint | The joint. | |
return | void |
public QueryAABB ( bool>.Func |
||
callback | bool>.Func | A user implemented callback class. |
aabb | The aabb query box. | |
return | void |
public RayCast ( RayCastCallback callback, Vector2 point1, Vector2 point2 ) : void | ||
callback | RayCastCallback | A user implemented callback class. |
point1 | Vector2 | The ray starting point. |
point2 | Vector2 | The ray ending point. |
return | void |
public RemoveBreakableBody ( |
||
breakableBody | ||
return | void |
public RemoveController ( |
||
controller | ||
return | void |
public RemoveJoint ( |
||
joint | The joint. | |
return | void |
public Step ( float dt ) : void | ||
dt | float | The amount of time to simulate, this should not vary. |
return | void |
public TestPointAll ( Vector2 point ) : List |
||
point | Vector2 | The point. |
return | List |
public World ( Vector2 gravity ) : System | ||
gravity | Vector2 | The gravity. |
return | System |