#include <BodyConstraint.hpp>
Public Types | |
using | index_type = std::remove_const< decltype(MaxBodies)>::type |
Index type. More... | |
Public Member Functions | |
BodyConstraint ()=default | |
PLAYRHO_CONSTEXPR | BodyConstraint (InvMass invMass, InvRotInertia invRotI, Length2 localCenter, Position position, Velocity velocity) noexcept |
Initializing constructor. More... | |
InvMass | GetInvMass () const noexcept |
Gets the inverse mass of this body representation. More... | |
InvRotInertia | GetInvRotInertia () const noexcept |
Gets the inverse rotational inertia of this body representation. More... | |
Length2 | GetLocalCenter () const noexcept |
Gets the location of the body's center of mass in local coordinates. More... | |
Position | GetPosition () const noexcept |
Gets the position of the body. More... | |
Velocity | GetVelocity () const noexcept |
Gets the velocity of the body. More... | |
BodyConstraint & | SetPosition (Position value) noexcept |
Sets the position of the body. More... | |
BodyConstraint & | SetVelocity (Velocity value) noexcept |
Sets the velocity of the body. More... | |
Detailed Description
Body Constraint.
Body data related to constraint processing.
- Note
- Only position and velocity is independently changeable after construction.
- This data structure is 40-bytes large (with 4-byte Real on at least one 64-bit platform).
Definition at line 35 of file BodyConstraint.hpp.
Member Typedef Documentation
◆ index_type
using playrho::d2::BodyConstraint::index_type = std::remove_const<decltype(MaxBodies)>::type |
Index type.
Definition at line 41 of file BodyConstraint.hpp.
Constructor & Destructor Documentation
◆ BodyConstraint() [1/2]
|
default |
◆ BodyConstraint() [2/2]
|
inlinenoexcept |
Initializing constructor.
Definition at line 47 of file BodyConstraint.hpp.
Member Function Documentation
◆ GetInvMass()
|
inlinenoexcept |
Gets the inverse mass of this body representation.
- Returns
- Value >= 0.
Definition at line 100 of file BodyConstraint.hpp.
◆ GetInvRotInertia()
|
inlinenoexcept |
Gets the inverse rotational inertia of this body representation.
- Returns
- Value >= 0.
Definition at line 105 of file BodyConstraint.hpp.
◆ GetLocalCenter()
|
inlinenoexcept |
Gets the location of the body's center of mass in local coordinates.
Definition at line 110 of file BodyConstraint.hpp.
◆ GetPosition()
|
inlinenoexcept |
Gets the position of the body.
Definition at line 115 of file BodyConstraint.hpp.
◆ GetVelocity()
|
inlinenoexcept |
Gets the velocity of the body.
Definition at line 120 of file BodyConstraint.hpp.
◆ SetPosition()
|
inlinenoexcept |
Sets the position of the body.
- Parameters
-
value A valid position value to set for the represented body.
- Warning
- Behavior is undefined if the given value is not valid.
Definition at line 125 of file BodyConstraint.hpp.
◆ SetVelocity()
|
inlinenoexcept |
Sets the velocity of the body.
- Parameters
-
value A valid velocity value to set for the represented body.
- Warning
- Behavior is undefined if the given value is not valid.
Definition at line 132 of file BodyConstraint.hpp.
The documentation for this class was generated from the following file:
- Dynamics/Contacts/BodyConstraint.hpp