Applied to a Physics Joint that must be part of an articulation. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
PhysxSchemaPhysxMimicJointAPI (const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken()) | |
Construct a PhysxSchemaPhysxMimicJointAPI on UsdPrim prim with name name . More... | |
PhysxSchemaPhysxMimicJointAPI (const UsdSchemaBase &schemaObj, const TfToken &name) | |
Construct a PhysxSchemaPhysxMimicJointAPI on the prim held by schemaObj with name name . More... | |
virtual PHYSXSCHEMA_API | ~PhysxSchemaPhysxMimicJointAPI () |
Destructor. More... | |
TfToken | GetName () const |
Returns the name of this multiple-apply schema instance. More... | |
PHYSXSCHEMA_API UsdAttribute | GetReferenceJointAxisAttr () const |
The axis that marks the degree of freedom of the reference joint to mimic. More... | |
PHYSXSCHEMA_API UsdAttribute | CreateReferenceJointAxisAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetReferenceJointAxisAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
PHYSXSCHEMA_API UsdAttribute | GetGearingAttr () const |
The gearing coefficient (see relationship formulation in the documentation part of PhysxMimicJointAPI). More... | |
PHYSXSCHEMA_API UsdAttribute | CreateGearingAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetGearingAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
PHYSXSCHEMA_API UsdAttribute | GetOffsetAttr () const |
The offset coefficient (see relationship formulation in the documentation part of PhysxMimicJointAPI). 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... | |
PHYSXSCHEMA_API UsdRelationship | GetReferenceJointRel () const |
The joint that shall be mimicked. More... | |
PHYSXSCHEMA_API UsdRelationship | CreateReferenceJointRel () const |
See GetReferenceJointRel(), 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 PhysxSchemaPhysxMimicJointAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a PhysxSchemaPhysxMimicJointAPI holding the prim adhering to this schema at path on stage . More... | |
static PHYSXSCHEMA_API PhysxSchemaPhysxMimicJointAPI | Get (const UsdPrim &prim, const TfToken &name) |
Return a PhysxSchemaPhysxMimicJointAPI with name name holding the prim prim . More... | |
static PHYSXSCHEMA_API std::vector < PhysxSchemaPhysxMimicJointAPI > | GetAll (const UsdPrim &prim) |
Return a vector of all named instances of PhysxSchemaPhysxMimicJointAPI 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 PhysxMimicJointAPI. More... | |
static PHYSXSCHEMA_API bool | IsPhysxMimicJointAPIPath (const SdfPath &path, TfToken *name) |
Checks if the given path path is of an API schema of type PhysxMimicJointAPI. 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 PhysxSchemaPhysxMimicJointAPI | 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 |
Applied to a Physics Joint that must be part of an articulation.
Supported joint types are: PhysicsRevoluteJoint (with a limit set), PhysicsPrismaticJoint as well as the more generic PhysicsJoint if all linear degrees of freedom are locked.
This schema allows to interconnect the degrees of freedom of two joints according to the relationship: jointPosition + (gearing * referenceJointPosition) + offset = 0. This can be used to have, for example, one joint mimic the motion of another joint. The term "position" does not necessarily mean a translational unit, in the case of an angular degree of freedom it is an angle. The mimic joint operates on a single degree of freedom which is specified through the instance name of this multiple apply schema. The allowed instance name tokens are "rotX", "rotY" and "rotZ". See the documentation of the attribute referenceJointAxis for more info related to specifying the degree of freedom to operate on. Notes: 1) the two joints have to be part of the same articulation. 2) once the simulation has started, a significant performance penalty will be incurred if a mimic joint is added or removed, if the referenceJoint relationship is changed or if the referenceJointAxis attributes is modified. 3) the mimic joint relationship is interpreted as a two-way interaction and an impulse will get applied to the reference joint as well.
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.
Definition at line 76 of file physxMimicJointAPI.h.
|
inlineexplicit |
Construct a PhysxSchemaPhysxMimicJointAPI on UsdPrim prim
with name name
.
Equivalent to PhysxSchemaPhysxMimicJointAPI::Get( prim.GetStage(), prim.GetPath().AppendProperty( "physxMimicJoint:name"));
for a valid prim
, but will not immediately throw an error for an invalid prim
Definition at line 93 of file physxMimicJointAPI.h.
|
inlineexplicit |
Construct a PhysxSchemaPhysxMimicJointAPI on the prim held by schemaObj
with name name
.
Should be preferred over PhysxSchemaPhysxMimicJointAPI(schemaObj.GetPrim(), name), as it preserves SchemaBase state.
Definition at line 102 of file physxMimicJointAPI.h.
|
virtual |
Destructor.
|
overrideprotected |
Returns the kind of schema this class belongs to.
|
static |
Applies this multiple-apply API schema to the given prim
along with the given instance name, name
.
This information is stored by adding "PhysxMimicJointAPI:<i>name</i>" to the token-valued, listOp metadata apiSchemas on the prim. For example, if name
is 'instance1', the token 'PhysxMimicJointAPI:instance1' is added to 'apiSchemas'.
|
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.
PHYSXSCHEMA_API UsdAttribute CreateGearingAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetGearingAttr(), 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 CreateReferenceJointAxisAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetReferenceJointAxisAttr(), 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 UsdRelationship CreateReferenceJointRel | ( | ) | const |
See GetReferenceJointRel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.
|
static |
Return a PhysxSchemaPhysxMimicJointAPI 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>.physxMimicJoint:name .
This is shorthand for the following:
|
static |
Return a PhysxSchemaPhysxMimicJointAPI with name name
holding the prim prim
.
Shorthand for PhysxSchemaPhysxMimicJointAPI(prim, name);
|
static |
Return a vector of all named instances of PhysxSchemaPhysxMimicJointAPI on the given prim
.
PHYSXSCHEMA_API UsdAttribute GetGearingAttr | ( | ) | const |
The gearing coefficient (see relationship formulation in the documentation part of PhysxMimicJointAPI).
Range: (-inf, inf) Units: unitless or degrees/distance or distance/degrees (the last two refer to scenarios where a linear degree of freedom is connected to an angular one or vice versa)
Declaration | float gearing = 1 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
|
inline |
Returns the name of this multiple-apply schema instance.
Definition at line 128 of file physxMimicJointAPI.h.
PHYSXSCHEMA_API UsdAttribute GetOffsetAttr | ( | ) | const |
The offset coefficient (see relationship formulation in the documentation part of PhysxMimicJointAPI).
Range: (-inf, inf) Units: distance or degrees (depending on whether the mimic joint's degree of freedom is linear or angular)
Declaration | float offset = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
PHYSXSCHEMA_API UsdAttribute GetReferenceJointAxisAttr | ( | ) | const |
The axis that marks the degree of freedom of the reference joint to mimic.
Has to be a valid degree of freedom on the reference joint. For joint types with a single degree of freedom (like PhysicsRevoluteJoint or PhysicsPrismaticJoint), this attribute will be ignored since the axis is defined implicitly. The mimic joint connects <targetJoint, targetJointAxis> to <referenceJoint, referenceJointAxis> with targetJoint being the prim that has PhysxMimicJointAPI applied and targetJointAxis being defined through the instance name token of PhysxMimicJointAPI.
Declaration | uniform token referenceJointAxis = "rotX" |
C++ Type | TfToken |
Usd Type | SdfValueTypeNames->Token |
Variability | SdfVariabilityUniform |
Allowed Values | rotX, rotY, rotZ |
PHYSXSCHEMA_API UsdRelationship GetReferenceJointRel | ( | ) | const |
The joint that shall be mimicked.
Relationship to a prim that has the PhysicsJoint API schema applied. For the supported joint types, see the general documentation of PhysxMimicJointAPI. The reference joint as well as the joint that mimics the reference joint have to be part of the same articulation (see PhysicsArticulationRootAPI).
|
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 |
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.
|
static |
Checks if the given path path
is of an API schema of type PhysxMimicJointAPI.
If so, it stores the instance name of the schema in name
and returns true. Otherwise, it returns false.
|
static |
Checks if the given name baseName
is the base name of a property of PhysxMimicJointAPI.
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 82 of file physxMimicJointAPI.h.