Property | Type | Description | |
---|---|---|---|
bodyID | int |
Method | Description | |
---|---|---|
AllowSleeping ( bool flag ) : void |
You can disable sleeping on this body.
|
|
ApplyForce ( System.Vector2 force, System.Vector2 point ) : void |
Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This wakes up the body.
|
|
ApplyImpulse ( System.Vector2 impulse, System.Vector2 point ) : void |
Apply an impulse at a point. This immediately modifies the velocity. It also modifies the angular velocity if the point of application is not at the center of mass. This wakes up the body.
|
|
ApplyTorque ( float torque ) : void |
Apply a torque. This affects the angular velocity without affecting the linear velocity of the center of mass. This wakes up the body.
|
|
CreateFixture ( |
Creates a fixture and attach it to this body. @warning This function is locked during callbacks.
|
|
DestroyFixture ( |
Destroy a fixture. This removes the fixture from the broad-phase and therefore destroys any contacts associated with this fixture. All fixtures attached to a body are implicitly destroyed when the body is destroyed. @warning This function is locked during callbacks.
|
|
Dispose ( ) : void | ||
GetAngle ( ) : float |
Get the angle in radians.
|
|
GetAngularDamping ( ) : float | ||
GetAngularVelocity ( ) : float |
Get the angular velocity.
|
|
GetControllerList ( ) : |
||
GetFixtureList ( ) : |
Get the list of all fixtures attached to this body.
|
|
GetInertia ( ) : float |
Get the central rotational inertia of the body.
|
|
GetJointList ( ) : |
Get the list of all joints attached to this body.
|
|
GetLinearDamping ( ) : float | ||
GetLinearVelocity ( ) : System.Vector2 |
Get the linear velocity of the center of mass.
|
|
GetLinearVelocityFromLocalPoint ( System.Vector2 localPoint ) : System.Vector2 |
Get the world velocity of a local point.
|
|
GetLinearVelocityFromWorldPoint ( System.Vector2 worldPoint ) : System.Vector2 |
Get the world linear velocity of a world point attached to this body.
|
|
GetLocalCenter ( ) : System.Vector2 |
Get the local position of the center of mass.
|
|
GetLocalPoint ( System.Vector2 worldPoint ) : System.Vector2 |
Gets a local point relative to the body's origin given a world point.
|
|
GetLocalVector ( System.Vector2 worldVector ) : System.Vector2 |
Gets a local vector given a world vector.
|
|
GetMass ( ) : float |
Get the total mass of the body.
|
|
GetMassData ( ) : |
Get the mass data of the body.
|
|
GetNext ( ) : |
Get the next body in the world's body list.
|
|
GetPosition ( ) : System.Vector2 |
Get the world body origin position.
|
|
GetTransform ( ) : Box2DX.Common.Transform |
Get the body Transform for the body's origin.
|
|
GetUserData ( ) : object |
Get the user data pointer that was provided in the body definition.
|
|
GetWorld ( ) : |
Get the parent world of this body.
|
|
GetWorldCenter ( ) : System.Vector2 |
Get the world position of the center of mass.
|
|
GetWorldPoint ( System.Vector2 localPoint ) : System.Vector2 |
Get the world coordinates of a point given the local coordinates.
|
|
GetWorldVector ( System.Vector2 localVector ) : System.Vector2 |
Get the world coordinates of a vector given the local coordinates.
|
|
IsAllowSleeping ( ) : bool | ||
IsBullet ( ) : bool |
Is this body treated like a bullet for continuous collision detection?
|
|
IsDynamic ( ) : bool |
Is this body dynamic (movable)?
|
|
IsFixedRotation ( ) : bool | ||
IsFrozen ( ) : bool |
Is this body frozen?
|
|
IsSleeping ( ) : bool |
Is this body sleeping (not simulating).
|
|
IsStatic ( ) : bool |
Is this body static (immovable)?
|
|
PutToSleep ( ) : void |
Put this body to sleep so it will stop simulating. This also sets the velocity to zero.
|
|
SetAngle ( float angle ) : void |
Set the world body angle.
|
|
SetAngularDamping ( float angularDamping ) : void | ||
SetAngularVelocity ( float w ) : void |
Set the angular velocity.
|
|
SetBullet ( bool flag ) : void |
Should this body be treated like a bullet for continuous collision detection?
|
|
SetFixedRotation ( bool fixedr ) : void | ||
SetLinearDamping ( float linearDamping ) : void | ||
SetLinearVelocity ( System.Vector2 v ) : void |
Set the linear velocity of the center of mass.
|
|
SetMass ( |
Set the mass properties. Note that this changes the center of mass position. If you are not sure how to compute mass properties, use SetMassFromShapes. The inertia tensor is assumed to be relative to the center of mass.
|
|
SetMassFromShapes ( ) : void |
Compute the mass properties from the attached shapes. You typically call this after adding all the shapes. If you add or remove shapes later, you may want to call this again. Note that this changes the center of mass position.
|
|
SetPosition ( System.Vector2 position ) : void |
Set the world body origin position.
|
|
SetStatic ( ) : void | ||
SetTransform ( Box2DX.Common.Transform xf ) : bool |
Set the position of the body's origin and rotation (radians). This breaks any contacts and wakes the other bodies. Note this is less efficient than the other overload - you should use that if the angle is available.
|
|
SetTransform ( System.Vector2 position, |
Set the position of the body's origin and rotation (radians). This breaks any contacts and wakes the other bodies.
|
|
SetTransform ( System.Vector2 position, Quaternion rotation ) : bool | ||
SetTransform ( System.Vector2 position, float angle ) : bool | ||
SetUserData ( object data ) : void |
Set the user data. Use this to store your application specific data.
|
|
WakeUp ( ) : void |
Wake up this body so it will begin simulating.
|
Method | Description | |
---|---|---|
Advance ( float t ) : void | ||
Body ( |
||
IsConnected ( |
||
SynchronizeFixtures ( ) : bool | ||
SynchronizeTransform ( ) : void |
public ApplyForce ( System.Vector2 force, System.Vector2 point ) : void | ||
force | System.Vector2 | The world force vector, usually in Newtons (N). |
point | System.Vector2 | The world position of the point of application. |
return | void |
public ApplyImpulse ( System.Vector2 impulse, System.Vector2 point ) : void | ||
impulse | System.Vector2 | The world impulse vector, usually in N-seconds or kg-m/s. |
point | System.Vector2 | The world position of the point of application. |
return | void |
public ApplyTorque ( float torque ) : void | ||
torque | float | Torque about the z-axis (out of the screen), usually in N-m. |
return | void |
public CreateFixture ( |
||
def | The fixture definition. | |
return |
public DestroyFixture ( |
||
fixture | The fixture to be removed. | |
return | void |
public GetControllerList ( ) : |
||
return |
public GetLinearVelocity ( ) : System.Vector2 | ||
return | System.Vector2 |
public GetLinearVelocityFromLocalPoint ( System.Vector2 localPoint ) : System.Vector2 | ||
localPoint | System.Vector2 | A point in local coordinates. |
return | System.Vector2 |
public GetLinearVelocityFromWorldPoint ( System.Vector2 worldPoint ) : System.Vector2 | ||
worldPoint | System.Vector2 | A point in world coordinates. |
return | System.Vector2 |
public GetLocalPoint ( System.Vector2 worldPoint ) : System.Vector2 | ||
worldPoint | System.Vector2 | A point in world coordinates. |
return | System.Vector2 |
public GetLocalVector ( System.Vector2 worldVector ) : System.Vector2 | ||
worldVector | System.Vector2 | A vector in world coordinates. |
return | System.Vector2 |
public GetTransform ( ) : Box2DX.Common.Transform | ||
return | Box2DX.Common.Transform |
public GetWorldPoint ( System.Vector2 localPoint ) : System.Vector2 | ||
localPoint | System.Vector2 | A point on the body measured relative the the body's origin. |
return | System.Vector2 |
public GetWorldVector ( System.Vector2 localVector ) : System.Vector2 | ||
localVector | System.Vector2 | A vector fixed in the body. |
return | System.Vector2 |
public SetAngle ( float angle ) : void | ||
angle | float | The new angle of the body in radians |
return | void |
public SetAngularDamping ( float angularDamping ) : void | ||
angularDamping | float | |
return | void |
public SetFixedRotation ( bool fixedr ) : void | ||
fixedr | bool | |
return | void |
public SetLinearDamping ( float linearDamping ) : void | ||
linearDamping | float | |
return | void |
public SetLinearVelocity ( System.Vector2 v ) : void | ||
v | System.Vector2 | The new linear velocity of the center of mass. |
return | void |
public SetMass ( |
||
massData | The mass properties. | |
return | void |
public SetPosition ( System.Vector2 position ) : void | ||
position | System.Vector2 | The new position of the body. |
return | void |
public SetTransform ( Box2DX.Common.Transform xf ) : bool | ||
xf | Box2DX.Common.Transform | The Transform of position and angle to set the body to. |
return | bool |
public SetTransform ( System.Vector2 position, |
||
position | System.Vector2 | The new world position of the body's origin (not necessarily /// the center of mass). |
rotation | ||
return | bool |
public SetTransform ( System.Vector2 position, Quaternion rotation ) : bool | ||
position | System.Vector2 | |
rotation | Quaternion | |
return | bool |
public SetTransform ( System.Vector2 position, float angle ) : bool | ||
position | System.Vector2 | |
angle | float | |
return | bool |