UsdPhysics Schema#

Typedefs

using JointLimits = std::vector<std::pair<UsdPhysicsJointDOF, UsdPhysicsJointLimit>>#
using JointDrives = std::vector<std::pair<UsdPhysicsJointDOF, UsdPhysicsJointDrive>>#
using UsdPhysicsReportFn = std::function<void(UsdPhysicsObjectType type, TfSpan<const SdfPath> primPaths, TfSpan<const UsdPhysicsObjectDesc> objectDescs, const VtValue &userData)>#

UsdPhysicsReportFn - report function that reports parsed data in a batched manner. This function is called after all the parsing is done and all the physics descriptors are constructed.

Param type:

[in] Type of the parsed physics objects

Param primPaths:

[in] Span of prim paths of the reported type

Param objectDescs:

[in] Corresponding span of object descriptors of the reported type

Param userData:

[in] User data provided to the called parsing function

Enums

enum class UsdPhysicsObjectType#

Values:

enumerator Undefined#
enumerator Scene#
enumerator RigidBody#
enumerator SphereShape#
enumerator CubeShape#
enumerator CapsuleShape#
enumerator Capsule1Shape#
enumerator CylinderShape#
enumerator Cylinder1Shape#
enumerator ConeShape#
enumerator MeshShape#
enumerator PlaneShape#
enumerator CustomShape#
enumerator SpherePointsShape#
enumerator FixedJoint#
enumerator RevoluteJoint#
enumerator PrismaticJoint#
enumerator SphericalJoint#
enumerator DistanceJoint#
enumerator D6Joint#
enumerator CustomJoint#
enumerator RigidBodyMaterial#
enumerator Articulation#
enumerator CollisionGroup#
enumerator Last#
enum class UsdPhysicsAxis#

Values:

enumerator X#
enumerator Y#
enumerator Z#
enum class UsdPhysicsJointDOF#

Values:

enumerator Distance#
enumerator TransX#
enumerator TransY#
enumerator TransZ#
enumerator RotX#
enumerator RotY#
enumerator RotZ#

Functions

GfQuatf UsdPhysicsIndexedRotation(uint32_t axis, float s, float c)#
uint32_t UsdPhysicsGetNextIndex3(uint32_t i)#
GfVec3f UsdPhysicsDiagonalize(
const GfMatrix3f &m,
GfQuatf &massFrame,
)#
double UsdPhysicsGetStageKilogramsPerUnit(
const UsdStageWeakPtr &stage,
)#

Return stage’s authored kilogramsPerUnit, or 1.0 if unauthored.

bool UsdPhysicsStageHasAuthoredKilogramsPerUnit(
const UsdStageWeakPtr &stage,
)#

Return whether stage has an authored kilogramsPerUnit.

bool UsdPhysicsSetStageKilogramsPerUnit(
const UsdStageWeakPtr &stage,
double kilogramsPerUnit,
)#

Author stage’s kilogramsPerUnit.

Returns:

true if kilogramsPerUnit was successfully set. The stage’s UsdEditTarget must be either its root layer or session layer.

bool UsdPhysicsMassUnitsAre(
double authoredUnits,
double standardUnits,
double epsilon = 1e-5,
)#

Return true if the two given metrics are within the provided relative epsilon of each other, when you need to know an absolute metric rather than a scaling factor.

Use like so:

double stageUnits = UsdPhysicsGetStageKilogramsPerUnit(stage);

if (UsdPhysicsMassUnitsAre(stageUnits, UsdPhysicsMassUnits::kilograms))
    // do something for kilograms
else if (UsdPhysicsMassUnitsAre(stageUnits, UsdPhysicsMassUnits::grams))
    // do something for grams

Returns:

false if either input is zero or negative, otherwise relative floating-point comparison between the two inputs.

bool LoadUsdPhysicsFromRange(
const UsdStageWeakPtr stage,
const std::vector<SdfPath> &includePaths,
UsdPhysicsReportFn reportFn,
const VtValue &userData,
const std::vector<SdfPath> *excludePaths = nullptr,
const CustomUsdPhysicsTokens *customPhysicsTokens = nullptr,
const std::vector<SdfPath> *simulationOwners = nullptr,
)#

Load USD physics from a given list of paths. This helper function traverses the provided USD stage by constructing UsdPrimRanges from given include paths (subhierarchies can be prunes through exclude paths) and returns parsed physics objects through the report function.

See the parsing utils documentation for more details.

Parameters:
  • stage[in] Stage to be traversed and parsed.

  • includePaths[in] The vector of SdfPaths that are used to construct UsdPrimRange for traversals. For each path a UsdPrim is found on the stage and UsdRange traversal is constructed from it. All the traversed UsdPrims are parsed and physics descriptors are constructed and reported through the report function.

  • reportFn[in] Report function that gets parsed USD physics data see

  • userData[in] User data passed to report function, this can be arbitrary data structure, user data acts as a bridge between reportFn and the data structures understood by the Simulator. Implementer of reportFn can use the parsed “objectDesc” to populate these simulator-compatible data structures, which are passed as userData here.

  • excludePaths[in] The vector of SdfPaths that are used to prune UsdPrims from the parsing UsdPrimRange traversals constructed from the include paths.

  • customPhysicsTokens[in] Custom tokens to be reported by the parsing see

  • simulationOwners[in] List of simulation owners that should be parsed, adding SdfPath() indicates that objects without a simulation owner should be parsed too.

Returns:

True if load was successful

Variables

const float usdPhysicsSentinelLimit = 0.5e38f#

Sentinel value for flt max compare.

TfStaticData<UsdPhysicsTokensType> UsdPhysicsTokens#

A global variable with static, efficient TfToken for use in all public USD API.

class UsdPhysicsArticulationRootAPI : public UsdAPISchemaBase#

PhysicsArticulationRootAPI can be applied to a scene graph node, and marks the subtree rooted here for inclusion in one or more reduced coordinate articulations. For floating articulations, this should be on the root body. For fixed articulations (robotics jargon for e.g. a robot arm for welding that is bolted to the floor), this API can be on a direct or indirect parent of the root joint which is connected to the world, or on the joint itself..

Public Functions

inline explicit UsdPhysicsArticulationRootAPI(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsArticulationRootAPI(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsArticulationRootAPI()#

Destructor.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsArticulationRootAPI Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsArticulationRootAPI 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. This is shorthand for the following:

UsdPhysicsArticulationRootAPI(stage->GetPrimAtPath(path));
static bool CanApply(
const UsdPrim &prim,
std::string *whyNot = nullptr,
)#

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

static UsdPhysicsArticulationRootAPI Apply(const UsdPrim &prim)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysicsArticulationRootAPI” to the token-valued, listOp metadata apiSchemas on the prim.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsCollisionAPI : public UsdAPISchemaBase#

Applies collision attributes to a UsdGeomXformable prim. If a simulation is running, this geometry will collide with other geometries that have PhysicsCollisionAPI applied. If a prim in the parent hierarchy has the RigidBodyAPI applied, this collider is a part of that body. If there is no body in the parent hierarchy, this collider is considered to be static.

Public Functions

inline explicit UsdPhysicsCollisionAPI(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsCollisionAPI(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsCollisionAPI()#

Destructor.

UsdAttribute GetCollisionEnabledAttr() const#

Determines if the PhysicsCollisionAPI is enabled.

Declaration

bool physics:collisionEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateCollisionEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetSimulationOwnerRel() const#

Single PhysicsScene that will simulate this collider. By default this object belongs to the first PhysicsScene. Note that if a RigidBodyAPI in the hierarchy above has a different simulationOwner then it has a precedence over this relationship.

UsdRelationship CreateSimulationOwnerRel() const#

See GetSimulationOwnerRel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsCollisionAPI Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsCollisionAPI 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. This is shorthand for the following:

UsdPhysicsCollisionAPI(stage->GetPrimAtPath(path));
static bool CanApply(
const UsdPrim &prim,
std::string *whyNot = nullptr,
)#

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

static UsdPhysicsCollisionAPI Apply(const UsdPrim &prim)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysicsCollisionAPI” to the token-valued, listOp metadata apiSchemas on the prim.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsCollisionGroup : public UsdTyped#

Defines a collision group for coarse filtering. When a collision occurs between two objects that have a PhysicsCollisionGroup assigned, they will collide with each other unless this PhysicsCollisionGroup pair is filtered. See filteredGroups attribute.

A CollectionAPI:colliders maintains a list of PhysicsCollisionAPI rel-s that defines the members of this Collisiongroup.

Public Functions

inline explicit UsdPhysicsCollisionGroup(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsCollisionGroup(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsCollisionGroup()#

Destructor.

UsdAttribute GetMergeGroupNameAttr() const#

If non-empty, any collision groups in a stage with a matching mergeGroup should be considered to refer to the same collection. Matching collision groups should behave as if there were a single group containing referenced colliders and filter groups from both collections.

Declaration

string physics:mergeGroup

C++ Type

std::string

Usd_Datatypes “Usd Type”

SdfValueTypeNames->String

UsdAttribute CreateMergeGroupNameAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetInvertFilteredGroupsAttr() const#

Normally, the filter will disable collisions against the selected filter groups. However, if this option is set, the filter will disable collisions against all colliders except for those in the selected filter groups.

Declaration

bool physics:invertFilteredGroups

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateInvertFilteredGroupsAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetFilteredGroupsRel() const#

References a list of PhysicsCollisionGroups with which collisions should be ignored.

UsdRelationship CreateFilteredGroupsRel() const#

See GetFilteredGroupsRel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

UsdCollectionAPI GetCollidersCollectionAPI() const#

Return the UsdCollectionAPI interface used for defining what colliders belong to the CollisionGroup.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsCollisionGroup Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsCollisionGroup 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. This is shorthand for the following:

UsdPhysicsCollisionGroup(stage->GetPrimAtPath(path));
static UsdPhysicsCollisionGroup Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

static CollisionGroupTable ComputeCollisionGroupTable(
const UsdStage &stage,
)#

Compute a table encoding all the collision groups filter rules for a stage. This can be used as a reference to validate an implementation of the collision groups filters. The returned table is diagonally symmetric.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

struct CollisionGroupTable#

Utility structure generated by ComputeCollisionGroupTable(); contains a table describing which pairs of collision groups have collisions enabled/disabled by the filtering rules.

Public Functions

const SdfPathVector &GetCollisionGroups() const#

Return the set of all UsdPhysicsCollisionGroup which this table contains.

bool IsCollisionEnabled(
const unsigned int idxA,
const unsigned int idxB,
) const#

Return true if the groups at indices idxA and idxB collide.

bool IsCollisionEnabled(
const SdfPath &primA,
const SdfPath &primB,
) const#

Return true if the groups primA and primB collide.

class UsdPhysicsDistanceJoint : public UsdPhysicsJoint#

Predefined distance joint type (Distance between rigid bodies may be limited to given minimum or maximum distance.)

Public Functions

inline explicit UsdPhysicsDistanceJoint(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsDistanceJoint(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsDistanceJoint()#

Destructor.

UsdAttribute GetMinDistanceAttr() const#

Minimum distance. If attribute is negative, the joint is not limited. Units: distance.

Declaration

float physics:minDistance = -1

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateMinDistanceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetMaxDistanceAttr() const#

Maximum distance. If attribute is negative, the joint is not limited. Units: distance.

Declaration

float physics:maxDistance = -1

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateMaxDistanceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos0Attr() const#

Relative position of the joint frame to body0’s frame.

Declaration

point3f physics:localPos0 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot0Attr() const#

Relative orientation of the joint frame to body0’s frame.

Declaration

quatf physics:localRot0 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos1Attr() const#

Relative position of the joint frame to body1’s frame.

Declaration

point3f physics:localPos1 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot1Attr() const#

Relative orientation of the joint frame to body1’s frame.

Declaration

quatf physics:localRot1 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetJointEnabledAttr() const#

Determines if the joint is enabled.

Declaration

bool physics:jointEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateJointEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetCollisionEnabledAttr() const#

Determines if the jointed subtrees should collide or not.

Declaration

bool physics:collisionEnabled = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateCollisionEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetExcludeFromArticulationAttr() const#

Determines if the joint can be included in an Articulation.

Declaration

uniform bool physics:excludeFromArticulation = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

SdfVariability “Variability”

SdfVariabilityUniform

UsdAttribute CreateExcludeFromArticulationAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakForceAttr() const#

Joint break force. If set, joint is to break when this force limit is reached. (Used for linear DOFs.) Units: mass * distance / second / second.

Declaration

float physics:breakForce = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakForceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakTorqueAttr() const#

Joint break torque. If set, joint is to break when this torque limit is reached. (Used for angular DOFs.) Units: mass * distance * distance / second / second.

Declaration

float physics:breakTorque = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakTorqueAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetBody0Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody0Rel() const#

See GetBody0Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

UsdRelationship GetBody1Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody1Rel() const#

See GetBody1Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsDistanceJoint Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsDistanceJoint 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. This is shorthand for the following:

UsdPhysicsDistanceJoint(stage->GetPrimAtPath(path));
static UsdPhysicsDistanceJoint Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsDriveAPI : public UsdAPISchemaBase#

The PhysicsDriveAPI when applied to any joint primitive will drive the joint towards a given target. The PhysicsDriveAPI is a multipleApply schema: drive can be set per axis “transX”, “transY”, “transZ”, “rotX”, “rotY”, “rotZ” or its “linear” for prismatic joint or “angular” for revolute joints. Setting these as a multipleApply schema TfToken name will define the degree of freedom the DriveAPI is applied to. Each drive is an implicit force-limited damped spring: Force or acceleration = stiffness * (targetPosition - position)

  • damping * (targetVelocity - velocity)

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value “rightHanded”, use UsdPhysicsTokens->rightHanded as the value.

Public Functions

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

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

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

inline explicit UsdPhysicsDriveAPI(
const UsdSchemaBase &schemaObj,
const TfToken &name,
)#

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

virtual ~UsdPhysicsDriveAPI()#

Destructor.

inline TfToken GetName() const#

Returns the name of this multiple-apply schema instance.

UsdAttribute GetTypeAttr() const#

Drive spring is for the acceleration at the joint (rather than the force).

Declaration

uniform token physics:type = "force"

C++ Type

TfToken

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Token

SdfVariability “Variability”

SdfVariabilityUniform

Allowed Values

force, acceleration

UsdAttribute CreateTypeAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetMaxForceAttr() const#

Maximum force that can be applied to drive. Units: if linear drive: mass*DIST_UNITS/second/second if angular drive: mass*DIST_UNITS*DIST_UNITS/second/second inf means not limited. Must be non-negative.

Declaration

float physics:maxForce = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateMaxForceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetTargetPositionAttr() const#

Target value for position. Units: if linear drive: distance if angular drive: degrees.

Declaration

float physics:targetPosition = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateTargetPositionAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetTargetVelocityAttr() const#

Target value for velocity. Units: if linear drive: distance/second if angular drive: degrees/second.

Declaration

float physics:targetVelocity = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateTargetVelocityAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetDampingAttr() const#

Damping of the drive. Units: if linear drive: mass/second If angular drive: mass*DIST_UNITS*DIST_UNITS/second/degrees.

Declaration

float physics:damping = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

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.

UsdAttribute GetStiffnessAttr() const#

Stiffness of the drive. Units: if linear drive: mass/second/second if angular drive: mass*DIST_UNITS*DIST_UNITS/degrees/second/second.

Declaration

float physics:stiffness = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

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.

Public Members

path drive#

Return a UsdPhysicsDriveAPI 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.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static 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. 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 UsdPhysicsDriveAPI Get(
const UsdPrim &prim,
const TfToken &name,
)#

Return a UsdPhysicsDriveAPI with name name holding the prim prim. Shorthand for UsdPhysicsDriveAPI(prim, name);.

static std::vector<UsdPhysicsDriveAPI> GetAll(const UsdPrim &prim)#

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

static bool IsSchemaPropertyBaseName(const TfToken &baseName)#

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

static bool IsPhysicsDriveAPIPath(const SdfPath &path, TfToken *name)#

Checks if the given path path is of an API schema of type PhysicsDriveAPI. If so, it stores the instance name of the schema in name and returns true. Otherwise, it returns false.

static 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. 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

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

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::MultipleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsFilteredPairsAPI : public UsdAPISchemaBase#

API to describe fine-grained filtering. If a collision between two objects occurs, this pair might be filtered if the pair is defined through this API. This API can be applied either to a body or collision or even articulation. The “filteredPairs” defines what objects it should not collide against. Note that FilteredPairsAPI filtering has precedence over CollisionGroup filtering.

Public Functions

inline explicit UsdPhysicsFilteredPairsAPI(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsFilteredPairsAPI(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsFilteredPairsAPI()#

Destructor.

UsdRelationship GetFilteredPairsRel() const#

Relationship to objects that should be filtered.

UsdRelationship CreateFilteredPairsRel() const#

See GetFilteredPairsRel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsFilteredPairsAPI Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsFilteredPairsAPI 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. This is shorthand for the following:

UsdPhysicsFilteredPairsAPI(stage->GetPrimAtPath(path));
static bool CanApply(
const UsdPrim &prim,
std::string *whyNot = nullptr,
)#

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

static UsdPhysicsFilteredPairsAPI Apply(const UsdPrim &prim)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysicsFilteredPairsAPI” to the token-valued, listOp metadata apiSchemas on the prim.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsFixedJoint : public UsdPhysicsJoint#

Predefined fixed joint type (All degrees of freedom are removed.)

Public Functions

inline explicit UsdPhysicsFixedJoint(const UsdPrim &prim = UsdPrim())#

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

inline explicit UsdPhysicsFixedJoint(const UsdSchemaBase &schemaObj)#

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

virtual ~UsdPhysicsFixedJoint()#

Destructor.

UsdAttribute GetLocalPos0Attr() const#

Relative position of the joint frame to body0’s frame.

Declaration

point3f physics:localPos0 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot0Attr() const#

Relative orientation of the joint frame to body0’s frame.

Declaration

quatf physics:localRot0 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos1Attr() const#

Relative position of the joint frame to body1’s frame.

Declaration

point3f physics:localPos1 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot1Attr() const#

Relative orientation of the joint frame to body1’s frame.

Declaration

quatf physics:localRot1 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetJointEnabledAttr() const#

Determines if the joint is enabled.

Declaration

bool physics:jointEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateJointEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetCollisionEnabledAttr() const#

Determines if the jointed subtrees should collide or not.

Declaration

bool physics:collisionEnabled = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateCollisionEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetExcludeFromArticulationAttr() const#

Determines if the joint can be included in an Articulation.

Declaration

uniform bool physics:excludeFromArticulation = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

SdfVariability “Variability”

SdfVariabilityUniform

UsdAttribute CreateExcludeFromArticulationAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakForceAttr() const#

Joint break force. If set, joint is to break when this force limit is reached. (Used for linear DOFs.) Units: mass * distance / second / second.

Declaration

float physics:breakForce = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakForceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakTorqueAttr() const#

Joint break torque. If set, joint is to break when this torque limit is reached. (Used for angular DOFs.) Units: mass * distance * distance / second / second.

Declaration

float physics:breakTorque = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakTorqueAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetBody0Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody0Rel() const#

See GetBody0Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

UsdRelationship GetBody1Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody1Rel() const#

See GetBody1Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsFixedJoint Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsFixedJoint 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. This is shorthand for the following:

UsdPhysicsFixedJoint(stage->GetPrimAtPath(path));
static UsdPhysicsFixedJoint Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsJoint : public UsdGeomImageable#

A joint constrains the movement of rigid bodies. Joint can be created between two rigid bodies or between one rigid body and world. By default joint primitive defines a D6 joint where all degrees of freedom are free. Three linear and three angular degrees of freedom. Note that default behavior is to disable collision between jointed bodies.

Subclassed by PhysxSchemaPhysxPhysicsGearJoint, PhysxSchemaPhysxPhysicsRackAndPinionJoint, UsdPhysicsDistanceJoint, UsdPhysicsFixedJoint, UsdPhysicsPrismaticJoint, UsdPhysicsRevoluteJoint, UsdPhysicsSphericalJoint

Public Functions

inline explicit UsdPhysicsJoint(const UsdPrim &prim = UsdPrim())#

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

inline explicit UsdPhysicsJoint(const UsdSchemaBase &schemaObj)#

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

virtual ~UsdPhysicsJoint()#

Destructor.

UsdAttribute GetLocalPos0Attr() const#

Relative position of the joint frame to body0’s frame.

Declaration

point3f physics:localPos0 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot0Attr() const#

Relative orientation of the joint frame to body0’s frame.

Declaration

quatf physics:localRot0 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos1Attr() const#

Relative position of the joint frame to body1’s frame.

Declaration

point3f physics:localPos1 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot1Attr() const#

Relative orientation of the joint frame to body1’s frame.

Declaration

quatf physics:localRot1 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetJointEnabledAttr() const#

Determines if the joint is enabled.

Declaration

bool physics:jointEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateJointEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetCollisionEnabledAttr() const#

Determines if the jointed subtrees should collide or not.

Declaration

bool physics:collisionEnabled = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateCollisionEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetExcludeFromArticulationAttr() const#

Determines if the joint can be included in an Articulation.

Declaration

uniform bool physics:excludeFromArticulation = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

SdfVariability “Variability”

SdfVariabilityUniform

UsdAttribute CreateExcludeFromArticulationAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakForceAttr() const#

Joint break force. If set, joint is to break when this force limit is reached. (Used for linear DOFs.) Units: mass * distance / second / second.

Declaration

float physics:breakForce = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakForceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakTorqueAttr() const#

Joint break torque. If set, joint is to break when this torque limit is reached. (Used for angular DOFs.) Units: mass * distance * distance / second / second.

Declaration

float physics:breakTorque = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakTorqueAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetBody0Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody0Rel() const#

See GetBody0Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

UsdRelationship GetBody1Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody1Rel() const#

See GetBody1Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsJoint Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsJoint 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. This is shorthand for the following:

UsdPhysicsJoint(stage->GetPrimAtPath(path));
static UsdPhysicsJoint Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsLimitAPI : public UsdAPISchemaBase#

The PhysicsLimitAPI can be applied to a PhysicsJoint and will restrict the movement along an axis. PhysicsLimitAPI is a multipleApply schema: The PhysicsJoint can be restricted along “transX”, “transY”, “transZ”, “rotX”, “rotY”, “rotZ”, “distance”. Setting these as a multipleApply schema TfToken name will define the degree of freedom the PhysicsLimitAPI is applied to. Note that if the low limit is higher than the high limit, motion along this axis is considered locked.

Public Functions

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

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

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

inline explicit UsdPhysicsLimitAPI(
const UsdSchemaBase &schemaObj,
const TfToken &name,
)#

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

virtual ~UsdPhysicsLimitAPI()#

Destructor.

inline TfToken GetName() const#

Returns the name of this multiple-apply schema instance.

UsdAttribute GetLowAttr() const#

Lower limit. Units: degrees or distance depending on trans or rot axis applied to. -inf means not limited in negative direction.

Declaration

float physics:low = -inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateLowAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetHighAttr() const#

Upper limit. Units: degrees or distance depending on trans or rot axis applied to. inf means not limited in positive direction.

Declaration

float physics:high = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateHighAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

Public Members

path limit#

Return a UsdPhysicsLimitAPI 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.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static 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. 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 UsdPhysicsLimitAPI Get(
const UsdPrim &prim,
const TfToken &name,
)#

Return a UsdPhysicsLimitAPI with name name holding the prim prim. Shorthand for UsdPhysicsLimitAPI(prim, name);.

static std::vector<UsdPhysicsLimitAPI> GetAll(const UsdPrim &prim)#

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

static bool IsSchemaPropertyBaseName(const TfToken &baseName)#

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

static bool IsPhysicsLimitAPIPath(const SdfPath &path, TfToken *name)#

Checks if the given path path is of an API schema of type PhysicsLimitAPI. If so, it stores the instance name of the schema in name and returns true. Otherwise, it returns false.

static 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. 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

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

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::MultipleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsMassAPI : public UsdAPISchemaBase#

Defines explicit mass properties (mass, density, inertia etc.).

MassAPI can be applied to any object that has a PhysicsCollisionAPI or a PhysicsRigidBodyAPI.

Public Functions

inline explicit UsdPhysicsMassAPI(const UsdPrim &prim = UsdPrim())#

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

inline explicit UsdPhysicsMassAPI(const UsdSchemaBase &schemaObj)#

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

virtual ~UsdPhysicsMassAPI()#

Destructor.

UsdAttribute GetMassAttr() const#

If non-zero, directly specifies the mass of the object. Note that any child prim can also have a mass when they apply massAPI. In this case, the precedence rule is ‘parent mass overrides the child’s’. This may come as counter-intuitive, but mass is a computed quantity and in general not accumulative. For example, if a parent has mass of 10, and one of two children has mass of 20, allowing child’s mass to override its parent results in a mass of -10 for the other child. Note if mass is 0.0 it is ignored. Units: mass.

Declaration

float physics:mass = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateMassAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetDensityAttr() const#

If non-zero, specifies the density of the object. In the context of rigid body physics, density indirectly results in setting mass via (mass = density x volume of the object). How the volume is computed is up to implementation of the physics system. It is generally computed from the collision approximation rather than the graphical mesh. In the case where both density and mass are specified for the same object, mass has precedence over density. Unlike mass, child’s prim’s density overrides parent prim’s density as it is accumulative. Note that density of a collisionAPI can be also alternatively set through a PhysicsMaterialAPI. The material density has the weakest precedence in density definition. Note if density is 0.0 it is ignored. Units: mass/distance/distance/distance.

Declaration

float physics:density = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateDensityAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetCenterOfMassAttr() const#

Center of mass in the prim’s local space. Units: distance.

Declaration

point3f physics:centerOfMass = (-inf, -inf, -inf)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateCenterOfMassAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetDiagonalInertiaAttr() const#

If non-zero, specifies diagonalized inertia tensor along the principal axes. Note if diagonalInertial is (0.0, 0.0, 0.0) it is ignored. Units: mass*distance*distance.

Declaration

float3 physics:diagonalInertia = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float3

UsdAttribute CreateDiagonalInertiaAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetPrincipalAxesAttr() const#

Orientation of the inertia tensor’s principal axes in the prim’s local space.

Declaration

quatf physics:principalAxes = (0, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreatePrincipalAxesAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsMassAPI Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsMassAPI 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. This is shorthand for the following:

UsdPhysicsMassAPI(stage->GetPrimAtPath(path));
static bool CanApply(
const UsdPrim &prim,
std::string *whyNot = nullptr,
)#

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

static UsdPhysicsMassAPI Apply(const UsdPrim &prim)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysicsMassAPI” to the token-valued, listOp metadata apiSchemas on the prim.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsMassProperties#

Mass properties computation class. Used to combine together individual mass properties and produce final one.

Public Functions

inline UsdPhysicsMassProperties()#

Construct a MassProperties.

inline UsdPhysicsMassProperties(
const float m,
const GfMatrix3f &inertiaT,
const GfVec3f &com,
)#

Construct from individual elements.

inline UsdPhysicsMassProperties operator*(const float scale) const#

Scale mass properties. scale The linear scaling factor to apply to the mass properties.

Returns:

The scaled mass properties.

inline void Translate(const GfVec3f &t)#

Translate the center of mass by a given vector and adjust the inertia tensor accordingly. t The translation vector for the center of mass.

inline const GfMatrix3f &GetInertiaTensor() const#

Get inertia tensor.

Returns:

Inertia tensor

inline void SetInertiaTensor(const GfMatrix3f &inTensor)#

Set inertia tensor inTensor New inertia tensor.

inline const GfVec3f &GetCenterOfMass() const#

Get center of mass.

Returns:

Center of mass

inline float GetMass() const#

Get mass.

Returns:

Mass

inline void SetMass(float inMass)#

Set mass inMass New mass.

Public Static Functions

static inline GfVec3f GetMassSpaceInertia(
const GfMatrix3f &inertia,
GfQuatf &massFrame,
)#

Get the entries of the diagonalized inertia tensor and the corresponding reference rotation. inertia The inertia tensor to diagonalize. massFrame The frame the diagonalized tensor refers to.

Returns:

The entries of the diagonalized inertia tensor.

static inline GfMatrix3f TranslateInertia(
const GfMatrix3f &inertia,
const float mass,
const GfVec3f &t,
)#

Translate an inertia tensor using the parallel axis theorem inertia The inertia tensor to translate. mass The mass of the object. t The relative frame to translate the inertia tensor to.

Returns:

The translated inertia tensor.

static inline GfMatrix3f RotateInertia(
const GfMatrix3f &inertia,
const GfQuatf &q,
)#

Rotate an inertia tensor around the center of mass inertia The inertia tensor to rotate. q The rotation to apply to the inertia tensor.

Returns:

The rotated inertia tensor.

static inline UsdPhysicsMassProperties Sum(
const UsdPhysicsMassProperties *props,
const GfMatrix4f *transforms,
const uint32_t count,
)#

Sum up individual mass properties. props Array of mass properties to sum up. transforms Reference transforms for each mass properties entry. count The number of mass properties to sum up.

Returns:

The summed up mass properties.

class UsdPhysicsMaterialAPI : public UsdAPISchemaBase#

Adds simulation material properties to a Material. All collisions that have a relationship to this material will have their collision response defined through this material.

Public Functions

inline explicit UsdPhysicsMaterialAPI(const UsdPrim &prim = UsdPrim())#

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

inline explicit UsdPhysicsMaterialAPI(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsMaterialAPI()#

Destructor.

UsdAttribute GetDynamicFrictionAttr() const#

Dynamic friction coefficient. Unitless.

Declaration

float physics:dynamicFriction = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateDynamicFrictionAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetStaticFrictionAttr() const#

Static friction coefficient. Unitless.

Declaration

float physics:staticFriction = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateStaticFrictionAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetRestitutionAttr() const#

Restitution coefficient. Unitless.

Declaration

float physics:restitution = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateRestitutionAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetDensityAttr() const#

If non-zero, defines the density of the material. This can be used for body mass computation, see PhysicsMassAPI. Note that if the density is 0.0 it is ignored. Units: mass/distance/distance/distance.

Declaration

float physics:density = 0

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateDensityAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsMaterialAPI Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsMaterialAPI 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. This is shorthand for the following:

UsdPhysicsMaterialAPI(stage->GetPrimAtPath(path));
static bool CanApply(
const UsdPrim &prim,
std::string *whyNot = nullptr,
)#

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

static UsdPhysicsMaterialAPI Apply(const UsdPrim &prim)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysicsMaterialAPI” to the token-valued, listOp metadata apiSchemas on the prim.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsMeshCollisionAPI : public UsdAPISchemaBase#

Attributes to control how a Mesh is made into a collider. Can be applied to only a USDGeomMesh in addition to its PhysicsCollisionAPI.

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value “rightHanded”, use UsdPhysicsTokens->rightHanded as the value.

Public Functions

inline explicit UsdPhysicsMeshCollisionAPI(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsMeshCollisionAPI(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsMeshCollisionAPI()#

Destructor.

UsdAttribute GetApproximationAttr() const#

Determines the mesh’s collision approximation: “none” - The mesh geometry is used directly as a collider without any approximation. “convexDecomposition” - A convex mesh decomposition is performed. This results in a set of convex mesh colliders. “convexHull” - A convex hull of the mesh is generated and used as the collider. “boundingSphere” - A bounding sphere is computed around the mesh and used as a collider. “boundingCube” - An optimally fitting box collider is computed around the mesh. “meshSimplification” - A mesh simplification step is performed, resulting in a simplified triangle mesh collider.

Declaration

uniform token physics:approximation = "none"

C++ Type

TfToken

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Token

SdfVariability “Variability”

SdfVariabilityUniform

Allowed Values

none, convexDecomposition, convexHull, boundingSphere, boundingCube, meshSimplification

UsdAttribute CreateApproximationAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsMeshCollisionAPI Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsMeshCollisionAPI 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. This is shorthand for the following:

UsdPhysicsMeshCollisionAPI(stage->GetPrimAtPath(path));
static bool CanApply(
const UsdPrim &prim,
std::string *whyNot = nullptr,
)#

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

static UsdPhysicsMeshCollisionAPI Apply(const UsdPrim &prim)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysicsMeshCollisionAPI” to the token-valued, listOp metadata apiSchemas on the prim.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsMassUnits#

Container class for static double-precision symbols representing common mass units of measure expressed in kilograms.

struct UsdPhysicsObjectDesc#

Base physics object descriptor.

Subclassed by UsdPhysicsArticulationDesc, UsdPhysicsCollisionGroupDesc, UsdPhysicsJointDesc, UsdPhysicsRigidBodyDesc, UsdPhysicsRigidBodyMaterialDesc, UsdPhysicsSceneDesc, UsdPhysicsShapeDesc

Public Members

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsRigidBodyMaterialDesc : public UsdPhysicsObjectDesc#

Rigid body material descriptor.

Public Members

float staticFriction#

Static friction.

float dynamicFriction#

Dynamic friction.

float restitution#

Restitution.

float density#

Density.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsSceneDesc : public UsdPhysicsObjectDesc#

Scene descriptor.

Public Members

GfVec3f gravityDirection#

Gravity direction, if default 0,0,0 was used negative upAxis direction will be returned.

float gravityMagnitude#

Gravity magnitude, -inf means Earth gravity adjusted by metersPerUnit will be returned.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCollisionGroupDesc : public UsdPhysicsObjectDesc#

Collision group descriptor.

Public Members

bool invertFilteredGroups#

If filtering is inverted or not (default does not collide with)

SdfPathVector filteredGroups#

Filtered groups SdfPath vector.

std::string mergeGroupName#

Merge group name.

SdfPathVector mergedGroups#

List of merged collision groups.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsShapeDesc : public UsdPhysicsObjectDesc#

Shape descriptor, base class should not be reported.

Note as scale is not supported in most physics engines, the collision shape sizes already contain the scale. The exception are mesh collisions which do have geometry scale reported.

Subclassed by UsdPhysicsCapsule1ShapeDesc, UsdPhysicsCapsuleShapeDesc, UsdPhysicsConeShapeDesc, UsdPhysicsCubeShapeDesc, UsdPhysicsCustomShapeDesc, UsdPhysicsCylinder1ShapeDesc, UsdPhysicsCylinderShapeDesc, UsdPhysicsMeshShapeDesc, UsdPhysicsPlaneShapeDesc, UsdPhysicsSpherePointsShapeDesc, UsdPhysicsSphereShapeDesc

Public Members

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsSphereShapeDesc : public UsdPhysicsShapeDesc#

Sphere shape collision descriptor.

Public Members

float radius#

Sphere radius.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCapsuleShapeDesc : public UsdPhysicsShapeDesc#

Capsule shape collision descriptor.

Public Members

float radius#

Capsule radius.

float halfHeight#

Capsule half height.

UsdPhysicsAxis axis#

Capsule axis.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCapsule1ShapeDesc : public UsdPhysicsShapeDesc#

Capsule1 shape collision descriptor.

Public Members

float topRadius#

Capsule top radius.

float bottomRadius#

Capsule bottom radius.

float halfHeight#

Capsule half height.

UsdPhysicsAxis axis#

Capsule axis.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCylinderShapeDesc : public UsdPhysicsShapeDesc#

Cylinder shape collision descriptor.

Public Members

float radius#

Cylinder radius.

float halfHeight#

Cylinder half height.

UsdPhysicsAxis axis#

Cylinder axis.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCylinder1ShapeDesc : public UsdPhysicsShapeDesc#

Cylinder1 shape collision descriptor.

Public Members

float topRadius#

Cylinder top radius.

float bottomRadius#

Cylinder bottom radius.

float halfHeight#

Cylinder half height.

UsdPhysicsAxis axis#

Cylinder axis.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsConeShapeDesc : public UsdPhysicsShapeDesc#

Cone shape collision descriptor.

Public Members

float radius#

Cone radius.

float halfHeight#

Cone half height.

UsdPhysicsAxis axis#

Cone axis.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsPlaneShapeDesc : public UsdPhysicsShapeDesc#

Plane shape collision descriptor.

Public Members

UsdPhysicsAxis axis#

Plane axis.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCustomShapeDesc : public UsdPhysicsShapeDesc#

Custom shape collision descriptor.

Public Members

TfToken customGeometryToken#

Custom geometry token for this collision.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCubeShapeDesc : public UsdPhysicsShapeDesc#

Cube shape collision descriptor.

Public Members

GfVec3f halfExtents#

Half extents of the cube.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsMeshShapeDesc : public UsdPhysicsShapeDesc#

Mesh shape collision descriptor.

Public Members

TfToken approximation#

Desired approximation for the mesh collision.

GfVec3f meshScale#

Mesh scale.

bool doubleSided#

Defines whether mesh is double sided or not.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsSpherePoint#

This struct represents a single sphere-point which is a position and a radius.

Public Members

GfVec3f center#

Sphere point center.

float radius#

Sphere point radius.

struct UsdPhysicsSpherePointsShapeDesc : public UsdPhysicsShapeDesc#

This struct represents a collection of sphere points. Basically just an array of spheres which has been populated from a UsdGeomPoints primitive.

Public Members

std::vector<UsdPhysicsSpherePoint> spherePoints#

List of sphere points.

SdfPath rigidBody#

Rigid body the collision shape belongs to, if not set it’s a static collider.

GfVec3f localPos#

Local position of the shape relative to the body world pose.

GfQuatf localRot#

Local orientation of the shape relative to the body world pose.

GfVec3f localScale#

Local scale of the shape relative to the body world pose.

SdfPathVector materials#

Materials assigned to the collision geometry, can be multiple materials used on UsdGeomSubset.

SdfPathVector simulationOwners#

Simulation owners list.

SdfPathVector filteredCollisions#

Filtered collisions list.

SdfPathVector collisionGroups#

List of collision groups this collision belongs to, note that only collision groups that are part of the current range are checked.

bool collisionEnabled#

Collision enabled/disabled bool.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsRigidBodyDesc : public UsdPhysicsObjectDesc#

Rigid body descriptor.

Public Members

SdfPathVector collisions#

List of collision shapes that belong to this rigid body.

SdfPathVector filteredCollisions#

Filtered collisions.

SdfPathVector simulationOwners#

Simulation owners list.

GfVec3f position#

Rigid body position in world space.

GfQuatf rotation#

Rigid body orientation in world space.

GfVec3f scale#

Rigid body scale.

bool rigidBodyEnabled#

Defines whether body is enabled or not, if not enabled it’s a static body.

bool kinematicBody#

Defines if the body is kinematic or not.

bool startsAsleep#

Defines if body starts asleep or awake.

GfVec3f linearVelocity#

Rigid body initial linear velocity.

GfVec3f angularVelocity#

Rigid body initial angular velocity.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsJointLimit#

Joint limit descriptor.

Public Members

bool enabled#

Defines whether limit is enabled or not.

union UsdPhysicsJointLimit::[anonymous] [anonymous]#

Min, lower, initial angle.

union UsdPhysicsJointLimit::[anonymous] [anonymous]#

Max, upper, final angle.

struct UsdPhysicsJointDrive#

Joint drive descriptor The expected drive formula: force = spring * (target position - position) + damping * (targetVelocity - velocity)

Public Members

bool enabled#

Defines whether drive is enabled or not.

float targetPosition#

Drive target position.

float targetVelocity#

Drive target velocity.

float forceLimit#

force limit

float stiffness#

Drive stiffness.

float damping#

Drive damping.

bool acceleration#

Drive mode is acceleration or force.

struct UsdPhysicsArticulationDesc : public UsdPhysicsObjectDesc#

Articulation description.

Public Members

SdfPathVector rootPrims#

List of articulation roots, this defines where the articulation topology starts.

SdfPathVector filteredCollisions#

Filtered collisions.

SdfPathVector articulatedJoints#

List of joints that can be part of this articulation.

SdfPathVector articulatedBodies#

List of bodies that can be part of this articulation.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsJointDesc : public UsdPhysicsObjectDesc#

Base UsdPhysics joint descriptor.

Subclassed by UsdPhysicsCustomJointDesc, UsdPhysicsD6JointDesc, UsdPhysicsDistanceJointDesc, UsdPhysicsFixedJointDesc, UsdPhysicsPrismaticJointDesc, UsdPhysicsRevoluteJointDesc, UsdPhysicsSphericalJointDesc

Public Members

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsCustomJointDesc : public UsdPhysicsJointDesc#

Custom joint descriptor.

Public Members

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsFixedJointDesc : public UsdPhysicsJointDesc#

Fixed joint descriptor.

Public Members

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsD6JointDesc : public UsdPhysicsJointDesc#

Generic D6 joint descriptor.

Public Members

JointLimits jointLimits#

List of joint limit’s.

JointDrives jointDrives#

List of joint drives.

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsPrismaticJointDesc : public UsdPhysicsJointDesc#

Prismatic joint descriptor.

Public Members

UsdPhysicsAxis axis#

The joints axis.

UsdPhysicsJointLimit limit#

Joint linear limit.

UsdPhysicsJointDrive drive#

Joint linear drive.

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsSphericalJointDesc : public UsdPhysicsJointDesc#

Spherical joint descriptor.

Public Members

UsdPhysicsAxis axis#

The joints axis.

UsdPhysicsJointLimit limit#

The join spherical limit.

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsRevoluteJointDesc : public UsdPhysicsJointDesc#

Revolute joint descriptor.

Public Members

UsdPhysicsAxis axis#

The joints axis.

UsdPhysicsJointLimit limit#

The angular limit.

UsdPhysicsJointDrive drive#

The angular drive.

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct UsdPhysicsDistanceJointDesc : public UsdPhysicsJointDesc#

Distance joint descriptor.

Public Members

bool minEnabled#

Defines if minimum limit is enabled.

bool maxEnabled#

Defines if maximum limit is enabled.

UsdPhysicsJointLimit limit#

The distance limit.

SdfPath rel0#

UsdPrim relationship 0 for the joint.

SdfPath rel1#

UsdPrim relationship 1 for the joint.

SdfPath body0#

Rigid body 0 that the joint is connected, does not have to match the rel0.

SdfPath body1#

Rigid body 1 that the joint is connected, does not have to match the rel1.

GfVec3f localPose0Position#

Relative local position against the body0 world frame.

GfQuatf localPose0Orientation#

Relative local orientation against the body0 world frame.

GfVec3f localPose1Position#

Relative local position against the body1 world frame.

GfQuatf localPose1Orientation#

Relative local orientation against the body1 world frame.

bool jointEnabled#

Defines if joint is enabled or disabled.

float breakForce#

Joint break force.

float breakTorque#

Joint break torque.

bool excludeFromArticulation#

Defines if joint belongs to an articulation or if it’s a maximum coordinate joint.

bool collisionEnabled#

Defines if collision is enabled or disabled between the jointed bodies.

UsdPhysicsObjectType type#

Descriptor type.

SdfPath primPath#

SdfPath for the prim from which the descriptor was parsed.

bool isValid#

Validity of a descriptor, the parsing may succeed, but the descriptor might be not valid.

struct CustomUsdPhysicsTokens#

Token lists for custom physics objects that allow for custom physics objects to be reported by parsing.

Public Members

std::vector<TfToken> jointTokens#

Custom joints to be reported by parsing.

std::vector<TfToken> shapeTokens#

Custom shapes to be reported by parsing.

std::vector<TfToken> instancerTokens#

Custom physics instancers, these make sure that the subhierarchy is skipped and expected to be parsed individually.

class UsdPhysicsPrismaticJoint : public UsdPhysicsJoint#

Predefined prismatic joint type (translation along prismatic joint axis is permitted.)

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value “rightHanded”, use UsdPhysicsTokens->rightHanded as the value.

Public Functions

inline explicit UsdPhysicsPrismaticJoint(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsPrismaticJoint(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsPrismaticJoint()#

Destructor.

UsdAttribute GetAxisAttr() const#

Joint axis.

Declaration

uniform token physics:axis = "X"

C++ Type

TfToken

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Token

SdfVariability “Variability”

SdfVariabilityUniform

Allowed Values

X, Y, Z

UsdAttribute CreateAxisAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLowerLimitAttr() const#

Lower limit. Units: distance. -inf means not limited in negative direction.

Declaration

float physics:lowerLimit = -inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateLowerLimitAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetUpperLimitAttr() const#

Upper limit. Units: distance. inf means not limited in positive direction.

Declaration

float physics:upperLimit = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateUpperLimitAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos0Attr() const#

Relative position of the joint frame to body0’s frame.

Declaration

point3f physics:localPos0 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot0Attr() const#

Relative orientation of the joint frame to body0’s frame.

Declaration

quatf physics:localRot0 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos1Attr() const#

Relative position of the joint frame to body1’s frame.

Declaration

point3f physics:localPos1 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot1Attr() const#

Relative orientation of the joint frame to body1’s frame.

Declaration

quatf physics:localRot1 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetJointEnabledAttr() const#

Determines if the joint is enabled.

Declaration

bool physics:jointEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateJointEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetCollisionEnabledAttr() const#

Determines if the jointed subtrees should collide or not.

Declaration

bool physics:collisionEnabled = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateCollisionEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetExcludeFromArticulationAttr() const#

Determines if the joint can be included in an Articulation.

Declaration

uniform bool physics:excludeFromArticulation = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

SdfVariability “Variability”

SdfVariabilityUniform

UsdAttribute CreateExcludeFromArticulationAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakForceAttr() const#

Joint break force. If set, joint is to break when this force limit is reached. (Used for linear DOFs.) Units: mass * distance / second / second.

Declaration

float physics:breakForce = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakForceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakTorqueAttr() const#

Joint break torque. If set, joint is to break when this torque limit is reached. (Used for angular DOFs.) Units: mass * distance * distance / second / second.

Declaration

float physics:breakTorque = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakTorqueAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetBody0Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody0Rel() const#

See GetBody0Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

UsdRelationship GetBody1Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody1Rel() const#

See GetBody1Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsPrismaticJoint Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsPrismaticJoint 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. This is shorthand for the following:

UsdPhysicsPrismaticJoint(stage->GetPrimAtPath(path));
static UsdPhysicsPrismaticJoint Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsRevoluteJoint : public UsdPhysicsJoint#

Predefined revolute joint type (rotation along revolute joint axis is permitted.)

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value “rightHanded”, use UsdPhysicsTokens->rightHanded as the value.

Public Functions

inline explicit UsdPhysicsRevoluteJoint(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsRevoluteJoint(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsRevoluteJoint()#

Destructor.

UsdAttribute GetAxisAttr() const#

Joint axis.

Declaration

uniform token physics:axis = "X"

C++ Type

TfToken

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Token

SdfVariability “Variability”

SdfVariabilityUniform

Allowed Values

X, Y, Z

UsdAttribute CreateAxisAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLowerLimitAttr() const#

Lower limit. Units: degrees. -inf means not limited in negative direction.

Declaration

float physics:lowerLimit = -inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateLowerLimitAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetUpperLimitAttr() const#

Upper limit. Units: degrees. inf means not limited in positive direction.

Declaration

float physics:upperLimit = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateUpperLimitAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos0Attr() const#

Relative position of the joint frame to body0’s frame.

Declaration

point3f physics:localPos0 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot0Attr() const#

Relative orientation of the joint frame to body0’s frame.

Declaration

quatf physics:localRot0 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos1Attr() const#

Relative position of the joint frame to body1’s frame.

Declaration

point3f physics:localPos1 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot1Attr() const#

Relative orientation of the joint frame to body1’s frame.

Declaration

quatf physics:localRot1 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetJointEnabledAttr() const#

Determines if the joint is enabled.

Declaration

bool physics:jointEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateJointEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetCollisionEnabledAttr() const#

Determines if the jointed subtrees should collide or not.

Declaration

bool physics:collisionEnabled = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateCollisionEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetExcludeFromArticulationAttr() const#

Determines if the joint can be included in an Articulation.

Declaration

uniform bool physics:excludeFromArticulation = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

SdfVariability “Variability”

SdfVariabilityUniform

UsdAttribute CreateExcludeFromArticulationAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakForceAttr() const#

Joint break force. If set, joint is to break when this force limit is reached. (Used for linear DOFs.) Units: mass * distance / second / second.

Declaration

float physics:breakForce = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakForceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakTorqueAttr() const#

Joint break torque. If set, joint is to break when this torque limit is reached. (Used for angular DOFs.) Units: mass * distance * distance / second / second.

Declaration

float physics:breakTorque = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakTorqueAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetBody0Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody0Rel() const#

See GetBody0Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

UsdRelationship GetBody1Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody1Rel() const#

See GetBody1Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsRevoluteJoint Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsRevoluteJoint 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. This is shorthand for the following:

UsdPhysicsRevoluteJoint(stage->GetPrimAtPath(path));
static UsdPhysicsRevoluteJoint Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsRigidBodyAPI : public UsdAPISchemaBase#

Applies physics body attributes to any UsdGeomXformable prim and marks that prim to be driven by a simulation. If a simulation is running it will update this prim’s pose. All prims in the hierarchy below this prim should move accordingly.

Public Types

typedef MassInformation MassInformationFnSig(const UsdPrim&)#

Mass information function signature, for given UsdPrim gather MassInformation.

Public Functions

inline explicit UsdPhysicsRigidBodyAPI(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsRigidBodyAPI(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsRigidBodyAPI()#

Destructor.

UsdAttribute GetRigidBodyEnabledAttr() const#

Determines if this PhysicsRigidBodyAPI is enabled.

Declaration

bool physics:rigidBodyEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateRigidBodyEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetKinematicEnabledAttr() const#

Determines whether the body is kinematic or not. A kinematic body is a body that is moved through animated poses or through user defined poses. The simulation derives velocities for the kinematic body based on the external motion. When a continuous motion is not desired, this kinematic flag should be set to false.

Declaration

bool physics:kinematicEnabled = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateKinematicEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetStartsAsleepAttr() const#

Determines if the body is asleep when the simulation starts.

Declaration

uniform bool physics:startsAsleep = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

SdfVariability “Variability”

SdfVariabilityUniform

UsdAttribute CreateStartsAsleepAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetVelocityAttr() const#

Linear velocity in the same space as the node’s xform. Units: distance/second.

Declaration

vector3f physics:velocity = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Vector3f

UsdAttribute CreateVelocityAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetAngularVelocityAttr() const#

Angular velocity in the same space as the node’s xform. Units: degrees/second.

Declaration

vector3f physics:angularVelocity = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Vector3f

UsdAttribute CreateAngularVelocityAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetSimulationOwnerRel() const#

Single PhysicsScene that will simulate this body. By default this is the first PhysicsScene found in the stage using UsdStage::Traverse().

UsdRelationship CreateSimulationOwnerRel() const#

See GetSimulationOwnerRel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

float ComputeMassProperties(
GfVec3f *diagonalInertia,
GfVec3f *com,
GfQuatf *principalAxes,
const MassInformationFn &massInfoFn,
) const#

Compute mass properties of the rigid body diagonalInertia Computed diagonal of the inertial tensor for the rigid body. com Computed center of mass for the rigid body. principalAxes Inertia tensor’s principal axes orienttion for the rigid body. massInfoFn Callback function to get collision mass information.

Returns:

Computed mass of the rigid body

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsRigidBodyAPI Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsRigidBodyAPI 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. This is shorthand for the following:

UsdPhysicsRigidBodyAPI(stage->GetPrimAtPath(path));
static bool CanApply(
const UsdPrim &prim,
std::string *whyNot = nullptr,
)#

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to 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()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

static UsdPhysicsRigidBodyAPI Apply(const UsdPrim &prim)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysicsRigidBodyAPI” to the token-valued, listOp metadata apiSchemas on the prim.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::CanApplyAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns:

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

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

struct MassInformation#

Mass information for a collision, used in ComputeMassProperties MassInformationFn callback.

class UsdPhysicsScene : public UsdTyped#

General physics simulation properties, required for simulation.

Public Functions

inline explicit UsdPhysicsScene(const UsdPrim &prim = UsdPrim())#

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

inline explicit UsdPhysicsScene(const UsdSchemaBase &schemaObj)#

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

virtual ~UsdPhysicsScene()#

Destructor.

UsdAttribute GetGravityDirectionAttr() const#

Gravity direction vector in simulation world space. Will be normalized before use. A zero vector is a request to use the negative upAxis. Unitless.

Declaration

vector3f physics:gravityDirection = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Vector3f

UsdAttribute CreateGravityDirectionAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetGravityMagnitudeAttr() const#

Gravity acceleration magnitude in simulation world space. A negative value is a request to use a value equivalent to earth gravity regardless of the metersPerUnit scaling used by this scene. Units: distance/second/second.

Declaration

float physics:gravityMagnitude = -inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateGravityMagnitudeAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsScene Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsScene 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. This is shorthand for the following:

UsdPhysicsScene(stage->GetPrimAtPath(path));
static UsdPhysicsScene Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsSphericalJoint : public UsdPhysicsJoint#

Predefined spherical joint type (Removes linear degrees of freedom, cone limit may restrict the motion in a given range.) It allows two limit values, which when equal create a circular, else an elliptic cone limit around the limit axis.

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value “rightHanded”, use UsdPhysicsTokens->rightHanded as the value.

Public Functions

inline explicit UsdPhysicsSphericalJoint(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit UsdPhysicsSphericalJoint(
const UsdSchemaBase &schemaObj,
)#

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

virtual ~UsdPhysicsSphericalJoint()#

Destructor.

UsdAttribute GetAxisAttr() const#

Cone limit axis.

Declaration

uniform token physics:axis = "X"

C++ Type

TfToken

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Token

SdfVariability “Variability”

SdfVariabilityUniform

Allowed Values

X, Y, Z

UsdAttribute CreateAxisAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetConeAngle0LimitAttr() const#

Cone limit from the primary joint axis in the local0 frame toward the next axis. (Next axis of X is Y, and of Z is X.) A negative value means not limited. Units: degrees.

Declaration

float physics:coneAngle0Limit = -1

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateConeAngle0LimitAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetConeAngle1LimitAttr() const#

Cone limit from the primary joint axis in the local0 frame toward the second to next axis. A negative value means not limited. Units: degrees.

Declaration

float physics:coneAngle1Limit = -1

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateConeAngle1LimitAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos0Attr() const#

Relative position of the joint frame to body0’s frame.

Declaration

point3f physics:localPos0 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot0Attr() const#

Relative orientation of the joint frame to body0’s frame.

Declaration

quatf physics:localRot0 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot0Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalPos1Attr() const#

Relative position of the joint frame to body1’s frame.

Declaration

point3f physics:localPos1 = (0, 0, 0)

C++ Type

GfVec3f

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Point3f

UsdAttribute CreateLocalPos1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetLocalRot1Attr() const#

Relative orientation of the joint frame to body1’s frame.

Declaration

quatf physics:localRot1 = (1, 0, 0, 0)

C++ Type

GfQuatf

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Quatf

UsdAttribute CreateLocalRot1Attr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetJointEnabledAttr() const#

Determines if the joint is enabled.

Declaration

bool physics:jointEnabled = 1

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateJointEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetCollisionEnabledAttr() const#

Determines if the jointed subtrees should collide or not.

Declaration

bool physics:collisionEnabled = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

UsdAttribute CreateCollisionEnabledAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetExcludeFromArticulationAttr() const#

Determines if the joint can be included in an Articulation.

Declaration

uniform bool physics:excludeFromArticulation = 0

C++ Type

bool

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Bool

SdfVariability “Variability”

SdfVariabilityUniform

UsdAttribute CreateExcludeFromArticulationAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakForceAttr() const#

Joint break force. If set, joint is to break when this force limit is reached. (Used for linear DOFs.) Units: mass * distance / second / second.

Declaration

float physics:breakForce = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakForceAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdAttribute GetBreakTorqueAttr() const#

Joint break torque. If set, joint is to break when this torque limit is reached. (Used for angular DOFs.) Units: mass * distance * distance / second / second.

Declaration

float physics:breakTorque = inf

C++ Type

float

Usd_Datatypes “Usd Type”

SdfValueTypeNames->Float

UsdAttribute CreateBreakTorqueAttr(
VtValue const &defaultValue = VtValue(),
bool writeSparsely = false,
) const#

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

UsdRelationship GetBody0Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody0Rel() const#

See GetBody0Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

UsdRelationship GetBody1Rel() const#

Relationship to any UsdGeomXformable.

UsdRelationship CreateBody1Rel() const#

See GetBody1Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.

Public Static Functions

static 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. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

static UsdPhysicsSphericalJoint Get(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Return a UsdPhysicsSphericalJoint 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. This is shorthand for the following:

UsdPhysicsSphericalJoint(stage->GetPrimAtPath(path));
static UsdPhysicsSphericalJoint Define(
const UsdStagePtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget’s namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

Public Static Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped#

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

See also

UsdSchemaKind

Protected Functions

UsdSchemaKind _GetSchemaKind() const override#

Returns the kind of schema this class belongs to.

See also

UsdSchemaKind

class UsdPhysicsTokensType#

UsdPhysicsTokens provides static, efficient TfToken for use in all public USD API.

These tokens are auto-generated from the module’s schema, representing property names, for when you need to fetch an attribute or relationship directly by name, e.g. UsdPrim::GetAttribute(), in the most efficient manner, and allow the compiler to verify that you spelled the name correctly.

UsdPhysicsTokens also contains all of the allowedTokens values declared for schema builtin attributes of ‘token’ scene description type. Use UsdPhysicsTokens like so:

gprim.GetMyTokenValuedAttr().Set(UsdPhysicsTokens->acceleration);

Public Members

const TfToken acceleration#

“acceleration”

Possible value for UsdPhysicsDriveAPI::GetTypeAttr()

const TfToken angular#

“angular”

This token represents the angular degree of freedom used in Revolute Joint Drive.

const TfToken boundingCube#

“boundingCube”

Possible value for UsdPhysicsMeshCollisionAPI::GetApproximationAttr()

const TfToken boundingSphere#

“boundingSphere”

Possible value for UsdPhysicsMeshCollisionAPI::GetApproximationAttr()

const TfToken colliders#

“colliders”

This token represents the collection name to use with UsdCollectionAPI to represent colliders of a CollisionGroup prim.

const TfToken convexDecomposition#

“convexDecomposition”

Possible value for UsdPhysicsMeshCollisionAPI::GetApproximationAttr()

const TfToken convexHull#

“convexHull”

Possible value for UsdPhysicsMeshCollisionAPI::GetApproximationAttr()

const TfToken distance#

“distance”

This token represents the distance limit used for generic D6 joint.

const TfToken drive#

“drive”

Property namespace prefix for the UsdPhysicsDriveAPI schema.

const TfToken drive_MultipleApplyTemplate_PhysicsDamping#

“drive:__INSTANCE_NAME__:physics:damping”

UsdPhysicsDriveAPI

const TfToken drive_MultipleApplyTemplate_PhysicsMaxForce#

“drive:__INSTANCE_NAME__:physics:maxForce”

UsdPhysicsDriveAPI

const TfToken drive_MultipleApplyTemplate_PhysicsStiffness#

“drive:__INSTANCE_NAME__:physics:stiffness”

UsdPhysicsDriveAPI

const TfToken drive_MultipleApplyTemplate_PhysicsTargetPosition#

“drive:__INSTANCE_NAME__:physics:targetPosition”

UsdPhysicsDriveAPI

const TfToken drive_MultipleApplyTemplate_PhysicsTargetVelocity#

“drive:__INSTANCE_NAME__:physics:targetVelocity”

UsdPhysicsDriveAPI

const TfToken drive_MultipleApplyTemplate_PhysicsType#

“drive:__INSTANCE_NAME__:physics:type”

UsdPhysicsDriveAPI

const TfToken force#

“force”

Fallback value for UsdPhysicsDriveAPI::GetTypeAttr()

const TfToken kilogramsPerUnit#

“kilogramsPerUnit”

Stage-level metadata that encodes a scene’s linear unit of measure as kilograms per encoded unit.

const TfToken limit#

“limit”

Property namespace prefix for the UsdPhysicsLimitAPI schema.

const TfToken limit_MultipleApplyTemplate_PhysicsHigh#

“limit:__INSTANCE_NAME__:physics:high”

UsdPhysicsLimitAPI

const TfToken limit_MultipleApplyTemplate_PhysicsLow#

“limit:__INSTANCE_NAME__:physics:low”

UsdPhysicsLimitAPI

const TfToken linear#

“linear”

This token represents the linear degree of freedom used in Prismatic Joint Drive.

const TfToken meshSimplification#

“meshSimplification”

Possible value for UsdPhysicsMeshCollisionAPI::GetApproximationAttr()

const TfToken none#

“none”

Fallback value for UsdPhysicsMeshCollisionAPI::GetApproximationAttr()

const TfToken physicsAngularVelocity#

“physics:angularVelocity”

UsdPhysicsRigidBodyAPI

const TfToken physicsApproximation#

“physics:approximation”

UsdPhysicsMeshCollisionAPI

const TfToken physicsAxis#

“physics:axis”

UsdPhysicsRevoluteJoint, UsdPhysicsPrismaticJoint, UsdPhysicsSphericalJoint

const TfToken physicsBody0#

“physics:body0”

UsdPhysicsJoint

const TfToken physicsBody1#

“physics:body1”

UsdPhysicsJoint

const TfToken physicsBreakForce#

“physics:breakForce”

UsdPhysicsJoint

const TfToken physicsBreakTorque#

“physics:breakTorque”

UsdPhysicsJoint

const TfToken physicsCenterOfMass#

“physics:centerOfMass”

UsdPhysicsMassAPI

const TfToken physicsCollisionEnabled#

“physics:collisionEnabled”

UsdPhysicsCollisionAPI, UsdPhysicsJoint

const TfToken physicsConeAngle0Limit#

“physics:coneAngle0Limit”

UsdPhysicsSphericalJoint

const TfToken physicsConeAngle1Limit#

“physics:coneAngle1Limit”

UsdPhysicsSphericalJoint

const TfToken physicsDensity#

“physics:density”

UsdPhysicsMassAPI, UsdPhysicsMaterialAPI

const TfToken physicsDiagonalInertia#

“physics:diagonalInertia”

UsdPhysicsMassAPI

const TfToken physicsDynamicFriction#

“physics:dynamicFriction”

UsdPhysicsMaterialAPI

const TfToken physicsExcludeFromArticulation#

“physics:excludeFromArticulation”

UsdPhysicsJoint

const TfToken physicsFilteredGroups#

“physics:filteredGroups”

UsdPhysicsCollisionGroup

const TfToken physicsFilteredPairs#

“physics:filteredPairs”

UsdPhysicsFilteredPairsAPI

const TfToken physicsGravityDirection#

“physics:gravityDirection”

UsdPhysicsScene

const TfToken physicsGravityMagnitude#

“physics:gravityMagnitude”

UsdPhysicsScene

const TfToken physicsInvertFilteredGroups#

“physics:invertFilteredGroups”

UsdPhysicsCollisionGroup

const TfToken physicsJointEnabled#

“physics:jointEnabled”

UsdPhysicsJoint

const TfToken physicsKinematicEnabled#

“physics:kinematicEnabled”

UsdPhysicsRigidBodyAPI

const TfToken physicsLocalPos0#

“physics:localPos0”

UsdPhysicsJoint

const TfToken physicsLocalPos1#

“physics:localPos1”

UsdPhysicsJoint

const TfToken physicsLocalRot0#

“physics:localRot0”

UsdPhysicsJoint

const TfToken physicsLocalRot1#

“physics:localRot1”

UsdPhysicsJoint

const TfToken physicsLowerLimit#

“physics:lowerLimit”

UsdPhysicsRevoluteJoint, UsdPhysicsPrismaticJoint

const TfToken physicsMass#

“physics:mass”

UsdPhysicsMassAPI

const TfToken physicsMaxDistance#

“physics:maxDistance”

UsdPhysicsDistanceJoint

const TfToken physicsMergeGroup#

“physics:mergeGroup”

UsdPhysicsCollisionGroup

const TfToken physicsMinDistance#

“physics:minDistance”

UsdPhysicsDistanceJoint

const TfToken physicsPrincipalAxes#

“physics:principalAxes”

UsdPhysicsMassAPI

const TfToken physicsRestitution#

“physics:restitution”

UsdPhysicsMaterialAPI

const TfToken physicsRigidBodyEnabled#

“physics:rigidBodyEnabled”

UsdPhysicsRigidBodyAPI

const TfToken physicsSimulationOwner#

“physics:simulationOwner”

UsdPhysicsRigidBodyAPI, UsdPhysicsCollisionAPI

const TfToken physicsStartsAsleep#

“physics:startsAsleep”

UsdPhysicsRigidBodyAPI

const TfToken physicsStaticFriction#

“physics:staticFriction”

UsdPhysicsMaterialAPI

const TfToken physicsUpperLimit#

“physics:upperLimit”

UsdPhysicsRevoluteJoint, UsdPhysicsPrismaticJoint

const TfToken physicsVelocity#

“physics:velocity”

UsdPhysicsRigidBodyAPI

const TfToken rotX#

“rotX”

This token represents the rotate around X axis degree of freedom used in Joint Limits and Drives.

const TfToken rotY#

“rotY”

This token represents the rotate around Y axis degree of freedom used in Joint Limits and Drives.

const TfToken rotZ#

“rotZ”

This token represents the rotate around Z axis degree of freedom used in Joint Limits and Drives.

const TfToken transX#

“transX”

This token represents the translate around X axis degree of freedom used in Joint Limits and Drives.

const TfToken transY#

“transY”

This token represents the translate around Y axis degree of freedom used in Joint Limits and Drives.

const TfToken transZ#

“transZ”

This token represents the translate around Z axis degree of freedom used in Joint Limits and Drives.

const TfToken x#

“X”

Fallback value for UsdPhysicsRevoluteJoint::GetAxisAttr(), Fallback value for UsdPhysicsPrismaticJoint::GetAxisAttr(), Fallback value for UsdPhysicsSphericalJoint::GetAxisAttr()

const TfToken y#

“Y”

Possible value for UsdPhysicsRevoluteJoint::GetAxisAttr(), Possible value for UsdPhysicsPrismaticJoint::GetAxisAttr(), Possible value for UsdPhysicsSphericalJoint::GetAxisAttr()

const TfToken z#

“Z”

Possible value for UsdPhysicsRevoluteJoint::GetAxisAttr(), Possible value for UsdPhysicsPrismaticJoint::GetAxisAttr(), Possible value for UsdPhysicsSphericalJoint::GetAxisAttr()

const TfToken PhysicsArticulationRootAPI#

“PhysicsArticulationRootAPI”

Schema identifer and family for UsdPhysicsArticulationRootAPI

const TfToken PhysicsCollisionAPI#

“PhysicsCollisionAPI”

Schema identifer and family for UsdPhysicsCollisionAPI

const TfToken PhysicsCollisionGroup#

“PhysicsCollisionGroup”

Schema identifer and family for UsdPhysicsCollisionGroup

const TfToken PhysicsDistanceJoint#

“PhysicsDistanceJoint”

Schema identifer and family for UsdPhysicsDistanceJoint

const TfToken PhysicsDriveAPI#

“PhysicsDriveAPI”

Schema identifer and family for UsdPhysicsDriveAPI

const TfToken PhysicsFilteredPairsAPI#

“PhysicsFilteredPairsAPI”

Schema identifer and family for UsdPhysicsFilteredPairsAPI

const TfToken PhysicsFixedJoint#

“PhysicsFixedJoint”

Schema identifer and family for UsdPhysicsFixedJoint

const TfToken PhysicsJoint#

“PhysicsJoint”

Schema identifer and family for UsdPhysicsJoint

const TfToken PhysicsLimitAPI#

“PhysicsLimitAPI”

Schema identifer and family for UsdPhysicsLimitAPI

const TfToken PhysicsMassAPI#

“PhysicsMassAPI”

Schema identifer and family for UsdPhysicsMassAPI

const TfToken PhysicsMaterialAPI#

“PhysicsMaterialAPI”

Schema identifer and family for UsdPhysicsMaterialAPI

const TfToken PhysicsMeshCollisionAPI#

“PhysicsMeshCollisionAPI”

Schema identifer and family for UsdPhysicsMeshCollisionAPI

const TfToken PhysicsPrismaticJoint#

“PhysicsPrismaticJoint”

Schema identifer and family for UsdPhysicsPrismaticJoint

const TfToken PhysicsRevoluteJoint#

“PhysicsRevoluteJoint”

Schema identifer and family for UsdPhysicsRevoluteJoint

const TfToken PhysicsRigidBodyAPI#

“PhysicsRigidBodyAPI”

Schema identifer and family for UsdPhysicsRigidBodyAPI

const TfToken PhysicsScene#

“PhysicsScene”

Schema identifer and family for UsdPhysicsScene

const TfToken PhysicsSphericalJoint#

“PhysicsSphericalJoint”

Schema identifer and family for UsdPhysicsSphericalJoint

const std::vector<TfToken> allTokens#

A vector of all of the tokens listed above.

class UsdPhysicsObjectType

Physics object type structure for type enumeration.

class UsdPhysicsAxis

Physics axis structure for type enumeration.

class UsdPhysicsJointDOF

Physics joint degree of freedom structure for type enumeration.