Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
Mass data. More...
#include <MassData.hpp>
Public Member Functions | |
MassData ()=default | |
constexpr | MassData (Mass m, Length2D c, RotInertia i) noexcept |
Initializing constructor. More... | |
Public Attributes | |
Length2D | center |
The position of the shape's centroid relative to the shape's origin. More... | |
Mass | mass |
Mass of the shape in kilograms. This should NEVER be a negative value. More... | |
RotInertia | I |
Rotational inertia, a.k.a. moment of inertia. More... | |
Mass data.
This holds the mass data computed for a shape.
|
default |
|
inlinenoexcept |
Initializing constructor.
m | Non-negative mass in kg. |
c | Position of the shape's centroid relative to the shape's origin. |
i | Non-negative rotational inertia of the shape about the local origin. |
Length2D box2d::MassData::center |
The position of the shape's centroid relative to the shape's origin.
RotInertia box2d::MassData::I |
Rotational inertia, a.k.a. moment of inertia.
This is the rotational inertia of the shape about the local origin. This should NEVER be a negative value.
Mass box2d::MassData::mass |
Mass of the shape in kilograms. This should NEVER be a negative value.