UsdGeomXformable Algorithms

Utility functions to manipulate UsdPrim transformation data.

See UsdGeomXformable for details.

Enumerations

omni::connect::core::RotationOrder

Enumerates the rotation order of the 3-angle Euler rotation.

Functions

pxr::GfTransform omni::connect::core::getLocalTransform(const pxr::UsdPrim &prim, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Get the local transform of a prim at a given time.

void omni::connect::core::getLocalTransformComponents(const pxr::UsdPrim &prim, pxr::GfVec3d &translation, pxr::GfVec3d &pivot, pxr::GfVec3f &rotation, RotationOrder &rotationOrder, pxr::GfVec3f &scale, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Get the local transform of a prim at a given time in the form of common transform components.

pxr::GfMatrix4d omni::connect::core::getLocalTransformMatrix(const pxr::UsdPrim &prim, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Get the local transform of a prim at a given time in the form of a 4x4 matrix.

bool omni::connect::core::setLocalTransform(pxr::UsdPrim prim, const pxr::GfVec3d &translation, const pxr::GfVec3d &pivot, const pxr::GfVec3f &rotation, const RotationOrder rotationOrder, const pxr::GfVec3f &scale, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Set the local transform of a prim from common transform components.

bool omni::connect::core::setLocalTransform(pxr::UsdPrim prim, const pxr::GfMatrix4d &matrix, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Set the local transform of a prim from a 4x4 matrix.

bool omni::connect::core::setLocalTransform(pxr::UsdPrim prim, const pxr::GfTransform &transform, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Set the local transform of a prim.

Enumerations

enum class omni::connect::core::RotationOrder

Enumerates the rotation order of the 3-angle Euler rotation.

Values:

enumerator eXyz
enumerator eXzy
enumerator eYxz
enumerator eYzx
enumerator eZxy
enumerator eZyx

Functions

pxr::GfTransform omni::connect::core::getLocalTransform(const pxr::UsdPrim &prim, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default())

Get the local transform of a prim at a given time.

Parameters
  • prim – The prim to get local transform from.

  • time – Time at which to query the value.

Returns

Transform value as a transform.

void omni::connect::core::getLocalTransformComponents(const pxr::UsdPrim &prim, pxr::GfVec3d &translation, pxr::GfVec3d &pivot, pxr::GfVec3f &rotation, RotationOrder &rotationOrder, pxr::GfVec3f &scale, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default())

Get the local transform of a prim at a given time in the form of common transform components.

Parameters
  • prim – The prim to get local transform from.

  • translation – Translation result.

  • pivot – Pivot position result.

  • rotation – Rotation result in degrees.

  • rotationOrder – Rotation order the rotation result.

  • scale – Scale result.

  • time – Time at which to query the value.

pxr::GfMatrix4d omni::connect::core::getLocalTransformMatrix(const pxr::UsdPrim &prim, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default())

Get the local transform of a prim at a given time in the form of a 4x4 matrix.

Parameters
  • prim – The prim to get local transform from.

  • time – Time at which to query the value.

Returns

Transform value as a 4x4 matrix.

bool omni::connect::core::setLocalTransform(pxr::UsdPrim prim, const pxr::GfVec3d &translation, const pxr::GfVec3d &pivot, const pxr::GfVec3f &rotation, const RotationOrder rotationOrder, const pxr::GfVec3f &scale, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default())

Set the local transform of a prim from common transform components.

Parameters
  • prim – The prim to set local transform on.

  • translation – The translation value to set.

  • pivot – The pivot position value to set.

  • rotation – The rotation value to set in degrees.

  • rotationOrder – The rotation order of the rotation value.

  • scale – The scale value to set.

  • time – Time at which to write the values.

Returns

True if the transform was set successfully.

bool omni::connect::core::setLocalTransform(pxr::UsdPrim prim, const pxr::GfMatrix4d &matrix, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default())

Set the local transform of a prim from a 4x4 matrix.

Parameters
  • prim – The prim to set local transform on.

  • matrix – The matrix value to set.

  • time – Time at which to write the value.

Returns

A bool indicating if the local transform was set.

bool omni::connect::core::setLocalTransform(pxr::UsdPrim prim, const pxr::GfTransform &transform, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default())

Set the local transform of a prim.

Parameters
  • prim – The prim to set local transform on.

  • transform – The transform value to set.

  • time – Time at which to write the value.

Returns

A bool indicating if the local transform was set.