|
Helper APIs for physics related metrics operations. More...
Go to the source code of this file.
Classes | |
class | UsdPhysicsMassUnits |
Container class for static double-precision symbols representing common mass units of measure expressed in kilograms. More... | |
Functions | |
USDPHYSICS_API double | UsdPhysicsGetStageKilogramsPerUnit (const UsdStageWeakPtr &stage) |
Return stage's authored kilogramsPerUnit, or 1.0 if unauthored. | |
USDPHYSICS_API bool | UsdPhysicsStageHasAuthoredKilogramsPerUnit (const UsdStageWeakPtr &stage) |
Return whether stage has an authored kilogramsPerUnit. | |
USDPHYSICS_API bool | UsdPhysicsSetStageKilogramsPerUnit (const UsdStageWeakPtr &stage, double kilogramsPerUnit) |
Author stage's kilogramsPerUnit. | |
USDPHYSICS_API bool | UsdPhysicsMassUnitsAre (double authoredUnits, double standardUnits, double epsilon=1e-5) |
Return true if the two given metrics are within the provided relative epsilon of each other, when you need to know an absolute metric rather than a scaling factor. | |
Helper APIs for physics related metrics operations.
Definition in file metrics.h.
USDPHYSICS_API double UsdPhysicsGetStageKilogramsPerUnit | ( | const UsdStageWeakPtr & | stage | ) |
Return stage's authored kilogramsPerUnit, or 1.0 if unauthored.
USDPHYSICS_API bool UsdPhysicsMassUnitsAre | ( | double | authoredUnits, |
double | standardUnits, | ||
double | epsilon = 1e-5 |
||
) |
Return true if the two given metrics are within the provided relative epsilon of each other, when you need to know an absolute metric rather than a scaling factor.
Use like so:
USDPHYSICS_API bool UsdPhysicsSetStageKilogramsPerUnit | ( | const UsdStageWeakPtr & | stage, |
double | kilogramsPerUnit | ||
) |
Author stage's kilogramsPerUnit.
USDPHYSICS_API bool UsdPhysicsStageHasAuthoredKilogramsPerUnit | ( | const UsdStageWeakPtr & | stage | ) |
Return whether stage has an authored kilogramsPerUnit.