PhysxSchemaPhysxPBDMaterialAPI#

Fully qualified name: usdrt::PhysxSchemaPhysxPBDMaterialAPI

class PhysxSchemaPhysxPBDMaterialAPI : public usdrt::UsdAPISchemaBase#

WARNING: This is a draft API; the design is not fixed and may change in the future. Applied to a USD Material. PhysX position-based-dynamics (PBD) material for particles used to simulate fluids, cloth and inflatables. Currently, only a single material per particle system is supported which applies to all objects that are associated with the system.

Public Functions

inline explicit PhysxSchemaPhysxPBDMaterialAPI(
const UsdPrim &prim = UsdPrim(),
)#

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

inline explicit PhysxSchemaPhysxPBDMaterialAPI(
const UsdSchemaBase &schemaObj,
)#

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

inline virtual ~PhysxSchemaPhysxPBDMaterialAPI()#

Destructor.

inline UsdAttribute GetFrictionAttr() const#

Friction coefficient. The maximal friction force tangential to the surface is equal to the normal force times the friction. The friction takes effect in all interactions between particles and rigids or deformables. For solid particle-particle interactions it is multiplied by the particle friction scale. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:friction = 0.2

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateFrictionAttr() const#

See GetFrictionAttr(), 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 GetParticleFrictionScaleAttr() const#

Coefficient that scales friction for solid particle-particle interations. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:particleFrictionScale = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateParticleFrictionScaleAttr() const#

See GetParticleFrictionScaleAttr(), 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 GetDampingAttr() const#

Global velocity damping coefficient. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:damping = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateDampingAttr() const#

See GetDampingAttr(), 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 GetViscosityAttr() const#

Viscosity for fluid particles. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:viscosity = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateViscosityAttr() const#

See GetViscosityAttr(), 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 GetVorticityConfinementAttr() const#

Vorticity confinement for fluid particles. Helps prevent energy loss due to numerical solver by adding vortex-like accelerations to the particles. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:vorticityConfinement = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateVorticityConfinementAttr() const#

See GetVorticityConfinementAttr(), 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 GetSurfaceTensionAttr() const#

Surface tension for fluid particles. Range: [0, inf) Units: 1 / (distance * distance * distance)

Declaration

float physxPBDMaterial:surfaceTension = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSurfaceTensionAttr() const#

See GetSurfaceTensionAttr(), 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 GetCohesionAttr() const#

Cohesion for interaction between fluid particles. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:cohesion = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCohesionAttr() const#

See GetCohesionAttr(), 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 GetAdhesionAttr() const#

Adhesion for interactions between particles (solid or fluid), and rigids or deformables. Adhesion also applies to solid-solid particle interactions, but is multiplied with the particle adhesion scale. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:adhesion = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateAdhesionAttr() const#

See GetAdhesionAttr(), 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 GetParticleAdhesionScaleAttr() const#

Coefficient that scales adhesion for solid particle-particle interations. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:particleAdhesionScale = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateParticleAdhesionScaleAttr() const#

See GetParticleAdhesionScaleAttr(), 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 GetAdhesionOffsetScaleAttr() const#

Offset scale defining the offset at which adhesion ceases to take effect. For interactions between particles (fluid or solid), and rigids or deformables, the adhesion offset is defined relative to the rest offset. For solid particle-particle interactions, the adhesion offset is defined relative to the solid rest offset. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:adhesionOffsetScale = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateAdhesionOffsetScaleAttr() const#

See GetAdhesionOffsetScaleAttr(), 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 GetGravityScaleAttr() const#

Gravitational acceleration scaling factor. Can be used to approximate lighter-than-air inflatables, for example (-1.0 would invert gravity). Range: (-inf, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:gravityScale = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateGravityScaleAttr() const#

See GetGravityScaleAttr(), 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 GetLiftAttr() const#

Lift coefficient for cloth and inflatable particle objects. Basic aerodynamic lift model coefficient. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:lift = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateLiftAttr() const#

See GetLiftAttr(), 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 GetDragAttr() const#

Drag coefficient for cloth and inflatable particle objects. Basic aerodynamic drag model coefficient. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:drag = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateDragAttr() const#

See GetDragAttr(), 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 GetDensityAttr() const#

Density used to compute particle object mass. If set to 0.0, the simulation determines a default density. A density or mass set with a PhysicsMassAPI on a particle object overrides the material density. Range: [0, inf) Units: mass / distance / distance / distance.

Declaration

float physxPBDMaterial:density = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateDensityAttr() const#

See GetDensityAttr(), 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 GetCflCoefficientAttr() const#

This coefficient scales the CFL term used to limit relative motion between approaching fluid particles. A very large value disables the limit. Range: [0, inf) Units: dimensionless.

Declaration

float physxPBDMaterial:cflCoefficient = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCflCoefficientAttr() const#

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

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 PhysxSchemaPhysxPBDMaterialAPI Apply(
const UsdPrim &prim,
)#

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysxPBDMaterialAPI” to the token-valued, listOp metadata apiSchemas on the prim.

Returns:

A valid PhysxSchemaPhysxPBDMaterialAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxPBDMaterialAPI 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.

inline virtual bool _IsCompatible() const#

Check whether this APISchema object is valid for the currently held prim.

If this is an applied API schema, this returns true if the held prim is valid and already has the API schema applied to it, along with the instanceName (in the case of multiple-apply). The instanceName should not be empty in the case of a multiple-apply API schema.

This check is performed when clients invoke the explicit bool conversion operator, implemented in UsdSchemaBase.

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.