PhysxSchemaPhysxTendonAxisAPI#

Fully qualified name: usdrt::PhysxSchemaPhysxTendonAxisAPI

class PhysxSchemaPhysxTendonAxisAPI : public usdrt::UsdAPISchemaBase#

WARNING: Draft API, this design is not fixed and may change in the future. At this point, we don’t support multi-axis joints (e.g. spherical, D6).

Applied to a Physics Joint that must be part of an articulation, e.g. PhysicsRevoluteJoint or PhysicsPrismaticJoint.

A tendon axis is part of a fixed tendon and contributes to the tendon length via the position of its associated articulation joint axis and the gearing attribute. The tendon applies spring-damper forces to the articulation links, scaled by the force coefficient, that aim to maintain constraints on the tendon lengths.

A joint may have multiple tendon axes that belong to distinct fixed tendons; therefore, the fixed-tendon APIs are multi-apply and are grouped into tendons by their instance names.

Fixed tendons do not allow linking arbitrary joint axes of the articulation: The respective joints must all be directly connected to each other in the articulation structure, i.e. each of the joints in the tendon must be connected by a single articulation link to another joint in the same tendon. This implies that fixed tendons can branch along with a branching articulation as well. In addition, the root tendon axis created by applying the PhysxTendonAxisRootAPI must be applied to the articulation joint that is the common ancestor of all joint axes in the fixed tendon.

In a future version, it will be possible to include multiple axes of a multi-axis joint (e.g. a spherical joint) in the fixed tendon by adding them to the axis token array, and setting their gearing and forceCoefficient accordingly in the respective float arrays (in the same order). Until then, the jointAxis token array is ignored, and only the first element of the gearing array is considered.

Public Functions

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

Construct a PhysxSchemaPhysxTendonAxisAPI on UsdPrim prim with name name . Equivalent to PhysxSchemaPhysxTendonAxisAPI::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 PhysxSchemaPhysxTendonAxisAPI(
const UsdSchemaBase &schemaObj,
const TfToken &name,
)#

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

inline virtual ~PhysxSchemaPhysxTendonAxisAPI()#

Destructor.

inline TfToken GetName() const#

Returns the name of this multiple-apply schema instance.

inline UsdAttribute GetGearingAttr() const#

Joint gearing(s) per joint axis in axis token array, in the same order. Range: (-inf, inf) Units: translational axis: unitless rotational axis: distance/degrees.

Declaration

float[] gearing = [1]

C++ Type

VtArray<float>

Usd Type

SdfValueTypeNames->FloatArray

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 GetForceCoefficientAttr() const#

Joint force coefficient(s) per joint axis in axis token array, in the same order. Range: (-inf, inf) Units: translational axis: unitless rotational axis: distance.

Declaration

float[] forceCoefficient = [1]

C++ Type

VtArray<float>

Usd Type

SdfValueTypeNames->FloatArray

inline UsdAttribute CreateForceCoefficientAttr() const#

See GetForceCoefficientAttr(), 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 GetJointAxisAttr() const#

Specifies target joint axis/axes. Ignored when the joint only has a single axis, e.g. a revolute joint.

Declaration

uniform token[] jointAxis

C++ Type

VtArray<TfToken>

Usd Type

SdfValueTypeNames->TokenArray

Variability

SdfVariabilityUniform

Allowed Values

transX, transY, transZ, rotX, rotY, rotZ

inline UsdAttribute CreateJointAxisAttr() const#

See GetJointAxisAttr(), 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.

UsdPrim GetPrim() const#

Return this schema object’s held prim.

SdfPath GetPath() const#

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

inline explicit operator bool() const#

Check if this schema object is compatible with it’s held prim and that the prim is valid.

A typed schema object is compatible if the held prim’s type is or is a subtype of the schema’s type. Based on prim.IsA().

An API schema object is compatible if the API is of type SingleApplyAPI or UsdSchemaType::MultipleApplyAPI, and the schema has been applied to the prim. Based on prim.HasAPI.

This method invokes polymorphic behaviour.

Returns:

True if the help prim is valid, and the schema object is compatible with its held prim.

Public Static Functions

static inline PhysxSchemaPhysxTendonAxisAPI 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 “PhysxTendonAxisAPI:<i>name</i>” to the token-valued, listOp metadata apiSchemas on the prim. For example, if name is ‘instance1’, the token ‘PhysxTendonAxisAPI:instance1’ is added to ‘apiSchemas’.

Returns:

A valid PhysxSchemaPhysxTendonAxisAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxTendonAxisAPI 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.

inline virtual bool _IsCompatible() const#

Check whether this APISchema object is valid for the currently held prim.

If this is an applied API schema, this returns true if the held prim is valid and already has the API schema applied to it, along with the instanceName (in the case of multiple-apply). The instanceName should not be empty in the case of a multiple-apply API schema.

This check is performed when clients invoke the explicit bool conversion operator, implemented in UsdSchemaBase.

inline const TfToken _GetType() const#

Helper for subclasses to get this schema’s type token.

Note

This diverges from Usd and returns a TfToken, since we don’t implements TfType.

Returns:

The token representing the schema’s TfType.