A "body" physical entity. More...
#include <playrho/d2/Body.hpp>
Public Member Functions | |
Body (const BodyConf &bd=GetDefaultBodyConf()) | |
Initializing constructor. More... | |
void | Advance0 (ZeroToUnderOneFF< Real > value) noexcept |
Advances the body sweep's position 0 and alpha 0 values. More... | |
Body & | Attach (ShapeID shapeId) |
Adds the given shape identifier to the identifiers associated with this body. More... | |
bool | Detach (ShapeID shapeId) |
Removes the given shape identifier from the identifiers associated with this body. More... | |
AngularAcceleration | GetAngularAcceleration () const noexcept |
Gets this body's angular acceleration. More... | |
NonNegative< Frequency > | GetAngularDamping () const noexcept |
Gets the angular damping of the body. More... | |
NonNegativeFF< InvMass > | GetInvMass () const noexcept |
Gets the inverse total mass of the body. More... | |
NonNegativeFF< InvRotInertia > | GetInvRotInertia () const noexcept |
Gets the inverse rotational inertia of the body. More... | |
LinearAcceleration2 | GetLinearAcceleration () const noexcept |
Gets this body's linear acceleration. More... | |
NonNegative< Frequency > | GetLinearDamping () const noexcept |
Gets the linear damping of the body. More... | |
const std::vector< ShapeID > & | GetShapes () const noexcept |
Gets the identifiers of the shapes attached to this body. More... | |
const Sweep & | GetSweep () const noexcept |
Gets the body's sweep. More... | |
const Transformation & | GetTransformation () const noexcept |
Gets the body transform for the body's origin. More... | |
BodyType | GetType () const noexcept |
Gets the type of this body. More... | |
Time | GetUnderActiveTime () const noexcept |
Gets this body's under-active time value. More... | |
Velocity | GetVelocity () const noexcept |
Gets the velocity. More... | |
bool | IsAccelerable () const noexcept |
Is "accelerable". More... | |
bool | IsAwake () const noexcept |
Gets the awake/asleep state of this body. More... | |
constexpr bool | IsDestroyed () const noexcept |
Whether or not this was destroyed. More... | |
bool | IsEnabled () const noexcept |
Gets the enabled/disabled state of the body. More... | |
bool | IsFixedRotation () const noexcept |
Does this body have fixed rotation? More... | |
bool | IsImpenetrable () const noexcept |
Is this body treated like a bullet for continuous collision detection? More... | |
bool | IsMassDataDirty () const noexcept |
Gets whether the mass data for this body is "dirty". | |
bool | IsSleepingAllowed () const noexcept |
Gets whether or not this body allowed to sleep. More... | |
bool | IsSpeedable () const noexcept |
Is "speedable". More... | |
void | JustSetVelocity (const Velocity &value) noexcept |
void | ResetAlpha0 () noexcept |
Resets the given body's "alpha-0" value. More... | |
void | SetAcceleration (const LinearAcceleration2 &linear, AngularAcceleration angular) noexcept |
Sets the linear and rotational accelerations on this body. More... | |
void | SetAngularDamping (NonNegative< Frequency > angularDamping) noexcept |
Sets the angular damping of the body. More... | |
void | SetAwake () noexcept |
Awakens this body. More... | |
void | SetAwakeFlag () noexcept |
Sets the body's awake flag. More... | |
constexpr void | SetDestroyed () noexcept |
Sets the destroyed property. More... | |
void | SetEnabled () noexcept |
Sets the enabled state. More... | |
void | SetFixedRotation (bool flag) |
Sets this body to have fixed rotation. More... | |
void | SetImpenetrable () noexcept |
Sets the impenetrable status of this body. More... | |
void | SetInvMassData (NonNegative< InvMass > invMass, NonNegative< InvRotInertia > invRotI) noexcept |
Sets the inverse mass data and clears the mass-data-dirty flag. More... | |
void | SetLinearDamping (NonNegative< Frequency > linearDamping) noexcept |
Sets the linear damping of the 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 | SetShapes (std::vector< ShapeID > value) |
Sets the identifiers of the shapes attached to this body. More... | |
void | SetSleepingAllowed (bool flag) noexcept |
Sets whether or not this body is allowed to sleep. More... | |
void | SetSweep (const Sweep &value) noexcept |
Sets the body's sweep value. More... | |
void | SetType (BodyType value) noexcept |
Sets the type of this body. More... | |
void | SetUnderActiveTime (Time value) noexcept |
Sets the "under-active" time to the given value. More... | |
void | SetVelocity (const Velocity &value) noexcept |
Sets the body's velocity (linear and angular velocity). More... | |
void | UnsetAwake () noexcept |
Sets this body to asleep if sleeping is allowed. More... | |
void | UnsetAwakeFlag () noexcept |
Unsets the body's awake flag. More... | |
constexpr void | UnsetDestroyed () noexcept |
Unsets the destroyed property. More... | |
void | UnsetEnabled () noexcept |
Unsets the enabled flag. More... | |
void | UnsetImpenetrable () noexcept |
Unsets the impenetrable status of this body. More... | |
Static Public Attributes | |
static constexpr auto | DefaultAngularDamping = NonNegative<Frequency>{} |
Default angular damping. | |
static constexpr auto | DefaultLinearDamping = NonNegative<Frequency>{} |
Default linear damping. | |
Related Functions | |
(Note that these are not member functions.) | |
void | ApplyAngularImpulse (Body &body, AngularMomentum impulse) noexcept |
Applies an angular impulse. More... | |
void | ApplyLinearImpulse (Body &body, const Momentum2 &impulse, const Length2 &point) noexcept |
Applies an impulse at a point. More... | |
bool | Awaken (Body &body) noexcept |
Awakens the body if it's asleep. More... | |
Acceleration | GetAcceleration (const Body &body) noexcept |
Gets the given body's acceleration. More... | |
Angle | GetAngle (const Body &body) noexcept |
Gets the body's angle. More... | |
AngularAcceleration | GetAngularAcceleration (const Body &body) noexcept |
Gets this body's angular acceleration. More... | |
NonNegative< Frequency > | GetAngularDamping (const Body &body) noexcept |
Gets the angular damping of the body. More... | |
AngularVelocity | GetAngularVelocity (const Body &body) noexcept |
Gets the angular velocity. More... | |
BodyConf | GetBodyConf (const Body &body) |
Gets the body definition for the given body. More... | |
Force2 | GetForce (const Body &body) noexcept |
Gets the net force that the given body is currently experiencing. | |
NonNegativeFF< InvMass > | GetInvMass (const Body &body) noexcept |
Gets the inverse total mass of the body. More... | |
NonNegativeFF< InvRotInertia > | GetInvRotInertia (const Body &body) noexcept |
Gets the inverse rotational inertia of the body. More... | |
LinearAcceleration2 | GetLinearAcceleration (const Body &body) noexcept |
Gets this body's linear acceleration. More... | |
NonNegative< Frequency > | GetLinearDamping (const Body &body) noexcept |
Gets the linear damping of the body. More... | |
LinearVelocity2 | GetLinearVelocity (const Body &body) noexcept |
Gets the linear velocity of the center of mass. More... | |
LinearVelocity2 | GetLinearVelocityFromLocalPoint (const Body &body, const Length2 &localPoint) noexcept |
Gets the linear velocity from a local point. More... | |
LinearVelocity2 | GetLinearVelocityFromWorldPoint (const Body &body, const Length2 &worldPoint) noexcept |
Gets the linear velocity from a world point attached to this body. More... | |
Length2 | GetLocalPoint (const Body &body, const Length2 &worldPoint) noexcept |
Gets a local point relative to the body's origin given a world point. More... | |
RotInertia | GetLocalRotInertia (const Body &body) noexcept |
Gets the rotational inertia of the body about the local origin. More... | |
UnitVec | GetLocalVector (const Body &body, const UnitVec &uv) noexcept |
Gets a locally oriented unit vector given a world oriented unit vector. More... | |
Length2 | GetLocation (const Body &body) noexcept |
Gets the body's origin location. More... | |
Mass | GetMass (const Body &body) noexcept |
Gets the mass of the body. More... | |
Position | GetPosition (const Body &body) noexcept |
Gets the body's position. | |
Position | GetPosition0 (const Body &body) noexcept |
Gets the "position 0" Position information for the given body. | |
Position | GetPosition1 (const Body &body) noexcept |
Gets the "position 1" Position information for the given body. | |
RotInertia | GetRotInertia (const Body &body) noexcept |
Gets the rotational inertia of the body. More... | |
const std::vector< ShapeID > & | GetShapes (const Body &body) noexcept |
Gets the identifiers of the shapes attached to the body. | |
const Sweep & | GetSweep (const Body &body) noexcept |
Gets the body's sweep. More... | |
Torque | GetTorque (const Body &body) noexcept |
Gets the net torque that the given body is currently experiencing. | |
const Transformation & | GetTransformation (const Body &body) noexcept |
Gets the body's transformation. More... | |
BodyType | GetType (const Body &body) noexcept |
Gets the type of this body. More... | |
Time | GetUnderActiveTime (const Body &body) noexcept |
Gets the given body's under-active time. More... | |
Velocity | GetVelocity (const Body &body) noexcept |
Gets the velocity. More... | |
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... | |
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. | |
bool | IsAccelerable (const Body &body) noexcept |
Is "accelerable". More... | |
bool | IsAwake (const Body &body) noexcept |
Gets the awake/asleep state of this body. More... | |
bool | IsEnabled (const Body &body) noexcept |
Gets the enabled/disabled state of the body. More... | |
bool | IsFixedRotation (const Body &body) noexcept |
Does this body have fixed rotation? More... | |
bool | IsImpenetrable (const Body &body) noexcept |
Is this body treated like a bullet for continuous collision detection? More... | |
bool | IsMassDataDirty (const Body &body) noexcept |
Gets whether the mass data for this body is "dirty". | |
bool | IsSleepingAllowed (const Body &body) noexcept |
Gets whether or not this body allowed to sleep. More... | |
bool | IsSpeedable (const Body &body) noexcept |
Is "speedable". More... | |
bool | operator!= (const Body &lhs, const Body &rhs) |
Not-equals operator. More... | |
bool | operator== (const Body &lhs, const Body &rhs) |
Equals operator. More... | |
void | SetAcceleration (Body &body, AngularAcceleration value) noexcept |
Sets the given angular acceleration of the given body. More... | |
void | SetAcceleration (Body &body, const Acceleration &value) noexcept |
Sets the accelerations on the given body. More... | |
void | SetAcceleration (Body &body, const LinearAcceleration2 &linear, AngularAcceleration angular) noexcept |
Sets the linear and rotational accelerations on this body. More... | |
void | SetAcceleration (Body &body, const LinearAcceleration2 &value) noexcept |
Sets the given linear acceleration of the given body. More... | |
void | SetAngle (Body &body, Angle value) |
Sets the body's angular orientation. More... | |
void | SetAngularDamping (Body &body, NonNegative< Frequency > value) noexcept |
Sets the angular damping of the body. More... | |
void | SetAwake (Body &body) noexcept |
Awakens this body. More... | |
void | SetEnabled (Body &body) noexcept |
Sets the enabled state. More... | |
void | SetEnabled (Body &body, bool value) noexcept |
Sets the enabled state to the given value. More... | |
void | SetFixedRotation (Body &body, bool value) |
Sets this body to have fixed rotation. More... | |
void | SetImpenetrable (Body &body) noexcept |
Sets the impenetrable status of this body. More... | |
void | SetLinearDamping (Body &body, NonNegative< Frequency > value) noexcept |
Sets the linear damping of the body. More... | |
void | SetLocation (Body &body, const Length2 &value) |
Sets the body's location. More... | |
void | SetMass (Body &body, Mass mass) |
Sets the mass of the given body. | |
void | SetPosition0 (Body &body, const Position &value) noexcept |
Sets the "position 0" Position information for the given body. | |
void | SetPosition1 (Body &body, const Position &value) noexcept |
Sets the "position 1" Position information for the given body. | |
void | SetRotInertia (Body &body, RotInertia value) noexcept |
Sets the rotational inertia of the body. | |
void | SetSleepingAllowed (Body &body, bool value) noexcept |
void | SetSweep (Body &body, const Sweep &value) noexcept |
Sets the sweep value of the given body. More... | |
void | SetTransformation (Body &body, const Transformation &value) noexcept |
Sets the body's transformation. More... | |
void | SetType (Body &body, BodyType value) noexcept |
Sets the type of this body. More... | |
void | SetVelocity (Body &body, AngularVelocity value) noexcept |
Sets the angular velocity. More... | |
void | SetVelocity (Body &body, const LinearVelocity2 &value) noexcept |
Sets the linear velocity of the center of mass. More... | |
void | SetVelocity (Body &body, const Velocity &value) noexcept |
Sets the body's velocity (linear and angular velocity). More... | |
bool | Unawaken (Body &body) noexcept |
Puts the body to sleep if it's awake. More... | |
void | UnsetAwake (Body &body) noexcept |
Sets this body to asleep if sleeping is allowed. More... | |
void | UnsetEnabled (Body &body) noexcept |
Unsets the enabled state. More... | |
void | UnsetImpenetrable (Body &body) noexcept |
Unsets the impenetrable status of this body. More... | |
A "body" physical entity.
A rigid body entity having associated properties like position, velocity, acceleration, and mass.
|
explicit |
Initializing constructor.
World::CreateBody
. bd | Configuration data for the body to construct. |
GetLinearDamping()
returns value of bd.linearDamping. GetAngularDamping()
returns value of bd.angularDamping. GetInvMass()
returns Real(0)/Kilogram
if bd.type != BodyType::Dynamic
, otherwise it returns value of bd.invMass. GetInvRotInertia()
returns InvRotInertia{}
if bd.type != BodyType::Dynamic
, otherwise it returns value of bd.invRotI. 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 values of bd.linearAcceleration and bd.angularAcceleration.
|
inlinenoexcept |
Advances the body sweep's position 0 and alpha 0 values.
GetSweep()
returns what calling Advance0(GetSweep(), value)
would return before this call. Adds the given shape identifier to the identifiers associated with this body.
shapeId | Identifier of the shape to attach. |
shapeId
is not InvalidShapeID
. IsMassDataDirty()
returns true. GetShapes()
returned container contains the given identifier. bool playrho::d2::Body::Detach | ( | ShapeID | shapeId | ) |
Removes the given shape identifier from the identifiers associated with this body.
SetInvMassData
to clear it. shapeId | Identifier of the shape to detach. |
IsMassDataDirty()
returns true if this function returned true. GetShapes()
returned container contains one less of the identifier.
|
inlinenoexcept |
Gets this body's angular acceleration.
|
inlinenoexcept |
Gets the angular damping of the body.
|
inlinenoexcept |
Gets the inverse total mass of the body.
This is the cached result of dividing 1 by the body's mass or zero for non linearly-accelerable bodies. 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 or zero for non rotationally-accelerable bodies. 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.
Referenced by SetMass().
|
inlinenoexcept |
Gets this body's linear acceleration.
|
inlinenoexcept |
Gets the linear damping of the body.
|
inlinenoexcept |
Gets the identifiers of the shapes attached to this body.
Referenced by playrho::d2::AabbTreeWorld::GetShapes().
|
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:
|
inlinenoexcept |
Gets this body's under-active time value.
|
inlinenoexcept |
Gets the velocity.
|
inlinenoexcept |
|
inlinenoexcept |
Gets the awake/asleep state of this body.
|
constexprnoexcept |
Whether or not this was destroyed.
If you have gotten this body's value from a world, this function says whether the world considers the body destroyed or not.
|
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 or not this body allowed to sleep.
|
inlinenoexcept |
|
noexcept |
Sets the body's velocity.
GetVelocity()
returns. value | Value of the velocity to set. |
IsSpeedable(const Body&)
is true or given velocity is zero. GetVelocity()
returns the value
set.
|
inlinenoexcept |
|
noexcept |
Sets the linear and rotational accelerations on this body.
linear | Linear acceleration. |
angular | Angular acceleration. |
linear
and angular
are both valid. I.e. IsValid(linear) && IsValid(angular)
. GetLinearAcceleration()
returns linear
. GetAngularAcceleration()
returns angular
. IsAwake()
is true and GetUnderActiveTime()
returns zero if either of the new accelerations are higher, or the new linear acceleration is in a new direction, or the sign of the new angular acceleration is different.
|
inlinenoexcept |
Sets the angular damping of the body.
GetAngularDamping()
returns the value set.
|
noexcept |
Awakens this body.
Sets this body to awake and resets its under-active time if it's a "speedable" body. This function has no effect otherwise.
IsAwake()
function returns true. GetUnderActiveTime
function returns zero.
|
inlinenoexcept |
Sets the body's awake flag.
This is done unconditionally.
IsSpeedable(const Body&)
is true.
|
constexprnoexcept |
Sets the destroyed property.
IsDestroyed()
returns true.
|
inlinenoexcept |
void playrho::d2::Body::SetFixedRotation | ( | bool | flag | ) |
Sets this body to have fixed rotation.
IsFixedRotation()
returns the value set. Referenced by SetFixedRotation().
|
inlinenoexcept |
Sets the impenetrable status of this body.
Sets that this body should be treated like a bullet for continuous collision detection.
IsImpenetrable()
returns true.
|
inlinenoexcept |
Sets the inverse mass data and clears the mass-data-dirty flag.
GetInvMass()
returns the set inverse mass. GetInvRotInertia()
returns the set inverse rotational inertia. IsMassDataDirty()
returns false. Referenced by SetMass().
|
inlinenoexcept |
Sets the linear damping of the body.
GetLinearDamping()
returns the value set.
|
inlinenoexcept |
Sets the "position 0" value of the body to the given position.
GetSweep().pos0
is the value set.
|
inlinenoexcept |
Sets the body sweep's "position 1" value.
GetSweep().pos1
is the value set. GetTransformation()
returns GetTransform1(GetSweep())
of the new sweep.
|
inline |
Sets the identifiers of the shapes attached to this body.
GetShapes()
returns the value given. IsMassDataDirty()
returns true.
|
noexcept |
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 |
Sets the body's sweep value.
GetSweep()
returns the value set. GetTransformation()
returns GetTransform1(value)
.
|
noexcept |
Sets the type of this body.
GetType()
returns type set. GetFlags()
returns a value reflective of the type set. GetUnderActiveTime()
returns 0. IsAwake(const Body&)
returns true for BodyType::Dynamic
or BodyType::Kinematic
, and returns false for BodyType::Static
.
|
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).
value | Value of the velocity to set. |
velocity
is non-zero and IsSpeedable(const Body&)
is true, IsAwake(const Body&)
returns true and GetUnderActiveTime()
returns 0. velocity
is zero or IsSpeedable(const Body&)
is true, GetVelocity()
returns the value
set.
|
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()
function returns false. GetUnderActiveTime
function returns zero. GetVelocity
function returns zero linear & zero angular speed.
|
inlinenoexcept |
Unsets the body's awake flag.
!IsSpeedable(const Body&)
or IsSleepingAllowed(const Body&)
.
|
constexprnoexcept |
Unsets the destroyed property.
IsDestroyed()
returns false.
|
inlinenoexcept |
|
inlinenoexcept |
Unsets the impenetrable status of this body.
Unsets that this body should be treated like a bullet for continuous collision detection.
IsImpenetrable()
returns false.
|
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.
|
related |
Gets the angular damping of the body.
|
related |
Gets the angular velocity.
body | Body to get the angular velocity for. |
|
related |
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.
|
related |
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 type of this body.
Gets the given body's under-active time.
Gets the velocity.
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. |
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.
Not-equals operator.
Equals operator.
|
related |
Sets the given angular acceleration of the given body.
|
related |
Sets the accelerations on the given body.
body | Body whose acceleration should be set. |
value | Acceleration value to set. |
|
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.
Sets the body's angular orientation.
This instantly adjusts the body to be at the new angular orientation.
body | The body to update. |
value | Valid world angle of the body's local origin. |
|
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 function has no effect otherwise.
IsAwake(const Body&)
function returns true. GetUnderActiveTime
function 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.
Sets the body's location.
This instantly adjusts the body to be at the new location.
body | The body to update. |
value | Valid world location of the body's local origin. |
|
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.
GetTransformation(const Body& body)
will return the value set. GetPosition1(const Body& body)
will return a position equivalent to value given. Sets the type of this body.
|
related |
Sets the angular velocity.
body | Body to set the angular velocity of. |
value | the new 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. |
Sets the body's velocity (linear and angular velocity).
|
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(const Body&)
function returns false. GetUnderActiveTime
function returns zero. GetVelocity
function 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.