This class contains the mass, center of mass, and inertia of a rigid body B. More...
#include <MassProperties.h>
Public Member Functions | |
MassProperties () | |
MassProperties (const Real &m, const Vec3 &com, const Inertia &inertia) | |
MassProperties & | setMassProperties (const Real &m, const Vec3 &com, const Inertia &inertia) |
Set mass, center of mass, and inertia. | |
const Real & | getMass () const |
const Vec3 & | getMassCenter () const |
const Inertia & | getInertia () const |
Inertia | calcCentralInertia () const |
Inertia | calcShiftedInertia (const Vec3 &newOriginB) const |
Inertia | calcTransformedInertia (const Transform &X_BC) const |
MassProperties | calcShiftedMassProps (const Vec3 &newOriginB) const |
MassProperties | calcTransformedMassProps (const Transform &X_BC) const |
MassProperties | reexpress (const Rotation &R_BC) const |
bool | isExactlyMassless () const |
bool | isNearlyMassless (const Real &tol=SignificantReal) const |
bool | isExactlyCentral () const |
bool | isNearlyCentral (const Real &tol=SignificantReal) const |
SpatialMat | toSpatialMat () const |
Mat66 | toMat66 () const |
Caution: this does not have the same layout in memory as a SpatialMat, although it has the same logical layout. |
This class contains the mass, center of mass, and inertia of a rigid body B.
The center of mass is a vector from B's origin, expressed in the B frame. The inertia is taken about the B origin, and expressed in B.
MassProperties | ( | ) | [inline] |
References MassProperties::setMassProperties().
Referenced by MassProperties::calcShiftedMassProps(), MassProperties::calcTransformedMassProps(), and MassProperties::reexpress().
MassProperties | ( | const Real & | m, | |
const Vec3 & | com, | |||
const Inertia & | inertia | |||
) | [inline] |
References MassProperties::setMassProperties().
Inertia calcCentralInertia | ( | ) | const [inline] |
MassProperties calcShiftedMassProps | ( | const Vec3 & | newOriginB | ) | const [inline] |
References MassProperties::calcShiftedInertia(), and MassProperties::MassProperties().
References MassProperties::calcShiftedInertia(), Transform::p(), Transform::R(), and MassProperties::reexpress().
Referenced by MassProperties::calcTransformedMassProps().
MassProperties calcTransformedMassProps | ( | const Transform & | X_BC | ) | const [inline] |
References MassProperties::calcTransformedInertia(), and MassProperties::MassProperties().
const Inertia& getInertia | ( | ) | const [inline] |
const Real& getMass | ( | ) | const [inline] |
Referenced by MobilizedBody::calcBodyMomentumAboutBodyMassCenterInGround().
const Vec3& getMassCenter | ( | ) | const [inline] |
Referenced by MobilizedBody::calcBodyMomentumAboutBodyMassCenterInGround().
bool isExactlyCentral | ( | ) | const [inline] |
bool isExactlyMassless | ( | ) | const [inline] |
bool isNearlyCentral | ( | const Real & | tol = SignificantReal |
) | const [inline] |
References Vec< M, ELT, STRIDE >::normSqr().
bool isNearlyMassless | ( | const Real & | tol = SignificantReal |
) | const [inline] |
MassProperties reexpress | ( | const Rotation & | R_BC | ) | const [inline] |
MassProperties& setMassProperties | ( | const Real & | m, | |
const Vec3 & | com, | |||
const Inertia & | inertia | |||
) | [inline] |
Set mass, center of mass, and inertia.
Behaves like an assignment in that a reference to the modified MassProperties object is returned.
Referenced by MassProperties::MassProperties().
Mat66 toMat66 | ( | ) | const [inline] |
Caution: this does not have the same layout in memory as a SpatialMat, although it has the same logical layout.
References SimTK::crossMat(), Mat< M, N, ELT, CS, RS >::getSubMat(), Inertia::toMat33(), and Mat< M, N, ELT, CS, RS >::updSubMat().
SpatialMat toSpatialMat | ( | ) | const [inline] |
References SimTK::crossMat(), and Inertia::toMat33().
Referenced by MobilizedBody::calcBodyMomentumAboutBodyOriginInGround(), and MobilizedBody::calcBodySpatialInertiaMatrixInGround().