7#ifndef PXR_USD_USD_GEOM_METRICS_H
8#define PXR_USD_USD_GEOM_METRICS_H
11#include "pxr/usd/usdGeom/api.h"
15PXR_NAMESPACE_OPEN_SCOPE
153 double metersPerUnit);
174 double epsilon = 1e-5);
182 static constexpr double nanometers = 1e-9;
183 static constexpr double micrometers = 1e-6;
184 static constexpr double millimeters = 0.001;
185 static constexpr double centimeters = 0.01;
186 static constexpr double meters = 1.0;
187 static constexpr double kilometers = 1000;
192 static constexpr double inches = 0.0254;
193 static constexpr double feet = 0.3048;
194 static constexpr double yards = 0.9144;
195 static constexpr double miles = 1609.344;
200PXR_NAMESPACE_CLOSE_SCOPE
Token for efficient comparison, assignment, and hashing of known strings.
Container class for static double-precision symbols representing common units of measure expressed in...
static constexpr double lightYears
Measured for one year = 365.25 days.
USDGEOM_API bool UsdGeomLinearUnitsAre(double authoredUnits, double standardUnits, double epsilon=1e-5)
Return true if the two given metrics are within the provided relative epsilon of each other,...
USDGEOM_API bool UsdGeomStageHasAuthoredMetersPerUnit(const UsdStageWeakPtr &stage)
Return whether stage has an authored metersPerUnit.
USDGEOM_API bool UsdGeomSetStageMetersPerUnit(const UsdStageWeakPtr &stage, double metersPerUnit)
Author stage's metersPerUnit.
USDGEOM_API double UsdGeomGetStageMetersPerUnit(const UsdStageWeakPtr &stage)
Return stage's authored metersPerUnit, or 0.01 if unauthored.
USDGEOM_API TfToken UsdGeomGetStageUpAxis(const UsdStageWeakPtr &stage)
Fetch and return stage 's upAxis.
USDGEOM_API bool UsdGeomSetStageUpAxis(const UsdStageWeakPtr &stage, const TfToken &axis)
Set stage 's upAxis to axis, which must be one of UsdGeomTokens->y or UsdGeomTokens->z.
USDGEOM_API TfToken UsdGeomGetFallbackUpAxis()
Return the site-level fallback up axis as a TfToken.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...