HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdPhysicsMassProperties Class Reference

#include <massProperties.h>

Public Member Functions

USDPHYSICS_API UsdPhysicsMassProperties ()
 Construct a MassProperties. More...
 
USDPHYSICS_API UsdPhysicsMassProperties (const float m, const GfMatrix3f &inertiaT, const GfVec3f &com)
 Construct from individual elements. More...
 
USDPHYSICS_API
UsdPhysicsMassProperties 
operator* (const float scale) const
 
USDPHYSICS_API void Translate (const GfVec3f &t)
 
const GfMatrix3fGetInertiaTensor () const
 
void SetInertiaTensor (const GfMatrix3f &inTensor)
 
const GfVec3fGetCenterOfMass () const
 
float GetMass () const
 
void SetMass (float inMass)
 

Static Public Member Functions

static USDPHYSICS_API GfVec3f GetMassSpaceInertia (const GfMatrix3f &inertia, GfQuatf &massFrame)
 
static USDPHYSICS_API GfMatrix3f TranslateInertia (const GfMatrix3f &inertia, const float mass, const GfVec3f &t)
 
static USDPHYSICS_API GfMatrix3f RotateInertia (const GfMatrix3f &inertia, const GfQuatf &q)
 
static USDPHYSICS_API
UsdPhysicsMassProperties 
Sum (const UsdPhysicsMassProperties *props, const GfMatrix4f *transforms, const uint32_t count)
 

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

USDPHYSICS_API UsdPhysicsMassProperties::UsdPhysicsMassProperties ( )
inline

Construct a MassProperties.

Definition at line 108 of file massProperties.h.

USDPHYSICS_API UsdPhysicsMassProperties::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

const GfVec3f& UsdPhysicsMassProperties::GetCenterOfMass ( ) const
inline

Get center of mass

Returns
Center of mass

Definition at line 224 of file massProperties.h.

const GfMatrix3f& UsdPhysicsMassProperties::GetInertiaTensor ( ) const
inline

Get inertia tensor

Returns
Inertia tensor

Definition at line 210 of file massProperties.h.

float UsdPhysicsMassProperties::GetMass ( ) const
inline

Get mass

Returns
Mass

Definition at line 231 of file massProperties.h.

static USDPHYSICS_API GfVec3f UsdPhysicsMassProperties::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.

USDPHYSICS_API UsdPhysicsMassProperties 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.

static USDPHYSICS_API GfMatrix3f UsdPhysicsMassProperties::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.

void UsdPhysicsMassProperties::SetInertiaTensor ( const GfMatrix3f inTensor)
inline

Set inertia tensor inTensor New inertia tensor.

Definition at line 217 of file massProperties.h.

void UsdPhysicsMassProperties::SetMass ( float  inMass)
inline

Set mass inMass New mass.

Definition at line 238 of file massProperties.h.

static USDPHYSICS_API UsdPhysicsMassProperties 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.

USDPHYSICS_API void UsdPhysicsMassProperties::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.

static USDPHYSICS_API GfMatrix3f UsdPhysicsMassProperties::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: