![]() |
Attributes to control how a Mesh is made into a collider. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
| UsdPhysicsMeshCollisionAPI (const UsdPrim &prim=UsdPrim()) | |
Construct a UsdPhysicsMeshCollisionAPI on UsdPrim prim . More... | |
| UsdPhysicsMeshCollisionAPI (const UsdSchemaBase &schemaObj) | |
Construct a UsdPhysicsMeshCollisionAPI on the prim held by schemaObj . More... | |
| virtual USDPHYSICS_API | ~UsdPhysicsMeshCollisionAPI () |
| Destructor. More... | |
| USDPHYSICS_API UsdAttribute | GetApproximationAttr () const |
| Determines the mesh's collision approximation: "none" - The mesh geometry is used directly as a collider without any approximation. More... | |
| USDPHYSICS_API 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. 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 UsdPhysicsMeshCollisionAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a UsdPhysicsMeshCollisionAPI holding the prim adhering to this schema at path on stage. More... | |
| static USDPHYSICS_API UsdPhysicsMeshCollisionAPI | 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 |
Attributes to control how a Mesh is made into a collider.
Can be applied to a USDGeomMesh.
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.
Definition at line 63 of file meshCollisionAPI.h.
|
inlineexplicit |
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
Definition at line 75 of file meshCollisionAPI.h.
|
inlineexplicit |
Construct a UsdPhysicsMeshCollisionAPI on the prim held by schemaObj .
Should be preferred over UsdPhysicsMeshCollisionAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
Definition at line 83 of file meshCollisionAPI.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 "PhysicsMeshCollisionAPI" to the token-valued, listOp metadata apiSchemas on the prim.
| USDPHYSICS_API 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.
|
static |
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:
| USDPHYSICS_API 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 Type | SdfValueTypeNames->Token |
| Variability | SdfVariabilityUniform |
| Allowed Values | none, convexDecomposition, convexHull, boundingSphere, boundingCube, meshSimplification |
|
static |
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.
Does not include attributes that may be authored by custom/extended methods of the schemas involved.
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 69 of file meshCollisionAPI.h.