UsdPhysicsCollisionGroup#

Fully qualified name: usdrt::UsdPhysicsCollisionGroup

class UsdPhysicsCollisionGroup : public usdrt::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.

inline virtual ~UsdPhysicsCollisionGroup()#

Destructor.

inline 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 Type

SdfValueTypeNames->String

inline UsdAttribute CreateMergeGroupNameAttr() const#

See GetMergeGroupNameAttr(), 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) if writeSparsely is true - the default for writeSparsely is false.

inline 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 Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateInvertFilteredGroupsAttr() const#

See GetInvertFilteredGroupsAttr(), 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) if writeSparsely is true - the default for writeSparsely is false.

inline UsdRelationship GetFilteredGroupsRel() const#

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

inline UsdRelationship CreateFilteredGroupsRel() const#

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

UsdPrim GetPrim() const#

Return this schema object’s held prim.

SdfPath GetPath() const#

Return the SdfPath to this schema object’s held prim.

inline explicit operator bool() const#

Check if this schema object is compatible with it’s held prim and that the prim is valid.

A typed schema object is compatible if the held prim’s type is or is a subtype of the schema’s type. Based on prim.IsA().

An API schema object is compatible if the API is of type SingleApplyAPI or UsdSchemaType::MultipleApplyAPI, and the schema has been applied to the prim. Based on prim.HasAPI.

This method invokes polymorphic behaviour.

Returns:

True if the help prim is valid, and the schema object is compatible with its held prim.

Public Static Functions

static inline UsdPhysicsCollisionGroup Define(
const UsdStageRefPtr &stage,
const SdfPath &path,
)#

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

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::ConcreteTyped#

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

See also

UsdSchemaType

Protected Functions

inline virtual bool _IsCompatible() const#

Helper for subclasses to do specific compatibility checking with the given prim. Subclassess may override _isCompatible to for example check type compatibility or value compatibility on the prim.

Overrides exist for UsdTyped and UsdAPISchemaBase.

This check is called when clients invoke the bool operator.

Returns:

True if the schema object is compatible with its held prim.

inline const TfToken _GetType() const#

Helper for subclasses to get this schema’s type token.

Note

This diverges from Usd and returns a TfToken, since we don’t implements TfType.

Returns:

The token representing the schema’s TfType.