Свойство | Type | Description | |
---|---|---|---|
FixtureCount | int | ||
Flags | TypeFlags | ||
Force | |||
I | float | ||
InvI | float | ||
InvMass | float | ||
IslandIndex | int | ||
Prev | |||
SleepTime | float | ||
Sweep | |||
Torque | float | ||
Xf |
Méthode | Description | |
---|---|---|
ApplyAngularImpulse ( float impulse ) : void |
Apply an angular impulse.
|
|
ApplyForce ( |
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.
|
|
ApplyForceToCenter ( |
Apply a force to the center of mass. This wakes up the body.
|
|
ApplyLinearImpulse ( |
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.
|
|
Body ( |
||
CreateFixture ( |
Creates a fixture and attach it to this body. Use this function if you need to set some fixture parameters, like friction. Otherwise you can create the fixture directly from a shape. If the density is non-zero, this function automatically updates the mass of the body. Contacts are not created until the next time step.
|
|
CreateFixture ( |
Creates a fixture from a shape and attach it to this body. This is a convenience function. Use FixtureDef if you need to set parameters like friction, restitution, user data, or filtering. If the density is non-zero, this function automatically updates the mass of the body.
|
|
DestroyFixture ( |
Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts associated with this fixture. This will automatically adjust the mass of the body if the body is dynamic and the fixture has positive density. All fixtures attached to a body are implicitly destroyed when the body is destroyed.
|
|
GetLinearVelocityFromLocalPoint ( |
Get the world velocity of a local point.
|
|
GetLinearVelocityFromLocalPointToOut ( |
||
GetLinearVelocityFromWorldPoint ( |
Get the world linear velocity of a world point attached to this body.
|
|
GetLinearVelocityFromWorldPointToOut ( |
||
GetLocalPoint ( |
Gets a local point relative to the body's origin given a world point.
|
|
GetLocalPointToOut ( |
||
GetLocalVector ( |
Gets a local vector given a world vector.
|
|
GetLocalVectorToOut ( |
||
GetLocalVectorToOutUnsafe ( |
||
GetMassData ( |
Get the mass data of the body. The rotational inertia is relative to the center of mass.
|
|
GetTransform ( ) : |
Get the body transform for the body's origin.
|
|
GetWorldPoint ( |
Get the world coordinates of a point given the local coordinates.
|
|
GetWorldPointToOut ( |
||
GetWorldVector ( |
Get the world coordinates of a vector given the local coordinates.
|
|
GetWorldVectorToOut ( |
||
GetWorldVectorToOutUnsafe ( |
||
ResetMassData ( ) : void |
This resets the mass properties to the sum of the mass properties of the fixtures. This normally does not need to be called unless you called setMassData to override the mass and you later want to reset the mass.
|
|
SetMassData ( |
Set the mass properties to override the mass properties of the fixtures. Note that this changes the center of mass position. Note that creating or destroying fixtures can also alter the mass. This function has no effect if the body isn't dynamic.
|
|
SetTransform ( |
Set the position of the body's origin and rotation. This breaks any contacts and wakes the other bodies. Manipulating a body's transform may cause non-physical behavior.
|
|
ShouldCollide ( |
This is used to prevent connected bodies from colliding. It may lie, depending on the collideConnected flag.
|
|
SynchronizeTransform ( ) : void |
Méthode | Description | |
---|---|---|
Advance ( float t ) : void | ||
SynchronizeFixtures ( ) : void |
public ApplyAngularImpulse ( float impulse ) : void | ||
impulse | float | the angular impulse in units of kg*m*m/s |
Résultat | void |
public ApplyForce ( |
||
force | the world force vector, usually in Newtons (N). | |
point | the world position of the point of application. | |
Résultat | void |
public ApplyForceToCenter ( |
||
force | the world force vector, usually in Newtons (N). | |
Résultat | void |
public ApplyLinearImpulse ( |
||
impulse | the world impulse vector, usually in N-seconds or kg-m/s. | |
point | the world position of the point of application. | |
Résultat | void |
public ApplyTorque ( float torque ) : void | ||
torque | float | about the z-axis (out of the screen), usually in N-m. |
Résultat | void |
public Body ( |
||
bd | ||
world | ||
Résultat | System |
public CreateFixture ( |
||
def | the fixture definition. | |
Résultat |
public CreateFixture ( |
||
shape | the shape to be cloned. | |
density | float | the shape density (set to zero for static bodies). |
Résultat |
public DestroyFixture ( |
||
fixture | the fixture to be removed. | |
Résultat | void |
public GetLinearVelocityFromLocalPoint ( |
||
localPoint | point in local coordinates. | |
Résultat |
public GetLinearVelocityFromLocalPointToOut ( |
||
localPoint | ||
result | ||
Résultat | void |
public GetLinearVelocityFromWorldPoint ( |
||
worldPoint | point in world coordinates. | |
Résultat |
public GetLinearVelocityFromWorldPointToOut ( |
||
worldPoint | ||
result | ||
Résultat | void |
public GetLocalPoint ( |
||
worldPoint | point in world coordinates. | |
Résultat |
public GetLocalPointToOut ( |
||
worldPoint | ||
result | ||
Résultat | void |
public GetLocalVector ( |
||
worldVector | vector in world coordinates. | |
Résultat |
public GetLocalVectorToOut ( |
||
worldVector | ||
result | ||
Résultat | void |
public GetLocalVectorToOutUnsafe ( |
||
worldVector | ||
result | ||
Résultat | void |
public GetMassData ( |
||
data | ||
Résultat | void |
public GetWorldPoint ( |
||
localPoint | a point on the body measured relative the the body's origin. | |
Résultat |
public GetWorldPointToOut ( |
||
localPoint | ||
result | ||
Résultat | void |
public GetWorldVector ( |
||
localVector | a vector fixed in the body. | |
Résultat |
public GetWorldVectorToOut ( |
||
localVector | ||
result | ||
Résultat | void |
public GetWorldVectorToOutUnsafe ( |
||
localVector | ||
result | ||
Résultat | void |
public SetMassData ( |
||
massData | the mass properties. | |
Résultat | void |
public SetTransform ( |
||
position | the world position of the body's local origin. | |
angle | float | the world rotation in radians. |
Résultat | void |