Property | Type | Description | |
---|---|---|---|
AwakeBodySet | HashSet | ||
addRemoveTime | float | ||
bodyList | List | ||
breakableBodyList | List |
||
contactManager | |||
contactsUpdateTime | float | ||
continuousPhysicsTime | float | ||
controllerList | List |
||
controllersUpdateTime | float | ||
enabled | bool | ||
gravity | Vector2 | ||
island | Island | ||
jointList | List |
||
newContactsTime | float | ||
onBodyAdded | BodyDelegate | ||
onBodyRemoved | BodyDelegate | ||
onControllerAdded | ControllerDelegate | ||
onControllerRemoved | ControllerDelegate | ||
onFixtureAdded | FixtureDelegate | ||
onFixtureRemoved | FixtureDelegate | ||
onJointAdded | JointDelegate | ||
onJointRemoved | JointDelegate | ||
solveUpdateTime | float | ||
updateTime | float |
Method | Description | |
---|---|---|
World ( Vector2 gravity ) : System |
Initializes a new instance of the World class.
|
|
addBreakableBody ( |
||
addController ( |
||
addJoint ( |
Create a joint to constrain bodies together. This may cause the connected bodies to cease colliding.
|
|
clear ( ) : void | ||
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.
|
|
overlapCircle ( Vector2 center, float radius ) : void | ||
processAddedBodies ( ) : void | ||
processAddedJoints ( ) : void | ||
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.
|
|
processRemovedBodies ( ) : void | ||
processRemovedJoints ( ) : void | ||
queryAABB ( AABB &aabb ) : List |
Query the world for all fixtures that potentially overlap the provided AABB. Use the overload with a callback for filtering and better performance.
|
|
queryAABB ( bool>.Func |
Query the world for all fixtures that potentially overlap the provided AABB. Inside the callback: Return true: Continues the query Return false: Terminate the query
|
|
rayCast ( Vector2 point1, Vector2 point2 ) : List |
||
rayCast ( Func |
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. Inside the callback: return -1: ignore this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip the ray and continue
|
|
removeBody ( Body body ) : void |
Destroy a rigid body. Warning: This automatically deletes all associated shapes and joints.
|
|
removeBreakableBody ( BreakableBody breakableBody ) : void | ||
removeController ( Controller controller ) : void | ||
removeJoint ( Joint joint ) : void |
Destroy a joint. This may cause the connected bodies to begin colliding.
|
|
removeJoint ( Joint joint, bool doCheck ) : void | ||
shiftOrigin ( Vector2 newOrigin ) : void | ||
solve ( TimeStep &timeStep ) : void | ||
step ( float dt ) : void |
Take a time step. This performs collision detection, integration, and consraint solution.
|
|
testPoint ( Vector2 point ) : Fixture | ||
testPointAll ( Vector2 point ) : List |
Returns a list of fixtures that are at the specified point.
|
Method | Description | |
---|---|---|
addBody ( |
Add a rigid body.
|
|
queryAABBCallbackWrapper ( int proxyId ) : bool | ||
rayCastCallbackWrapper ( RayCastInput rayCastInput, int proxyId ) : float | ||
testPointAllCallback ( Fixture fixture ) : bool | ||
testPointCallback ( Fixture fixture ) : bool |
public addBreakableBody ( |
||
breakableBody | ||
return | void |
public addController ( |
||
controller | ||
return | void |
public addJoint ( |
||
joint | The joint. | |
return | void |
public overlapCircle ( Vector2 center, float radius ) : void | ||
center | Vector2 | |
radius | float | |
return | void |
public queryAABB ( AABB &aabb ) : List |
||
aabb | AABB | The aabb query box. |
return | List |
public queryAABB ( bool>.Func |
||
callback | bool>.Func | A user implemented callback class. |
aabb | AABB | The aabb query box. |
return | void |
public rayCast ( Vector2 point1, Vector2 point2 ) : List |
||
point1 | Vector2 | |
point2 | Vector2 | |
return | List |
public rayCast ( Func |
||
callback | Func |
A user implemented callback class. |
point1 | Vector2 | The ray starting point. |
point2 | Vector2 | The ray ending point. |
return | void |
public removeBreakableBody ( BreakableBody breakableBody ) : void | ||
breakableBody | BreakableBody | |
return | void |
public removeController ( Controller controller ) : void | ||
controller | Controller | |
return | void |
public removeJoint ( Joint joint ) : void | ||
joint | Joint | The joint. |
return | void |
public removeJoint ( Joint joint, bool doCheck ) : void | ||
joint | Joint | |
doCheck | bool | |
return | void |
public shiftOrigin ( Vector2 newOrigin ) : void | ||
newOrigin | Vector2 | |
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 ContactManager,FarseerPhysics.Dynamics contactManager | ||
return |
public ControllerDelegate onControllerAdded | ||
return | ControllerDelegate |
public ControllerDelegate onControllerRemoved | ||
return | ControllerDelegate |