Physical entity that exists within a World. More...
#include <Body.hpp>
Public Types | |
enum | Flag : FlagsType { e_awakeFlag = FlagsType(0x0002), e_autoSleepFlag = FlagsType(0x0004), e_impenetrableFlag = FlagsType(0x0008), e_fixedRotationFlag = FlagsType(0x0010), e_enabledFlag = FlagsType(0x0020), e_velocityFlag = FlagsType(0x0080), e_accelerationFlag = FlagsType(0x0100), e_massDataDirtyFlag = FlagsType(0x0200) } |
Flag enumeration. More... | |
using | FlagsType = std::uint16_t |
Flags type. More... | |
Public Member Functions | |
Body (const BodyConf &bd=GetDefaultBodyConf()) noexcept | |
Initializing constructor. More... | |
const Transformation & | GetTransformation () const noexcept |
Gets the body transform for the body's origin. More... | |
void | SetTransformation (const Transformation &value) noexcept |
Sets the body's transformation. More... | |
const Sweep & | GetSweep () const noexcept |
Gets the body's sweep. More... | |
Velocity | GetVelocity () const noexcept |
Gets the velocity. More... | |
void | SetVelocity (const Velocity &velocity) noexcept |
Sets the body's velocity (linear and angular velocity). More... | |
void | JustSetVelocity (Velocity value) noexcept |
Sets the body's velocity. More... | |
void | SetAcceleration (LinearAcceleration2 linear, AngularAcceleration angular) noexcept |
Sets the linear and rotational accelerations on this body. More... | |
LinearAcceleration2 | GetLinearAcceleration () const noexcept |
Gets this body's linear acceleration. More... | |
AngularAcceleration | GetAngularAcceleration () const noexcept |
Gets this body's angular acceleration. More... | |
InvMass | GetInvMass () const noexcept |
Gets the inverse total mass of the body. More... | |
void | SetInvMass (InvMass v) noexcept |
Sets the inverse mass. More... | |
InvRotInertia | GetInvRotInertia () const noexcept |
Gets the inverse rotational inertia of the body. More... | |
void | SetInvRotInertia (InvRotInertia v) noexcept |
Sets the inverse rotational inertia. More... | |
Frequency | GetLinearDamping () const noexcept |
Gets the linear damping of the body. More... | |
void | SetLinearDamping (NonNegative< Frequency > linearDamping) noexcept |
Sets the linear damping of the body. More... | |
Frequency | GetAngularDamping () const noexcept |
Gets the angular damping of the body. More... | |
void | SetAngularDamping (NonNegative< Frequency > angularDamping) noexcept |
Sets the angular damping of the body. More... | |
BodyType | GetType () const noexcept |
Gets the type of this body. More... | |
void | SetType (BodyType value) noexcept |
Sets the type of this body. More... | |
bool | IsSpeedable () const noexcept |
Is "speedable". More... | |
bool | IsAccelerable () const noexcept |
Is "accelerable". More... | |
bool | IsImpenetrable () const noexcept |
Is this body treated like a bullet for continuous collision detection? More... | |
void | SetImpenetrable () noexcept |
Sets the impenetrable status of this body. More... | |
void | UnsetImpenetrable () noexcept |
Unsets the impenetrable status of this body. More... | |
bool | IsSleepingAllowed () const noexcept |
Gets whether or not this body allowed to sleep. More... | |
void | SetSleepingAllowed (bool flag) noexcept |
Sets whether or not this body is allowed to sleep. More... | |
bool | IsAwake () const noexcept |
Gets the awake/asleep state of this body. More... | |
void | SetAwake () noexcept |
Awakens this body. More... | |
void | UnsetAwake () noexcept |
Sets this body to asleep if sleeping is allowed. More... | |
Time | GetUnderActiveTime () const noexcept |
Gets this body's under-active time value. More... | |
void | SetUnderActiveTime (Time value) noexcept |
Sets the "under-active" time to the given value. More... | |
void | ResetUnderActiveTime () noexcept |
Resets the under-active time for this body. More... | |
bool | IsFixedRotation () const noexcept |
Does this body have fixed rotation? More... | |
void | SetFixedRotation (bool flag) |
Sets this body to have fixed rotation. More... | |
void | SetAwakeFlag () noexcept |
Sets the body's awake flag. More... | |
void | UnsetAwakeFlag () noexcept |
Unsets the body's awake flag. More... | |
bool | IsMassDataDirty () const noexcept |
Gets whether the mass data for this body is "dirty". More... | |
void | SetMassDataDirty () noexcept |
Sets this body to have the mass data dirty state. More... | |
void | UnsetMassDataDirty () noexcept |
Unsets the body from being in the mass data dirty state. More... | |
bool | IsEnabled () const noexcept |
Gets the enabled/disabled state of the body. More... | |
void | SetEnabled () noexcept |
Sets the enabled state. More... | |
void | UnsetEnabled () noexcept |
Unsets the enabled flag. More... | |
void | SetSweep (const Sweep &value) noexcept |
Sets the sweep value of the given body. More... | |
void | SetPosition0 (const Position value) noexcept |
Sets the "position 0" value of the body to the given position. More... | |
void | SetPosition1 (const Position value) noexcept |
Sets the body sweep's "position 1" value. More... | |
void | ResetAlpha0 () noexcept |
Resets the given body's "alpha-0" value. More... | |
void | Restore (const Sweep &value) noexcept |
Restores the given body's sweep to the given sweep value. More... | |
void | Advance0 (Real value) noexcept |
Calls the body sweep's Advance0 method to advance to the given value. More... | |
void | Advance (Real value) noexcept |
Advances the body by a given time ratio. More... | |
Static Public Member Functions | |
static FlagsType | GetFlags (BodyType type) noexcept |
Gets the flags for the given value. | |
static FlagsType | GetFlags (const BodyConf &bd) noexcept |
Gets the flags for the given value. More... | |
Private Attributes | |
Transformation | m_xf |
Transformation for body origin. More... | |
Sweep | m_sweep |
Sweep motion for CCD. 36-bytes. More... | |
FlagsType | m_flags = 0 |
Flags. 2-bytes. | |
LinearVelocity2 | m_linearVelocity = LinearVelocity2{} |
Linear velocity. More... | |
LinearAcceleration2 | m_linearAcceleration = LinearAcceleration2{} |
Linear acceleration. More... | |
AngularVelocity | m_angularVelocity = AngularVelocity{} |
Angular velocity. More... | |
AngularAcceleration | m_angularAcceleration = AngularAcceleration{0} |
Angular acceleration. More... | |
InvMass | m_invMass = 0 |
Inverse mass of the body. More... | |
InvRotInertia | m_invRotI = 0 |
Inverse rotational inertia about the center of mass. More... | |
NonNegative< Frequency > | m_linearDamping {} |
Linear damping. 4-bytes. | |
NonNegative< Frequency > | m_angularDamping {} |
Angular damping. 4-bytes. | |
Time | m_underActiveTime = 0 |
Under-active time. More... | |
Related Functions | |
(Note that these are not member functions.) | |
BodyType | GetType (const Body &body) noexcept |
Gets the type of this body. More... | |
void | SetType (Body &body, BodyType value) noexcept |
Sets the type of this body. More... | |
bool | IsSpeedable (const Body &body) noexcept |
Is "speedable". More... | |
bool | IsAccelerable (const Body &body) noexcept |
Is "accelerable". More... | |
bool | IsImpenetrable (const Body &body) noexcept |
Is this body treated like a bullet for continuous collision detection? More... | |
void | SetImpenetrable (Body &body) noexcept |
Sets the impenetrable status of this body. More... | |
void | UnsetImpenetrable (Body &body) noexcept |
Unsets the impenetrable status of this body. More... | |
bool | IsSleepingAllowed (const Body &body) noexcept |
Gets whether or not this body allowed to sleep. More... | |
void | SetSleepingAllowed (Body &body, bool value) noexcept |
You can disable sleeping on this body. If you disable sleeping, the body will be woken. More... | |
bool | IsEnabled (const Body &body) noexcept |
Gets the enabled/disabled state of the body. More... | |
void | SetEnabled (Body &body) noexcept |
Sets the enabled state. More... | |
void | UnsetEnabled (Body &body) noexcept |
Unsets the enabled state. More... | |
void | SetEnabled (Body &body, bool value) noexcept |
Sets the enabled state to the given value. More... | |
bool | IsAwake (const Body &body) noexcept |
Gets the awake/asleep state of this body. More... | |
void | SetAwake (Body &body) noexcept |
Awakens this body. More... | |
void | UnsetAwake (Body &body) noexcept |
Sets this body to asleep if sleeping is allowed. More... | |
Transformation | GetTransformation (const Body &body) noexcept |
Gets the body's transformation. More... | |
void | SetTransformation (Body &body, Transformation value) noexcept |
Sets the body's transformation. More... | |
Length2 | GetLocation (const Body &body) noexcept |
Gets the body's origin location. More... | |
const Sweep & | GetSweep (const Body &body) noexcept |
Gets the body's sweep. More... | |
void | SetSweep (Body &body, const Sweep &value) noexcept |
Sets the sweep value of the given body. More... | |
Position | GetPosition1 (const Body &body) noexcept |
Gets the "position 1" Position information for the given body. | |
Angle | GetAngle (const Body &body) noexcept |
Gets the body's angle. More... | |
Position | GetPosition (const Body &body) noexcept |
Gets the body's position. | |
Time | GetUnderActiveTime (const Body &body) noexcept |
Gets the given body's under-active time. More... | |
bool | IsFixedRotation (const Body &body) noexcept |
Does this body have fixed rotation? More... | |
void | SetFixedRotation (Body &body, bool value) |
Sets this body to have fixed rotation. More... | |
bool | IsMassDataDirty (const Body &body) noexcept |
Gets whether the mass data for this body is "dirty". | |
InvMass | GetInvMass (const Body &body) noexcept |
Gets the inverse total mass of the body. More... | |
InvRotInertia | GetInvRotInertia (const Body &body) noexcept |
Gets the inverse rotational inertia of the body. More... | |
Frequency | GetLinearDamping (const Body &body) noexcept |
Gets the linear damping of the body. More... | |
void | SetLinearDamping (Body &body, NonNegative< Frequency > value) noexcept |
Sets the linear damping of the body. More... | |
Frequency | GetAngularDamping (const Body &body) noexcept |
Gets the angular damping of the body. More... | |
void | SetAngularDamping (Body &body, NonNegative< Frequency > value) noexcept |
Sets the angular damping of the body. More... | |
Acceleration | GetAcceleration (const Body &body) noexcept |
Gets the given body's acceleration. More... | |
void | SetAcceleration (Body &body, Acceleration value) noexcept |
Sets the accelerations on the given body. More... | |
LinearAcceleration2 | GetLinearAcceleration (const Body &body) noexcept |
Gets this body's linear acceleration. More... | |
AngularAcceleration | GetAngularAcceleration (const Body &body) noexcept |
Gets this body's angular acceleration. More... | |
bool | Awaken (Body &body) noexcept |
Awakens the body if it's asleep. More... | |
bool | Unawaken (Body &body) noexcept |
Puts the body to sleep if it's awake. More... | |
Mass | GetMass (const Body &body) noexcept |
Gets the mass of the body. More... | |
void | SetMass (Body &body, Mass mass) |
Sets the mass of the given body. | |
void | SetAcceleration (Body &body, LinearAcceleration2 linear, AngularAcceleration angular) noexcept |
Sets the linear and rotational accelerations on this body. More... | |
void | SetAcceleration (Body &body, LinearAcceleration2 value) noexcept |
Sets the given linear acceleration of the given body. More... | |
void | SetAcceleration (Body &body, AngularAcceleration value) noexcept |
Sets the given angular acceleration of the given body. More... | |
RotInertia | GetRotInertia (const Body &body) noexcept |
Gets the rotational inertia of the body. More... | |
RotInertia | GetLocalRotInertia (const Body &body) noexcept |
Gets the rotational inertia of the body about the local origin. More... | |
Velocity | GetVelocity (const Body &body) noexcept |
Gets the velocity. More... | |
void | SetVelocity (Body &body, const Velocity &value) noexcept |
Sets the body's velocity (linear and angular velocity). More... | |
LinearVelocity2 | GetLinearVelocity (const Body &body) noexcept |
Gets the linear velocity of the center of mass. More... | |
AngularVelocity | GetAngularVelocity (const Body &body) noexcept |
Gets the angular velocity. More... | |
void | SetVelocity (Body &body, LinearVelocity2 value) noexcept |
Sets the linear velocity of the center of mass. More... | |
void | SetVelocity (Body &body, AngularVelocity value) noexcept |
Sets the angular velocity. More... | |
Length2 | GetWorldPoint (const Body &body, const Length2 localPoint) noexcept |
Gets the world coordinates of a point given in coordinates relative to the body's origin. More... | |
Length2 | GetWorldVector (const Body &body, const Length2 localVector) noexcept |
Gets the world coordinates of a vector given the local coordinates. More... | |
UnitVec | GetWorldVector (const Body &body, const UnitVec localVector) noexcept |
Gets the world vector for the given local vector from the given body's transformation. | |
Length2 | GetLocalPoint (const Body &body, const Length2 worldPoint) noexcept |
Gets a local point relative to the body's origin given a world point. More... | |
UnitVec | GetLocalVector (const Body &body, const UnitVec uv) noexcept |
Gets a locally oriented unit vector given a world oriented unit vector. More... | |
LinearVelocity2 | GetLinearVelocityFromWorldPoint (const Body &body, const Length2 worldPoint) noexcept |
Gets the linear velocity from a world point attached to this body. More... | |
LinearVelocity2 | GetLinearVelocityFromLocalPoint (const Body &body, const Length2 localPoint) noexcept |
Gets the linear velocity from a local point. More... | |
Force2 | GetForce (const Body &body) noexcept |
Gets the net force that the given body is currently experiencing. | |
Torque | GetTorque (const Body &body) noexcept |
Gets the net torque that the given body is currently experiencing. | |
Velocity | GetVelocity (const Body &body, Time h) noexcept |
Gets the velocity of the body after the given time accounting for the body's acceleration and capped by the given configuration. More... | |
void | ApplyLinearImpulse (Body &body, Momentum2 impulse, Length2 point) noexcept |
Applies an impulse at a point. More... | |
void | ApplyAngularImpulse (Body &body, AngularMomentum impulse) noexcept |
Applies an angular impulse. More... | |
bool | operator== (const Body &lhs, const Body &rhs) |
Equals operator. | |
bool | operator!= (const Body &lhs, const Body &rhs) |
Not-equals operator. | |
BodyConf | GetBodyConf (const Body &body) noexcept |
Gets the body definition for the given body. More... | |
Physical entity that exists within a World.
A rigid body entity created or destroyed through a World instance. These have physical properties like: position, velocity, acceleration, and mass.
World::CreateBody
method. World::Destroy(BodyID)
method. using playrho::d2::Body::FlagsType = std::uint16_t |
Flags type.
enum playrho::d2::Body::Flag : FlagsType |
Flag enumeration.
Enumerator | |
---|---|
e_awakeFlag | Awake flag. |
e_autoSleepFlag | Auto sleep flag. |
e_impenetrableFlag | Impenetrable flag. Indicates whether CCD should be done for this body. All static and kinematic bodies have this flag enabled. |
e_fixedRotationFlag | Fixed rotation flag. |
e_enabledFlag | Enabled flag. |
e_velocityFlag | Velocity flag. Set this to enable changes in position due to velocity. Bodies with this set are "speedable" - either kinematic or dynamic bodies. |
e_accelerationFlag | Acceleration flag. Set this to enable changes in velocity due to physical properties (like forces). Bodies with this set are "accelerable" - dynamic bodies. |
e_massDataDirtyFlag | Mass Data Dirty Flag. |
|
explicitnoexcept |
Initializing constructor.
World::CreateBody
. bd | Configuration data for the body to construct. |
m_flags
state will be set to the value of GetFlags(const BodyConf&)
given bd. GetLinearDamping()
will return the value of bd.linearDamping. GetAngularDamping()
will return the value of bd.angularDamping. GetInvMass()
will return Real(0)/Kilogram
if bd.type != BodyType::Dynamic
, otherwise it will return Real(1)/Kilogram
. GetTransformation()
will return the value of playrho::d2::GetTransformation(const BodyConf&)
given bd. GetVelocity()
will return the value as if SetVelocity(const Velocity&)
had been called with the values of bd.linearVelocity and bd.angularVelocity as the velocity. GetAcceleration()
will return the value as if SetAcceleration(LinearAcceleration2, AngularAcceleration)
had been called with the values of bd.linearAcceleration and bd.angularAcceleration.
|
inlinenoexcept |
Advances the body by a given time ratio.
This method:
value | Valid new time factor in [0,1) to advance the sweep to. |
|
inlinenoexcept |
Calls the body sweep's Advance0
method to advance to the given value.
|
inlinenoexcept |
Gets this body's angular acceleration.
|
inlinenoexcept |
Gets the angular damping of the body.
|
staticnoexcept |
Gets the flags for the given value.
GetFlags(bd.type)
.
|
inlinenoexcept |
Gets the inverse total mass of the body.
This is the cached result of dividing 1 by the body's mass. Often floating division is much slower than multiplication. As such, it's likely faster to multiply values by this inverse value than to redivide them all the time by the mass.
|
inlinenoexcept |
Gets the inverse rotational inertia of the body.
This is the cached result of dividing 1 by the body's rotational inertia. Often floating division is much slower than multiplication. As such, it's likely faster to multiply values by this inverse value than to redivide them all the time by the rotational inertia.
|
inlinenoexcept |
Gets this body's linear acceleration.
|
inlinenoexcept |
Gets the linear damping of the body.
|
inlinenoexcept |
|
inlinenoexcept |
Gets the body transform for the body's origin.
This gets the translation/location and rotation/direction of the body relative to its world. The location and direction of the body after stepping the world's physics simulations is dependent on a number of factors:
|
noexcept |
|
inlinenoexcept |
Gets this body's under-active time value.
|
inlinenoexcept |
Gets the velocity.
|
inlinenoexcept |
|
inlinenoexcept |
Gets the awake/asleep state of this body.
|
inlinenoexcept |
Gets the enabled/disabled state of the body.
|
inlinenoexcept |
Does this body have fixed rotation?
|
inlinenoexcept |
Is this body treated like a bullet for continuous collision detection?
|
inlinenoexcept |
Gets whether the mass data for this body is "dirty".
|
inlinenoexcept |
Gets whether or not this body allowed to sleep.
Referenced by UnsetAwake(), and UnsetAwakeFlag().
|
inlinenoexcept |
Is "speedable".
Is this body able to have a non-zero speed associated with it. Kinematic and Dynamic bodies are speedable. Static bodies are not.
Referenced by Advance(), Advance0(), SetAwake(), SetAwakeFlag(), SetPosition0(), SetPosition1(), SetSweep(), UnsetAwake(), and UnsetAwakeFlag().
|
inlinenoexcept |
Sets the body's velocity.
GetVelocity()
returns.
|
inlinenoexcept |
Resets the given body's "alpha-0" value.
|
inlinenoexcept |
Resets the under-active time for this body.
Referenced by SetAwake().
|
inlinenoexcept |
|
noexcept |
Sets the linear and rotational accelerations on this body.
linear | Linear acceleration. |
angular | Angular acceleration. |
|
inlinenoexcept |
Sets the angular damping of the body.
|
noexcept |
Awakens this body.
Sets this body to awake and resets its under-active time if it's a "speedable" body. This method has no effect otherwise.
IsAwake
method returns true. GetUnderActiveTime
method returns zero.
|
inlinenoexcept |
Sets the body's awake flag.
This is done unconditionally.
Referenced by SetAwake().
|
inlinenoexcept |
Sets the enabled state.
void playrho::d2::Body::SetFixedRotation | ( | bool | flag | ) |
Sets this body to have fixed rotation.
Referenced by playrho::d2::SetFixedRotation().
|
inlinenoexcept |
Sets the impenetrable status of this body.
Sets whether or not this body should be treated like a bullet for continuous collision detection.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Sets the linear damping of the body.
|
inlinenoexcept |
Sets this body to have the mass data dirty state.
|
inlinenoexcept |
|
inlinenoexcept |
Sets the body sweep's "position 1" value.
Referenced by playrho::d2::WorldImpl::UpdateBody().
|
inlinenoexcept |
Sets whether or not this body is allowed to sleep.
Use to enable/disable sleeping on this body. If you disable sleeping, the body will be woken.
|
inlinenoexcept |
|
inlinenoexcept |
Sets the body's transformation.
SetSweep
may also need to be called. GetTransformation()
will return the value set. Referenced by Restore(), and playrho::d2::WorldImpl::UpdateBody().
|
noexcept |
|
inlinenoexcept |
Sets the "under-active" time to the given value.
Sets the "under-active" time to a value of zero or a non-zero value if the body is "accelerable". Otherwise it does nothing.
|
noexcept |
Sets the body's velocity (linear and angular velocity).
|
noexcept |
Sets this body to asleep if sleeping is allowed.
If this body is allowed to sleep, this: sets the sleep state of the body to asleep, resets this body's under active time, and resets this body's velocity (linear and angular).
IsAwake
method returns false. GetUnderActiveTime
method returns zero. GetVelocity
method returns zero linear and zero angular speed.
|
inlinenoexcept |
|
inlinenoexcept |
Unsets the enabled flag.
|
inlinenoexcept |
Unsets the impenetrable status of this body.
Sets whether or not this body should be treated like a bullet for continuous collision detection.
|
inlinenoexcept |
Unsets the body from being in the mass data dirty state.
|
related |
Applies an angular impulse.
body | Body to apply the angular impulse to. |
impulse | Angular impulse to be applied. |
Applies an impulse at a point.
body | Body to apply the impulse to. |
impulse | the world impulse vector. |
point | the world position of the point of application. |
|
related |
Awakens the body if it's asleep.
|
related |
Gets the given body's acceleration.
body | Body whose acceleration should be returned. |
|
related |
Gets this body's angular acceleration.
Gets the angular damping of the body.
|
related |
Gets the angular velocity.
body | Body to get the angular velocity for. |
Gets the inverse total mass of the body.
This is the cached result of dividing 1 by the body's mass. Often floating division is much slower than multiplication. As such, it's likely faster to multiply values by this inverse value than to redivide them all the time by the mass.
|
related |
Gets the inverse rotational inertia of the body.
This is the cached result of dividing 1 by the body's rotational inertia. Often floating division is much slower than multiplication. As such, it's likely faster to multiply values by this inverse value than to redivide them all the time by the rotational inertia.
|
related |
Gets this body's linear acceleration.
Gets the linear damping of the body.
|
related |
Gets the linear velocity of the center of mass.
body | Body to get the linear velocity for. |
|
related |
Gets the linear velocity from a local point.
body | Body to get the linear velocity for. |
localPoint | point in local coordinates. |
|
related |
Gets the linear velocity from a world point attached to this body.
body | Body to get the linear velocity for. |
worldPoint | point in world coordinates. |
Gets a local point relative to the body's origin given a world point.
body | Body that the returned point should be relative to. |
worldPoint | point in world coordinates. |
|
related |
Gets the rotational inertia of the body about the local origin.
Gets a locally oriented unit vector given a world oriented unit vector.
body | Body that the returned vector should be relative to. |
uv | Unit vector in world orientation. |
Gets the body's origin location.
This is the location of the body's origin relative to its world. The location of the body after stepping the world's physics simulations is dependent on a number of factors:
Gets the mass of the body.
|
related |
Gets the rotational inertia of the body.
body | Body to get the rotational inertia for. |
Gets the body's sweep.
|
related |
Gets the body's transformation.
Gets the given body's under-active time.
Gets the velocity of the body after the given time accounting for the body's acceleration and capped by the given configuration.
body | Body to get the velocity for. |
h | Time elapsed to get velocity for. Behavior is undefined if this value is invalid. |
Gets the world coordinates of a point given in coordinates relative to the body's origin.
body | Body that the given point is relative to. |
localPoint | a point measured relative the the body's origin. |
Gets the world coordinates of a vector given the local coordinates.
body | Body that the given vector is relative to. |
localVector | a vector fixed in the body. |
|
related |
Is "accelerable".
Indicates whether this body is accelerable, i.e. whether it is effected by forces. Only Dynamic bodies are accelerable.
|
related |
Gets the awake/asleep state of this body.
|
related |
Gets the enabled/disabled state of the body.
|
related |
Does this body have fixed rotation?
|
related |
Is this body treated like a bullet for continuous collision detection?
|
related |
Gets whether or not this body allowed to sleep.
|
related |
Is "speedable".
Is this body able to have a non-zero speed associated with it. Kinematic and Dynamic bodies are speedable. Static bodies are not.
|
related |
Sets the accelerations on the given body.
body | Body whose acceleration should be set. |
value | Acceleration value to set. |
|
related |
Sets the given angular acceleration of the given body.
|
related |
Sets the linear and rotational accelerations on this body.
body | Body to set the acceleration of. |
linear | Linear acceleration. |
angular | Angular acceleration. |
|
related |
Sets the given linear acceleration of the given body.
|
related |
Sets the angular damping of the body.
|
related |
Awakens this body.
Sets this body to awake and resets its under-active time if it's a "speedable" body. This method has no effect otherwise.
IsAwake
method returns true. GetUnderActiveTime
method returns zero.
|
related |
Sets the enabled state.
|
related |
Sets the enabled state to the given value.
|
related |
Sets this body to have fixed rotation.
|
related |
Sets the impenetrable status of this body.
Sets whether or not this body should be treated like a bullet for continuous collision detection.
|
related |
Sets the linear damping of the body.
|
related |
You can disable sleeping on this body. If you disable sleeping, the body will be woken.
Sets the sweep value of the given body.
|
related |
Sets the body's transformation.
GetLocation
returns. Sets the type of this body.
|
related |
Sets the angular velocity.
body | Body to set the angular velocity of. |
value | the new angular velocity. |
Sets the body's velocity (linear and angular velocity).
|
related |
Sets the linear velocity of the center of mass.
body | Body to set the linear velocity of. |
value | the new linear velocity of the center of mass. |
|
related |
Puts the body to sleep if it's awake.
|
related |
Sets this body to asleep if sleeping is allowed.
If this body is allowed to sleep, this: sets the sleep state of the body to asleep, resets this body's under active time, and resets this body's velocity (linear and angular).
IsAwake
method returns false. GetUnderActiveTime
method returns zero. GetVelocity
method returns zero linear and zero angular speed.
|
related |
Unsets the enabled state.
|
related |
Unsets the impenetrable status of this body.
Sets whether or not this body should be treated like a bullet for continuous collision detection.
|
private |
|
private |
Angular velocity.
Referenced by GetVelocity(), JustSetVelocity(), SetFixedRotation(), and UnsetAwake().
|
private |
Inverse mass of the body.
A non-negative value. Can only be zero for non-accelerable bodies.
Referenced by GetInvMass(), and SetInvMass().
|
private |
Inverse rotational inertia about the center of mass.
A non-negative value.
Referenced by GetInvRotInertia(), and SetInvRotInertia().
|
private |
|
private |
|
private |
Sweep motion for CCD. 36-bytes.
Referenced by Advance(), Advance0(), GetSweep(), ResetAlpha0(), SetPosition0(), SetPosition1(), and SetSweep().
|
private |
Under-active time.
A body under-active for enough time should have their awake flag unset. I.e. if a body is under-active for long enough, it should go to sleep.
Referenced by GetUnderActiveTime(), ResetUnderActiveTime(), and UnsetAwake().
|
private |
Transformation for body origin.
GetTransform1(m_sweep)
. Referenced by Advance(), and GetTransformation().