usdrt::UsdPhysicsMeshCollisionAPI
Defined in usdrt/scenegraph/usd/usdPhysics/meshCollisionAPI.h
Functions
usdrt::UsdPhysicsMeshCollisionAPI::Apply: 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.usdrt::UsdPhysicsMeshCollisionAPI::CreateApproximationAttr: See GetApproximationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute's default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::UsdPhysicsMeshCollisionAPI::GetApproximationAttr: 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.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPath: Return the SdfPath to this schema object's held prim.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPrim: Return this schema object's held prim.
usdrt::UsdPhysicsMeshCollisionAPI::UsdPhysicsMeshCollisionAPI: Construct a UsdPhysicsMeshCollisionAPI on UsdPrim
prim
. Equivalent to UsdPhysicsMeshCollisionAPI::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.usdrt::UsdPhysicsMeshCollisionAPI::UsdPhysicsMeshCollisionAPI: Construct a UsdPhysicsMeshCollisionAPI on the prim held by
schemaObj
. Should be preferred over UsdPhysicsMeshCollisionAPI (schemaObj.GetPrim()), as it preserves SchemaBase state.usdrt::DestructionSchemaDestructibleBaseAPI::_GetInstanceName: Returns the instance name of the API schema object belonging to a multiple-apply API schema.
usdrt::UsdPhysicsMeshCollisionAPI::operator bool: Boolean operator.
usdrt::UsdPhysicsMeshCollisionAPI::~UsdPhysicsMeshCollisionAPI: Destructor.
Variables
usdrt::UsdPhysicsMeshCollisionAPI::schemaType: Compile time constant representing what kind of schema this class is.
-
class UsdPhysicsMeshCollisionAPI : public usdrt::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 validprim
, but will not immediately throw an error for an invalidprim
.
-
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.
-
inline virtual ~UsdPhysicsMeshCollisionAPI()
Destructor.
-
inline operator bool() const
Boolean operator.
- Returns
Return true if the contained prim is has this api schema applied using
HasAPI
, and false otherwise.
-
inline 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,
-
inline UsdAttribute CreateApproximationAttr() const
See GetApproximationAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
Public Static Functions
-
static inline 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::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 UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI
Compile time constant representing what kind of schema this class is.
See also
UsdSchemaType
-
inline explicit UsdPhysicsMeshCollisionAPI(const UsdPrim &prim = UsdPrim())