usdrt::UsdGeomXformCommonAPI

Defined in usdrt/scenegraph/usd/usdGeom/xformCommonAPI.h

Functions

Variables

class UsdGeomXformCommonAPI : public usdrt::UsdAPISchemaBase

This class provides API for authoring and retrieving a standard set of component transformations which include a scale, a rotation, a scale-rotate pivot and a translation. The goal of the API is to enhance component-wise interchange. It achieves this by limiting the set of allowed basic ops and by specifying the order in which they are applied. In addition to the basic set of ops, the ‘resetXformStack’ bit can also be set to indicate whether the underlying xformable resets the parent transformation (i.e. does not inherit it’s parent’s transformation).

The operator-bool for the class will inform you whether an existing xformable is compatible with this API.

See also

UsdGeomXformCommonAPI::GetResetXformStack()

See also

UsdGeomXformCommonAPI::SetResetXformStack()

The scale-rotate pivot is represented by a pair of (translate, inverse-translate) xformOps around the scale and rotate operations. The rotation operation can be any of the six allowed Euler angle sets.

The xformOpOrder of an xformable that has all of the supported basic ops is as follows: [“xformOp:translate”, “xformOp:translate:pivot”, “xformOp:rotateXYZ”, “xformOp:scale”, “!invert!xformOp:translate:pivot”].

See also

UsdGeomXformOp::Type.

It is worth noting that all of the ops are optional. For example, an xformable may have only a translate or a rotate. It would still be considered as compatible with this API. Individual SetTranslate(), SetRotate(), SetScale() and SetPivot() methods are provided by this API to allow such sparse authoring.

Public Functions

inline explicit UsdGeomXformCommonAPI(const UsdPrim &prim = UsdPrim())

Construct a UsdGeomXformCommonAPI on UsdPrim prim. Equivalent to UsdGeomXformCommonAPI::Get(prim.GetStage(), prim.GetPath()) for a valid prim , but will not immediately throw an error for an invalid prim.

inline explicit UsdGeomXformCommonAPI(const UsdSchemaBase &schemaObj)

Construct a UsdGeomXformCommonAPI on the prim held by schemaObj . Should be preferred over UsdGeomXformCommonAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.

inline virtual ~UsdGeomXformCommonAPI()

Destructor.

inline operator bool() const

Boolean operator.

Returns

Return true if the contained prim is has this api schema applied using HasAPI, and false otherwise.

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

Return the SdfPath to this schema object’s held prim.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::NonAppliedAPI

Compile time constant representing what kind of schema this class is.

See also

UsdSchemaType

Protected Functions

inline const TfToken &_GetInstanceName() const

Returns the instance name of the API schema object belonging to a multiple-apply API schema.

The returned instance name will be empty for non-applied and single-apply API schemas.