![]() |
Applies collision attributes to a UsdGeomXformable prim. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
| UsdPhysicsCollisionAPI (const UsdPrim &prim=UsdPrim()) | |
Construct a UsdPhysicsCollisionAPI on UsdPrim prim . More... | |
| UsdPhysicsCollisionAPI (const UsdSchemaBase &schemaObj) | |
Construct a UsdPhysicsCollisionAPI on the prim held by schemaObj . More... | |
| virtual USDPHYSICS_API | ~UsdPhysicsCollisionAPI () |
| Destructor. More... | |
| USDPHYSICS_API UsdAttribute | GetCollisionEnabledAttr () const |
| Determines if the PhysicsCollisionAPI is enabled. More... | |
| USDPHYSICS_API 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. More... | |
| USDPHYSICS_API UsdRelationship | GetSimulationOwnerRel () const |
| Single PhysicsScene that will simulate this collider. More... | |
| USDPHYSICS_API UsdRelationship | CreateSimulationOwnerRel () const |
| See GetSimulationOwnerRel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
Static Public Member Functions | |
| static USDPHYSICS_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
| Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. More... | |
| static USDPHYSICS_API UsdPhysicsCollisionAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a UsdPhysicsCollisionAPI holding the prim adhering to this schema at path on stage. More... | |
| static USDPHYSICS_API UsdPhysicsCollisionAPI | Apply (const UsdPrim &prim) |
Applies this single-apply API schema to the given prim. More... | |
Static Public Attributes | |
| static const UsdSchemaType | schemaType = UsdSchemaType::SingleApplyAPI |
| Compile time constant representing what kind of schema this class is. More... | |
Protected Member Functions | |
| USDPHYSICS_API UsdSchemaType | _GetSchemaType () const override |
| Returns the type of schema this class belongs to. More... | |
Friends | |
| class | UsdSchemaRegistry |
Applies collision attributes to a UsdGeomXformable prim.
If a simulation is running this geometry is colliding with other geometries that do have CollisionAPI applied. If a prim in the parent hierarchy does have the RigidBodyAPI applied, this collision is a part of that body. If there is no body in the parent hierarchy, this collision is considered to be a static collision.
Definition at line 62 of file collisionAPI.h.
|
inlineexplicit |
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
Definition at line 74 of file collisionAPI.h.
|
inlineexplicit |
Construct a UsdPhysicsCollisionAPI on the prim held by schemaObj .
Should be preferred over UsdPhysicsCollisionAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
Definition at line 82 of file collisionAPI.h.
|
virtual |
Destructor.
|
overrideprotected |
Returns the type of schema this class belongs to.
|
static |
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.
| USDPHYSICS_API 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.
| USDPHYSICS_API UsdRelationship CreateSimulationOwnerRel | ( | ) | const |
See GetSimulationOwnerRel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.
|
static |
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:
| USDPHYSICS_API UsdAttribute GetCollisionEnabledAttr | ( | ) | const |
Determines if the PhysicsCollisionAPI is enabled.
| Declaration | bool physics:collisionEnabled = 1 |
| C++ Type | bool |
| Usd Type | SdfValueTypeNames->Bool |
|
static |
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.
Does not include attributes that may be authored by custom/extended methods of the schemas involved.
| USDPHYSICS_API 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.
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 68 of file collisionAPI.h.