Loading...
Searching...
No Matches
UsdPhysicsMassProperties Class Reference

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 GfMatrix3fGetInertiaTensor () const
 Get inertia tensor.
 
void SetInertiaTensor (const GfMatrix3f &inTensor)
 Set inertia tensor inTensor New inertia tensor.
 
const GfVec3fGetCenterOfMass () 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.
 

Detailed Description

Mass properties computation class.

Used to combine together individual mass properties and produce final one.

Definition at line 103 of file massProperties.h.

Constructor & Destructor Documentation

◆ UsdPhysicsMassProperties() [1/2]

USDPHYSICS_API UsdPhysicsMassProperties ( )
inline

Construct a MassProperties.

Definition at line 108 of file massProperties.h.

◆ UsdPhysicsMassProperties() [2/2]

USDPHYSICS_API UsdPhysicsMassProperties ( const float  m,
const GfMatrix3f inertiaT,
const GfVec3f com 
)
inline

Construct from individual elements.

Definition at line 116 of file massProperties.h.

Member Function Documentation

◆ GetCenterOfMass()

const GfVec3f & GetCenterOfMass ( ) const
inline

Get center of mass.

Returns
Center of mass

Definition at line 224 of file massProperties.h.

◆ GetInertiaTensor()

const GfMatrix3f & GetInertiaTensor ( ) const
inline

Get inertia tensor.

Returns
Inertia tensor

Definition at line 210 of file massProperties.h.

◆ GetMass()

float GetMass ( ) const
inline

Get mass.

Returns
Mass

Definition at line 231 of file massProperties.h.

◆ GetMassSpaceInertia()

static USDPHYSICS_API GfVec3f GetMassSpaceInertia ( const GfMatrix3f inertia,
GfQuatf massFrame 
)
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.

Returns
The entries of the diagonalized inertia tensor.

Definition at line 141 of file massProperties.h.

◆ operator*()

USDPHYSICS_API UsdPhysicsMassProperties operator* ( const float  scale) const
inline

Scale mass properties.

scale The linear scaling factor to apply to the mass properties.

Returns
The scaled mass properties.

Definition at line 124 of file massProperties.h.

◆ RotateInertia()

static USDPHYSICS_API GfMatrix3f RotateInertia ( const GfMatrix3f inertia,
const GfQuatf q 
)
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.

Returns
The rotated inertia tensor.

Definition at line 169 of file massProperties.h.

◆ SetInertiaTensor()

void SetInertiaTensor ( const GfMatrix3f inTensor)
inline

Set inertia tensor inTensor New inertia tensor.

Definition at line 217 of file massProperties.h.

◆ SetMass()

void SetMass ( float  inMass)
inline

Set mass
inMass New mass.

Definition at line 238 of file massProperties.h.

◆ Sum()

static USDPHYSICS_API UsdPhysicsMassProperties Sum ( const UsdPhysicsMassProperties props,
const GfMatrix4f transforms,
const uint32_t  count 
)
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.

Returns
The summed up mass properties.

Definition at line 181 of file massProperties.h.

◆ Translate()

USDPHYSICS_API void Translate ( const GfVec3f t)
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 131 of file massProperties.h.

◆ TranslateInertia()

static USDPHYSICS_API GfMatrix3f TranslateInertia ( const GfMatrix3f inertia,
const float  mass,
const GfVec3f t 
)
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.

Returns
The translated inertia tensor.

Definition at line 153 of file massProperties.h.


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