A UnitInertia matrix is a unit-mass inertia matrix; you can convert it to an Inertia by multiplying it by the actual body mass.
More...
|
| UnitInertia_ () |
| Default is a NaN-ed out mess to avoid accidents, even in Release mode. More...
|
|
| UnitInertia_ (const RealP &moment) |
| Create a principal unit inertia matrix with identical diagonal elements. More...
|
|
| UnitInertia_ (const Vec3P &moments, const Vec3P &products=Vec3P(0)) |
| Create a unit inertia matrix from a vector of the moments of inertia (the inertia matrix diagonal) and optionally a vector of the products of inertia (the off-diagonals). More...
|
|
| UnitInertia_ (const RealP &xx, const RealP &yy, const RealP &zz) |
| Create a principal unit inertia matrix (only non-zero on diagonal). More...
|
|
| UnitInertia_ (const RealP &xx, const RealP &yy, const RealP &zz, const RealP &xy, const RealP &xz, const RealP &yz) |
| This is a general unit inertia matrix. More...
|
|
| UnitInertia_ (const SymMat33P &m) |
| Construct a UnitInertia from a symmetric 3x3 matrix. More...
|
|
| UnitInertia_ (const Mat33P &m) |
| Construct a UnitInertia from a 3x3 symmetric matrix. More...
|
|
| UnitInertia_ (const Inertia_< P > &inertia) |
| Construct a UnitInertia matrix from an Inertia matrix. More...
|
|
UnitInertia_ & | setUnitInertia (const RealP &xx, const RealP &yy, const RealP &zz) |
| Set a UnitInertia matrix to have only principal moments (that is, it will be diagonal). More...
|
|
UnitInertia_ & | setUnitInertia (const Vec3P &moments, const Vec3P &products=Vec3P(0)) |
| Set principal moments and optionally off-diagonal terms. More...
|
|
UnitInertia_ & | setUnitInertia (const RealP &xx, const RealP &yy, const RealP &zz, const RealP &xy, const RealP &xz, const RealP &yz) |
| Set this UnitInertia to a general matrix. More...
|
|
UnitInertia_ | shiftToCentroid (const Vec3P &CF) const |
| Assuming that this unit inertia matrix is currently taken about some (implicit) frame F's origin OF, produce a new unit inertia matrix which is the same as this one except measured about the body's centroid CF. More...
|
|
UnitInertia_ & | shiftToCentroidInPlace (const Vec3P &CF) |
| Assuming that this unit inertia matrix is currently taken about some (implicit) frame F's origin OF, modify it so that it is instead taken about the body's centroid CF. More...
|
|
UnitInertia_ | shiftFromCentroid (const Vec3P &p) const |
| Assuming that the current UnitInertia G is a central inertia (that is, it is inertia about the body centroid CF), create a new object that is the same as this one except shifted to some other point p measured from the centroid. More...
|
|
UnitInertia_ & | shiftFromCentroidInPlace (const Vec3P &p) |
| Assuming that the current UnitInertia G is a central inertia (that is, it is inertia about the body centroid CF), shift it in place to some other point p measured from the centroid. More...
|
|
UnitInertia_ | reexpress (const Rotation_< P > &R_FB) const |
| Return a new unit inertia matrix like this one but re-expressed in another frame (leaving the origin point unchanged). More...
|
|
UnitInertia_ | reexpress (const InverseRotation_< P > &R_FB) const |
| Rexpress using an inverse rotation to avoid having to convert it. More...
|
|
UnitInertia_ & | reexpressInPlace (const Rotation_< P > &R_FB) |
| Re-express this unit inertia matrix in another frame, changing the object in place; see reexpress() if you want to leave this object unmolested and get a new one instead. More...
|
|
UnitInertia_ & | reexpressInPlace (const InverseRotation_< P > &R_FB) |
| Rexpress using an inverse rotation to avoid having to convert it. More...
|
|
| operator const SymMat33P & () const |
| This is an implicit conversion to const SymMat33. More...
|
|
const Inertia_< P > & | asUnitInertia () const |
| Recast this UnitInertia matrix as a unit inertia matrix. More...
|
|
UnitInertia_ & | setFromUnitInertia (const Inertia_< P > &inertia) |
| Set from a unit inertia matrix. More...
|
|
|
These are UnitInertia matrix factories for some common 3D solids.
Each defines its own frame aligned (when possible) with principal moments. Each has unit mass and its center of mass located at the origin (usually). Use this with shiftFromCentroid() to move it somewhere else, and with reexpress() to express the UnitInertia matrix in another frame.
|
static UnitInertia_ | pointMassAtOrigin () |
| Create a UnitInertia matrix for a point located at the origin – that is, an all-zero matrix. More...
|
|
static UnitInertia_ | pointMassAt (const Vec3P &p) |
| Create a UnitInertia matrix for a point of unit mass located at a given location measured from origin OF and expressed in F (where F is the implicit frame of this UnitInertia matrix). More...
|
|
static UnitInertia_ | sphere (const RealP &r) |
| Create a UnitInertia matrix for a unit mass sphere of radius r centered at the origin. More...
|
|
static UnitInertia_ | cylinderAlongZ (const RealP &r, const RealP &hz) |
| Unit-mass cylinder aligned along z axis; use radius and half-length. More...
|
|
static UnitInertia_ | cylinderAlongY (const RealP &r, const RealP &hy) |
| Unit-mass cylinder aligned along y axis; use radius and half-length. More...
|
|
static UnitInertia_ | cylinderAlongX (const RealP &r, const RealP &hx) |
| Unit-mass cylinder aligned along x axis; use radius and half-length. More...
|
|
static UnitInertia_ | brick (const RealP &hx, const RealP &hy, const RealP &hz) |
| Unit-mass brick given by half-lengths in each direction. More...
|
|
static UnitInertia_ | brick (const Vec3P &halfLengths) |
| Alternate interface to brick() that takes a Vec3 for the half lengths. More...
|
|
static UnitInertia_ | ellipsoid (const RealP &hx, const RealP &hy, const RealP &hz) |
| Unit-mass ellipsoid given by half-lengths in each direction. More...
|
|
static UnitInertia_ | ellipsoid (const Vec3P &halfLengths) |
| Alternate interface to ellipsoid() that takes a Vec3 for the half lengths. More...
|
|
template<class P>
class SimTK::UnitInertia_< P >
A UnitInertia matrix is a unit-mass inertia matrix; you can convert it to an Inertia by multiplying it by the actual body mass.
Functionality is limited here to those few operations which ensure unit mass; most operations on a UnitInertia matrix result in a general Inertia instead. You can use a UnitInertia object wherever an Inertia is expected but not vice versa.
When constructing a UnitInertia matrix, note that we cannot verify that it actually has unit mass because every legal Inertia matrix can be viewed as the UnitInertia matrix for some differently-scaled object.
Unit inertia matrices are sometimes called "gyration" matrices; we will often represent them with the symbol "G" to avoid confusion with general inertia matrices for which the symbol "I" (or sometimes "J") is used.
Abbreviations
Typedefs exist for the most common invocations of UnitInertia_<P>:
Return a new unit inertia matrix like this one but re-expressed in another frame (leaving the origin point unchanged).
Call this inertia matrix G_OF_F, that is, it is taken about the origin of some frame F, and expressed in F. We want to return G_OF_B, the same unit inertia matrix, still taken about the origin of F, but expressed in the B frame, given by G_OF_B=R_BF*G_OF_F*R_FB where R_FB is the rotation matrix giving the orientation of frame B in F. This is handled here by a special method of the Rotation class which rotates a symmetric tensor at a cost of 57 flops.
- See also
- reexpressInPlace()