PlayRho  2.0.0
An interactive physics engine & library.
playrho::detail::MassData< N > Struct Template Reference

Mass data. More...

#include <playrho/d2/MassData.hpp>

Collaboration diagram for playrho::detail::MassData< N >:
[legend]

Public Attributes

Vector< Length, N > center = Vector<Length, N>{}
 Position of the shape's centroid relative to the shape's origin.
 
NonNegative< RotInertiaI = DefaultI
 Rotational inertia, a.k.a. moment of inertia. More...
 
NonNegative< Massmass = 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.
 

Detailed Description

template<std::size_t N>
struct playrho::detail::MassData< N >

Mass data.

This holds the mass data computed for a shape.

Examples
Compositor.cpp.

Member Data Documentation

◆ I

template<std::size_t N>
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.

See also
https://en.wikipedia.org/wiki/Moment_of_inertia

Referenced by playrho::detail::MassData< N >::operator==(), and playrho::d2::World::SetMassData().


The documentation for this struct was generated from the following file: