HDK
|
Go to the source code of this file.
Classes | |
class | UsdPhysicsMassUnits |
Functions | |
USDPHYSICS_API double | UsdPhysicsGetStageKilogramsPerUnit (const UsdStageWeakPtr &stage) |
Return stage's authored kilogramsPerUnit, or 1.0 if unauthored. More... | |
USDPHYSICS_API bool | UsdPhysicsStageHasAuthoredKilogramsPerUnit (const UsdStageWeakPtr &stage) |
Return whether stage has an authored kilogramsPerUnit. More... | |
USDPHYSICS_API bool | UsdPhysicsSetStageKilogramsPerUnit (const UsdStageWeakPtr &stage, double kilogramsPerUnit) |
USDPHYSICS_API bool | UsdPhysicsMassUnitsAre (double authoredUnits, double standardUnits, double epsilon=1e-5) |
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.