Свойство | Тип | Описание | |
---|---|---|---|
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 |
Метод | Описание | |
---|---|---|
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.
|
Метод | Описание | |
---|---|---|
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 | ||
Результат | void |
public addController ( |
||
controller | ||
Результат | void |
public addJoint ( |
||
joint | The joint. | |
Результат | void |
public overlapCircle ( Vector2 center, float radius ) : void | ||
center | Vector2 | |
radius | float | |
Результат | void |
public queryAABB ( AABB &aabb ) : List |
||
aabb | AABB | The aabb query box. |
Результат | List |
public queryAABB ( bool>.Func |
||
callback | bool>.Func | A user implemented callback class. |
aabb | AABB | The aabb query box. |
Результат | void |
public rayCast ( Vector2 point1, Vector2 point2 ) : List |
||
point1 | Vector2 | |
point2 | Vector2 | |
Результат | List |
public rayCast ( Func |
||
callback | Func |
A user implemented callback class. |
point1 | Vector2 | The ray starting point. |
point2 | Vector2 | The ray ending point. |
Результат | void |
public removeBody ( Body body ) : void | ||
body | Body | The body. |
Результат | void |
public removeBreakableBody ( BreakableBody breakableBody ) : void | ||
breakableBody | BreakableBody | |
Результат | void |
public removeController ( Controller controller ) : void | ||
controller | Controller | |
Результат | void |
public removeJoint ( Joint joint ) : void | ||
joint | Joint | The joint. |
Результат | void |
public removeJoint ( Joint joint, bool doCheck ) : void | ||
joint | Joint | |
doCheck | bool | |
Результат | void |
public shiftOrigin ( Vector2 newOrigin ) : void | ||
newOrigin | Vector2 | |
Результат | void |
public step ( float dt ) : void | ||
dt | float | The amount of time to simulate, this should not vary. |
Результат | void |
public testPoint ( Vector2 point ) : Fixture | ||
point | Vector2 | |
Результат | Fixture |
public testPointAll ( Vector2 point ) : List |
||
point | Vector2 | The point. |
Результат | List |
public ContactManager,FarseerPhysics.Dynamics contactManager | ||
Результат |
public ControllerDelegate onControllerAdded | ||
Результат | ControllerDelegate |
public ControllerDelegate onControllerRemoved | ||
Результат | ControllerDelegate |
public FixtureDelegate onFixtureRemoved | ||
Результат | FixtureDelegate |