All Classes Files Functions Variables Pages
PhysxSchemaPhysxTendonAttachmentRootAPI Class Reference

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

Inherits UsdAPISchemaBase.

Public Member Functions

 PhysxSchemaPhysxTendonAttachmentRootAPI (const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken())
 Construct a PhysxSchemaPhysxTendonAttachmentRootAPI on UsdPrim prim with name name . More...
 
 PhysxSchemaPhysxTendonAttachmentRootAPI (const UsdSchemaBase &schemaObj, const TfToken &name)
 Construct a PhysxSchemaPhysxTendonAttachmentRootAPI on the prim held by schemaObj with name name. More...
 
virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxTendonAttachmentRootAPI ()
 Destructor. More...
 
TfToken GetName () const
 Returns the name of this multiple-apply schema instance. More...
 
PHYSXSCHEMA_API UsdAttribute GetTendonEnabledAttr () const
 Enables/disables the tendon from contributing to the articulation dynamics. More...
 
PHYSXSCHEMA_API UsdAttribute CreateTendonEnabledAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetTendonEnabledAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetStiffnessAttr () const
 Common sub-tendon length spring stiffness. More...
 
PHYSXSCHEMA_API UsdAttribute CreateStiffnessAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetStiffnessAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetDampingAttr () const
 Common sub-tendon length damping. More...
 
PHYSXSCHEMA_API UsdAttribute CreateDampingAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetDampingAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetLimitStiffnessAttr () const
 Common sub-tendon length-limit spring stiffness. More...
 
PHYSXSCHEMA_API UsdAttribute CreateLimitStiffnessAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetLimitStiffnessAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetOffsetAttr () const
 Common sub-tendon length offset. More...
 
PHYSXSCHEMA_API UsdAttribute CreateOffsetAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetOffsetAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 

Static Public Member Functions

static PHYSXSCHEMA_API const
TfTokenVector & 
GetSchemaAttributeNames (bool includeInherited=true)
 Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. More...
 
static PHYSXSCHEMA_API
TfTokenVector 
GetSchemaAttributeNames (bool includeInherited, const TfToken &instanceName)
 Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxTendonAttachmentRootAPI 
Get (const UsdStagePtr &stage, const SdfPath &path)
 Return a PhysxSchemaPhysxTendonAttachmentRootAPI holding the prim adhering to this schema at path on stage. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxTendonAttachmentRootAPI 
Get (const UsdPrim &prim, const TfToken &name)
 Return a PhysxSchemaPhysxTendonAttachmentRootAPI with name name holding the prim prim. More...
 
static PHYSXSCHEMA_API
std::vector
< PhysxSchemaPhysxTendonAttachmentRootAPI
GetAll (const UsdPrim &prim)
 Return a vector of all named instances of PhysxSchemaPhysxTendonAttachmentRootAPI on the given prim. More...
 
static PHYSXSCHEMA_API bool IsSchemaPropertyBaseName (const TfToken &baseName)
 Checks if the given name baseName is the base name of a property of PhysxTendonAttachmentRootAPI. More...
 
static PHYSXSCHEMA_API bool IsPhysxTendonAttachmentRootAPIPath (const SdfPath &path, TfToken *name)
 Checks if the given path path is of an API schema of type PhysxTendonAttachmentRootAPI. More...
 
static PHYSXSCHEMA_API bool CanApply (const UsdPrim &prim, const TfToken &name, std::string *whyNot=nullptr)
 Returns true if this multiple-apply API schema can be applied, with the given instance name, name, to the given prim. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxTendonAttachmentRootAPI 
Apply (const UsdPrim &prim, const TfToken &name)
 Applies this multiple-apply API schema to the given prim along with the given instance name, name. More...
 

Static Public Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::MultipleApplyAPI
 Compile time constant representing what kind of schema this class is. More...
 

Protected Member Functions

PHYSXSCHEMA_API UsdSchemaKind _GetSchemaKind () const override
 Returns the kind of schema this class belongs to. More...
 

Friends

class UsdSchemaRegistry
 

Detailed Description

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

Applied to an articulation-link rigid-body Xformable.

The root API creates a new spatial tendon tree. The root tendon attachment is the only attachment in a tendon tree that does not have a parent, so the parentLink, parentAttachment, and gearing attributes inherited from PhysxTendonAttachmentAPI are ignored for a root.

Spatial tendons create line-of-sight distance constraints between links of a single articulation. In particular, spatial tendons run through attachments that are positioned relative to a rigid-body link, and their length is defined as a weighted sum of the distance between the attachments in the tendon.

Spatial tendons may branch, in which case the tendon splits up into multiple conceptual sub-tendons, one for each root-to-leaf path in the tendon tree. The tendon tree starts at the root, and its topology is defined by the attachments' parentLink rel and parentAttachment token.

It is possible to create multiple attachments per link, see PhysxTendonAttachmentAPI.

Details on dynamics:

The length of a sub-tendon in the tree is

subTendonLength = sum(gearing[i] * |p[i] - p_parent[i]|)

where the sum is evaluated along the unique tree path between root and leaf. The gearing[i] is the i-th attachment's gearing, and |p[i] - p_parent[i]| is the distance between the positions of the i-th attachment and its parent attachment.

Each subtendon has spring-damper dynamics acting on the length constraint

constraint = 0 = offset + subTendonLength - restLength

where the offset is a common summand for all sub-tendons of a spatial tendon, and the restLength is specific to a sub-tendon, see the PhysxTendonAttachmentLeafAPI.

If limits are not active, the sub-tendon force that acts on the leaf is

F = stiffness * constraint + damping * tendonVelocity

where tendonVelocity is the sum of the time derivatives of the line-of-sight distances between 1) the leaf and its parent attachment and 2) the tendon root and its first child attachment on the path to the leaf. Stiffness and damping are common parameters for all sub-tendons.

The 3D force applied at the leaf attachment is equal to

F * (p_parent - p_leaf).

where p_leaf and p_parent are the leaf's position and its parent's position, respectively. The reaction force acting on the root attachment is

F * (p_child_leaf - p_root)

where p_child_leaf is the position of the root's child attachment that leads to the leaf that produces F, and p_root is the root attachment position. The tendon force is not further propagated through the tendon, so at intermediate attachments (i.e. created by PhysxTendonAttachmentAPI) no forces are applied.

Note that a spatial tendon may both pull and push on the leaf and root attachments. A string-like, one-sided constraint can be implemented using the sub-tendon's length limits.

Sub-tendon length limits constrain the offset length

lowerLimit <= subTendonLength + offset<= upperLimit

and, when active, add a restoring spring force parametrized by limitStiffness to the tendon force, analogous to the length constraint force above. Limit dynamics are damped by the tendon-length damping that is applied regardless of a limit being active. Limit parameters are attributes of the PhysxTendonAttachmentLeafAPI.

Definition at line 123 of file physxTendonAttachmentRootAPI.h.

Constructor & Destructor Documentation

PhysxSchemaPhysxTendonAttachmentRootAPI ( const UsdPrim &  prim = UsdPrim(),
const TfToken &  name = TfToken() 
)
inlineexplicit

Construct a PhysxSchemaPhysxTendonAttachmentRootAPI on UsdPrim prim with name name .

Equivalent to PhysxSchemaPhysxTendonAttachmentRootAPI::Get( prim.GetStage(), prim.GetPath().AppendProperty( "physxTendon:name"));

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

Definition at line 140 of file physxTendonAttachmentRootAPI.h.

PhysxSchemaPhysxTendonAttachmentRootAPI ( const UsdSchemaBase &  schemaObj,
const TfToken &  name 
)
inlineexplicit

Construct a PhysxSchemaPhysxTendonAttachmentRootAPI on the prim held by schemaObj with name name.

Should be preferred over PhysxSchemaPhysxTendonAttachmentRootAPI(schemaObj.GetPrim(), name), as it preserves SchemaBase state.

Definition at line 149 of file physxTendonAttachmentRootAPI.h.

virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxTendonAttachmentRootAPI ( )
virtual

Destructor.

Member Function Documentation

PHYSXSCHEMA_API UsdSchemaKind _GetSchemaKind ( ) const
overrideprotected

Returns the kind of schema this class belongs to.

See Also
UsdSchemaKind
static PHYSXSCHEMA_API PhysxSchemaPhysxTendonAttachmentRootAPI Apply ( const UsdPrim &  prim,
const TfToken &  name 
)
static

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

This information is stored by adding "PhysxTendonAttachmentRootAPI:<i>name</i>" to the token-valued, listOp metadata apiSchemas on the prim. For example, if name is 'instance1', the token 'PhysxTendonAttachmentRootAPI:instance1' is added to 'apiSchemas'.

Returns
A valid PhysxSchemaPhysxTendonAttachmentRootAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxTendonAttachmentRootAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.
See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
static PHYSXSCHEMA_API bool CanApply ( const UsdPrim &  prim,
const TfToken &  name,
std::string *  whyNot = nullptr 
)
static

Returns true if this multiple-apply API schema can be applied, with the given instance name, name, to the given prim.

If this schema can not be a applied the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied.

Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema.

See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
PHYSXSCHEMA_API UsdAttribute CreateDampingAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetDampingAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateLimitStiffnessAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetLimitStiffnessAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateOffsetAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetOffsetAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateStiffnessAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetStiffnessAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateTendonEnabledAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetTendonEnabledAttr(), and also Usd_Create_Or_Get_Property 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.

static PHYSXSCHEMA_API PhysxSchemaPhysxTendonAttachmentRootAPI Get ( const UsdStagePtr &  stage,
const SdfPath &  path 
)
static

Return a PhysxSchemaPhysxTendonAttachmentRootAPI holding the prim adhering to this schema at path on stage.

If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. path must be of the format <path>.physxTendon:name .

This is shorthand for the following:

* TfToken name = SdfPath::StripNamespace(path.GetToken());
* stage->GetPrimAtPath(path.GetPrimPath()), name);
*
static PHYSXSCHEMA_API PhysxSchemaPhysxTendonAttachmentRootAPI Get ( const UsdPrim &  prim,
const TfToken &  name 
)
static

Return a PhysxSchemaPhysxTendonAttachmentRootAPI with name name holding the prim prim.

Shorthand for PhysxSchemaPhysxTendonAttachmentRootAPI(prim, name);

static PHYSXSCHEMA_API std::vector<PhysxSchemaPhysxTendonAttachmentRootAPI> GetAll ( const UsdPrim &  prim)
static

Return a vector of all named instances of PhysxSchemaPhysxTendonAttachmentRootAPI on the given prim.

PHYSXSCHEMA_API UsdAttribute GetDampingAttr ( ) const

Common sub-tendon length damping.

Range: [0, inf) Units: force / distance * time = mass / time

Declaration float damping = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
PHYSXSCHEMA_API UsdAttribute GetLimitStiffnessAttr ( ) const

Common sub-tendon length-limit spring stiffness.

Range: [0, inf) Units: force / distance = mass / time / time

Declaration float limitStiffness = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
TfToken GetName ( ) const
inline

Returns the name of this multiple-apply schema instance.

Definition at line 175 of file physxTendonAttachmentRootAPI.h.

PHYSXSCHEMA_API UsdAttribute GetOffsetAttr ( ) const

Common sub-tendon length offset.

Range: (-inf, inf) Units: distance

Declaration float offset = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
static PHYSXSCHEMA_API const TfTokenVector& GetSchemaAttributeNames ( bool  includeInherited = true)
static

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static PHYSXSCHEMA_API TfTokenVector GetSchemaAttributeNames ( bool  includeInherited,
const TfToken &  instanceName 
)
static

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name.

Does not include attributes that may be authored by custom/extended methods of the schemas involved. The names returned will have the proper namespace prefix.

PHYSXSCHEMA_API UsdAttribute GetStiffnessAttr ( ) const

Common sub-tendon length spring stiffness.

Range: [0, inf) Units: force / distance = mass / time / time

Declaration float stiffness = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
PHYSXSCHEMA_API UsdAttribute GetTendonEnabledAttr ( ) const

Enables/disables the tendon from contributing to the articulation dynamics.

Declaration bool tendonEnabled = 1
C++ Type bool
Usd Type SdfValueTypeNames->Bool
static PHYSXSCHEMA_API bool IsPhysxTendonAttachmentRootAPIPath ( const SdfPath &  path,
TfToken *  name 
)
static

Checks if the given path path is of an API schema of type PhysxTendonAttachmentRootAPI.

If so, it stores the instance name of the schema in name and returns true. Otherwise, it returns false.

static PHYSXSCHEMA_API bool IsSchemaPropertyBaseName ( const TfToken &  baseName)
static

Checks if the given name baseName is the base name of a property of PhysxTendonAttachmentRootAPI.

Member Data Documentation

const UsdSchemaKind schemaKind = UsdSchemaKind::MultipleApplyAPI
static

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

See Also
UsdSchemaKind

Definition at line 129 of file physxTendonAttachmentRootAPI.h.


The documentation for this class was generated from the following file: