프로퍼티 | 타입 | 설명 | |
---|---|---|---|
FixtureCount | int | ||
Flags | TypeFlags | ||
Force | |||
I | float | ||
InvI | float | ||
InvMass | float | ||
IslandIndex | int | ||
Prev | |||
SleepTime | float | ||
Sweep | |||
Torque | float | ||
Xf |
메소드 | 설명 | |
---|---|---|
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 |
메소드 | 설명 | |
---|---|---|
Advance ( float t ) : void | ||
SynchronizeFixtures ( ) : void |
public ApplyAngularImpulse ( float impulse ) : void | ||
impulse | float | the angular impulse in units of kg*m*m/s |
리턴 | void |
public ApplyForce ( |
||
force | the world force vector, usually in Newtons (N). | |
point | the world position of the point of application. | |
리턴 | void |
public ApplyForceToCenter ( |
||
force | the world force vector, usually in Newtons (N). | |
리턴 | 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. | |
리턴 | void |
public ApplyTorque ( float torque ) : void | ||
torque | float | about the z-axis (out of the screen), usually in N-m. |
리턴 | void |
public CreateFixture ( |
||
def | the fixture definition. | |
리턴 |
public CreateFixture ( |
||
shape | the shape to be cloned. | |
density | float | the shape density (set to zero for static bodies). |
리턴 |
public DestroyFixture ( |
||
fixture | the fixture to be removed. | |
리턴 | void |
public GetLinearVelocityFromLocalPoint ( |
||
localPoint | point in local coordinates. | |
리턴 |
public GetLinearVelocityFromLocalPointToOut ( |
||
localPoint | ||
result | ||
리턴 | void |
public GetLinearVelocityFromWorldPoint ( |
||
worldPoint | point in world coordinates. | |
리턴 |
public GetLinearVelocityFromWorldPointToOut ( |
||
worldPoint | ||
result | ||
리턴 | void |
public GetLocalPoint ( |
||
worldPoint | point in world coordinates. | |
리턴 |
public GetLocalPointToOut ( |
||
worldPoint | ||
result | ||
리턴 | void |
public GetLocalVector ( |
||
worldVector | vector in world coordinates. | |
리턴 |
public GetLocalVectorToOut ( |
||
worldVector | ||
result | ||
리턴 | void |
public GetLocalVectorToOutUnsafe ( |
||
worldVector | ||
result | ||
리턴 | void |
public GetMassData ( |
||
data | ||
리턴 | void |
public GetWorldPoint ( |
||
localPoint | a point on the body measured relative the the body's origin. | |
리턴 |
public GetWorldPointToOut ( |
||
localPoint | ||
result | ||
리턴 | void |
public GetWorldVector ( |
||
localVector | a vector fixed in the body. | |
리턴 |
public GetWorldVectorToOut ( |
||
localVector | ||
result | ||
리턴 | void |
public GetWorldVectorToOutUnsafe ( |
||
localVector | ||
result | ||
리턴 | void |
public SetMassData ( |
||
massData | the mass properties. | |
리턴 | void |
public SetTransform ( |
||
position | the world position of the body's local origin. | |
angle | float | the world rotation in radians. |
리턴 | void |