![]() |
|
Mass properties computation class. More...
#include <massProperties.h>
Public Member Functions | |
| USDPHYSICS_API | UsdPhysicsMassProperties () |
| Construct a MassProperties. | |
| USDPHYSICS_API | UsdPhysicsMassProperties (const float m, const GfMatrix3f &inertiaT, const GfVec3f &com) |
| Construct from individual elements. | |
| USDPHYSICS_API UsdPhysicsMassProperties | operator* (const float scale) const |
| Scale mass properties. | |
| USDPHYSICS_API void | Translate (const GfVec3f &t) |
| Translate the center of mass by a given vector and adjust the inertia tensor accordingly. | |
| const GfMatrix3f & | GetInertiaTensor () const |
| Get inertia tensor. | |
| void | SetInertiaTensor (const GfMatrix3f &inTensor) |
Set inertia tensor inTensor New inertia tensor. | |
| const GfVec3f & | GetCenterOfMass () const |
| Get center of mass. | |
| float | GetMass () const |
| Get mass. | |
| void | SetMass (float inMass) |
Set mass inMass New mass. | |
Static Public Member Functions | |
| static USDPHYSICS_API GfVec3f | GetMassSpaceInertia (const GfMatrix3f &inertia, GfQuatf &massFrame) |
| Get the entries of the diagonalized inertia tensor and the corresponding reference rotation. | |
| static USDPHYSICS_API GfMatrix3f | TranslateInertia (const GfMatrix3f &inertia, const float mass, const GfVec3f &t) |
Translate an inertia tensor using the parallel axis theorem inertia The inertia tensor to translate. | |
| static USDPHYSICS_API GfMatrix3f | RotateInertia (const GfMatrix3f &inertia, const GfQuatf &q) |
Rotate an inertia tensor around the center of mass inertia The inertia tensor to rotate. | |
| static USDPHYSICS_API UsdPhysicsMassProperties | Sum (const UsdPhysicsMassProperties *props, const GfMatrix4f *transforms, const uint32_t count) |
| Sum up individual mass properties. | |
Mass properties computation class.
Used to combine together individual mass properties and produce final one.
Definition at line 86 of file massProperties.h.
|
inline |
Construct a MassProperties.
Definition at line 91 of file massProperties.h.
|
inline |
Construct from individual elements.
Definition at line 99 of file massProperties.h.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Get the entries of the diagonalized inertia tensor and the corresponding reference rotation.
inertia The inertia tensor to diagonalize. massFrame The frame the diagonalized tensor refers to.
Definition at line 124 of file massProperties.h.
|
inline |
Scale mass properties.
scale The linear scaling factor to apply to the mass properties.
Definition at line 107 of file massProperties.h.
|
inlinestatic |
Rotate an inertia tensor around the center of mass inertia The inertia tensor to rotate.
q The rotation to apply to the inertia tensor.
Definition at line 152 of file massProperties.h.
|
inline |
Set inertia tensor inTensor New inertia tensor.
Definition at line 200 of file massProperties.h.
|
inline |
Set mass
inMass New mass.
Definition at line 221 of file massProperties.h.
|
inlinestatic |
Sum up individual mass properties.
props Array of mass properties to sum up. transforms Reference transforms for each mass properties entry. count The number of mass properties to sum up.
Definition at line 164 of file massProperties.h.
|
inline |
Translate the center of mass by a given vector and adjust the inertia tensor accordingly.
t The translation vector for the center of mass.
Definition at line 114 of file massProperties.h.
|
inlinestatic |
Translate an inertia tensor using the parallel axis theorem inertia The inertia tensor to translate.
mass The mass of the object. t The relative frame to translate the inertia tensor to.
Definition at line 136 of file massProperties.h.