usdrt::PhysxSchemaPhysxMaterialAPI

Defined in usdrt/scenegraph/usd/physxSchema/physxMaterialAPI.h

Functions

Variables

class PhysxSchemaPhysxMaterialAPI : public usdrt::UsdAPISchemaBase

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

Public Functions

inline explicit PhysxSchemaPhysxMaterialAPI(const UsdPrim &prim = UsdPrim())

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

inline explicit PhysxSchemaPhysxMaterialAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxMaterialAPI()

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 GetFrictionCombineModeAttr() const

Determines the way in which two material properties will be combined to yield a friction or restitution coefficient for a collision.

Declaration

uniform token physxMaterial:frictionCombineMode = "average"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Allowed Values

average, min, multiply, max

inline UsdAttribute CreateFrictionCombineModeAttr() const

See GetFrictionCombineModeAttr(), 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 GetRestitutionCombineModeAttr() const

Determines the way in which two material properties will be combined to yield a friction or restitution coefficient for a collision.

Declaration

uniform token physxMaterial:restitutionCombineMode = "average"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Allowed Values

average, min, multiply, max

inline UsdAttribute CreateRestitutionCombineModeAttr() const

See GetRestitutionCombineModeAttr(), 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 GetImprovePatchFrictionAttr() const

Flag only has an effect if physxScene:frictionType “patch” friction model is used.

Declaration

bool physxMaterial:improvePatchFriction = 1

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateImprovePatchFrictionAttr() const

See GetImprovePatchFrictionAttr(), 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 GetCompliantContactStiffnessAttr() const

Spring stiffness for a compliant contact model using implicit springs. A higher stiffness results in behavior closer to a rigid contact. The compliant contact model is only enabled if the stiffness is larger than 0. Range: [0, inf) Units: force/distance = mass / seconds / seconds.

Declaration

float physxMaterial:compliantContactStiffness = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCompliantContactStiffnessAttr() const

See GetCompliantContactStiffnessAttr(), 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 GetCompliantContactDampingAttr() const

Damping coefficient for a compliant contact model using implicit springs. Irrelevant if compliant contacts are disabled when compliantContactStiffness is set to zero and rigid contacts are active. Range: [0, inf) Units: force / (distance / seconds) = mass / seconds.

Declaration

float physxMaterial:compliantContactDamping = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCompliantContactDampingAttr() const

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

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

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

Public Static Functions

static inline PhysxSchemaPhysxMaterialAPI Apply(const UsdPrim &prim)

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysxMaterialAPI” 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 PhysxSchemaPhysxMaterialAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxMaterialAPI 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

Protected Functions

inline const TfToken &_GetInstanceName() const

Returns the instance name of the API schema object belonging to a multiple-apply API schema.

The returned instance name will be empty for non-applied and single-apply API schemas.