Mass data. More...
#include <playrho/d2/MassData.hpp>
Public Attributes | |
Vector< Length, N > | center = Vector<Length, N>{} |
Position of the shape's centroid relative to the shape's origin. | |
NonNegative< RotInertia > | I = DefaultI |
Rotational inertia, a.k.a. moment of inertia. More... | |
NonNegative< Mass > | mass = DefaultMass |
Mass of the shape in kilograms. | |
Static Public Attributes | |
static constexpr auto | DefaultI = NonNegative<RotInertia>{0 * 1_m2 * 1_kg / SquareRadian} |
Default rotational inertia (I). | |
static constexpr auto | DefaultMass = NonNegative<Mass>{0_kg} |
Default mass. | |
Related Functions | |
(Note that these are not member functions.) | |
template<std::size_t N> | |
constexpr bool | operator!= (MassData< N > lhs, MassData< N > rhs) |
Inequality operator for mass data. | |
template<std::size_t N> | |
constexpr bool | operator== (MassData< N > lhs, MassData< N > rhs) |
Equality operator for mass data. | |
Mass data.
This holds the mass data computed for a shape.
NonNegative<RotInertia> playrho::detail::MassData< N >::I = DefaultI |
Rotational inertia, a.k.a. moment of inertia.
This is the rotational inertia of the shape about the local origin.
Referenced by playrho::detail::MassData< N >::operator==(), and playrho::d2::World::SetMassData().