usdrt::PhysxSchemaPhysxTendonAttachmentAPI

Defined in usdrt/scenegraph/usd/physxSchema/physxTendonAttachmentAPI.h

Functions

Variables

class PhysxSchemaPhysxTendonAttachmentAPI : public usdrt::UsdAPISchemaBase

WARNING: Draft API, this design is not fixed and may change in the future.

Applied to an articulation-link rigid-body Xformable.

A tendon attachment is part of a spatial tendon and is attached to an articulation link. The distance between the attachment and its parent attachment contributes to the length of the tendon, after scaling by the gearing attribute.

The localPos attribute defines the translational offset of the attachment in the link’s local frame; in particular, this means that the offset is scaled together with any scaling applied to the link.

An articulation link may have multiple distinct attachments that belong to the same or distinct spatial tendons; therefore, the spatial tendon APIs are multi-apply and each attachment must have a unique instance name that is used in parent-child relationships of the attachments. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in PhysxSchemaTokens. So to set an attribute to the value “rightHanded”, use PhysxSchemaTokens->rightHanded as the value.

Public Functions

inline explicit PhysxSchemaPhysxTendonAttachmentAPI(const UsdPrim &prim = UsdPrim(), const TfToken &name = TfToken())

Construct a PhysxSchemaPhysxTendonAttachmentAPI on UsdPrim prim with name name . Equivalent to PhysxSchemaPhysxTendonAttachmentAPI::Get( prim.GetStage(), prim.GetPath().AppendProperty( “physxTendon:name”));.

for a valid prim , but will not immediately throw an error for an invalid prim

inline explicit PhysxSchemaPhysxTendonAttachmentAPI(const UsdSchemaBase &schemaObj, const TfToken &name)

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

inline virtual ~PhysxSchemaPhysxTendonAttachmentAPI()

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.

inline TfToken GetName() const

Returns the name of this multiple-apply schema instance.

inline UsdAttribute GetGearingAttr() const

Attachment distance scaling factor. Range: (-inf, inf) Units: unitless.

Declaration

float gearing = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateGearingAttr() const

See GetGearingAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetLocalPosAttr() const

Location of the attachment. Only considered if API is applied to an articulation link (i.e. with a PhysicsRigidBodyAPI). Units: (local-frame) distance.

Declaration

point3f localPos = (0, 0, 0)

C++ Type

GfVec3f

Usd Type

SdfValueTypeNames->Point3f

inline UsdAttribute CreateLocalPosAttr() const

See GetLocalPosAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetParentAttachmentAttr() const

API instance name of parent attachment at parentLink.

Declaration

uniform token parentAttachment

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

inline UsdAttribute CreateParentAttachmentAttr() const

See GetParentAttachmentAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdRelationship GetParentLinkRel() const

Relationship to parent link that has a PhysxTendonAttachmentAPI or PhysxTendonAttachmentRootAPI with instance name parentAttachment applied.

inline UsdRelationship CreateParentLinkRel() const

See GetParentLinkRel(), and also Create vs Get Property Methods for when to use Get vs Create.

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 Functions

static inline PhysxSchemaPhysxTendonAttachmentAPI Apply(const UsdPrim &prim, const TfToken &name)

Applies this multiple-apply API schema to the given prim along with the given instance name, name.

This information is stored by adding “PhysxTendonAttachmentAPI:<i>name</i>” to the token-valued, listOp metadata apiSchemas on the prim. For example, if name is ‘instance1’, the token ‘PhysxTendonAttachmentAPI:instance1’ is added to ‘apiSchemas’.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns

A valid PhysxSchemaPhysxTendonAttachmentAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxTendonAttachmentAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::MultipleApplyAPI

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.