usdrt::PhysxSchemaPhysxDiffuseParticlesAPI

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

Functions

Variables

class PhysxSchemaPhysxDiffuseParticlesAPI : public usdrt::UsdAPISchemaBase

WARNING: This is a draft API; the design is not fixed and may change in the future. Applied to a UsdGeomPoints or UsdGeomPointInstancer primitive with PhysxParticleSetAPI. Defines settings that the particle simulation uses to spawn diffuse particles. The diffuse particles are a render-only effect and do not affect the particle dynamics.

Public Functions

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

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

inline explicit PhysxSchemaPhysxDiffuseParticlesAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxDiffuseParticlesAPI()

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

Enable or disable the creation of diffuse particles.

Declaration

bool physxDiffuseParticles:diffuseParticlesEnabled = 1

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateDiffuseParticlesEnabledAttr() const

See GetDiffuseParticlesEnabledAttr(), 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 GetMaxDiffuseParticleMultiplierAttr() const

Maximum number of diffuse particles that can be present in the simulation relative to the number of non-diffuse particles. Range: [0.0, inf) Default value -inf means default is picked by the simulation.

Declaration

uniform float physxDiffuseParticles:maxDiffuseParticleMultiplier = -inf

C++ Type

float

Usd Type

SdfValueTypeNames->Float

Variability

SdfVariabilityUniform

inline UsdAttribute CreateMaxDiffuseParticleMultiplierAttr() const

See GetMaxDiffuseParticleMultiplierAttr(), 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 GetThresholdAttr() const

Kinetic energy threshold a particle must reach to spawn a diffuse particle. Range: [0, inf) Units: energy = mass * distance * distance / seconds / seconds.

Declaration

float physxDiffuseParticles:threshold = 0.01

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateThresholdAttr() const

See GetThresholdAttr(), 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 GetLifetimeAttr() const

Lifetime of a spawned particle before it is removed again. Range: [0, inf) Units: seconds.

Declaration

float physxDiffuseParticles:lifetime = 5

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateLifetimeAttr() const

See GetLifetimeAttr(), 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 GetAirDragAttr() const

Air drag force factor for spray particles. Range: [0, inf) Units: dimensionless.

Declaration

float physxDiffuseParticles:airDrag = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateAirDragAttr() const

See GetAirDragAttr(), 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 GetBubbleDragAttr() const

Fluid drag force factor for bubble particles. Range: [0, inf) Units: dimensionless.

Declaration

float physxDiffuseParticles:bubbleDrag = 0.5

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateBubbleDragAttr() const

See GetBubbleDragAttr(), 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 GetBuoyancyAttr() const

Buoyancy force factor for bubble particles. Range: [0, inf) Units: dimensionless.

Declaration

float physxDiffuseParticles:buoyancy = 0.8

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateBuoyancyAttr() const

See GetBuoyancyAttr(), 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 GetKineticEnergyWeightAttr() const

Contribution from kinetic energy when deciding diffuse particle creation. Range: [0, inf) Units: dimensionless.

Declaration

float physxDiffuseParticles:kineticEnergyWeight = 0.01

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateKineticEnergyWeightAttr() const

See GetKineticEnergyWeightAttr(), 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 GetPressureWeightAttr() const

Contribution from pressure when deciding diffuse particle creation. Range: [0, inf) Units: dimensionless.

Declaration

float physxDiffuseParticles:pressureWeight = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreatePressureWeightAttr() const

See GetPressureWeightAttr(), 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 GetDivergenceWeightAttr() const

Contribution from divergence when deciding diffuse particle creation. Range: [0, inf) Units: dimensionless.

Declaration

float physxDiffuseParticles:divergenceWeight = 5

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateDivergenceWeightAttr() const

See GetDivergenceWeightAttr(), 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 GetCollisionDecayAttr() const

Decay factor of diffuse particles’ lifetime after they collide with shapes. 0 == lifetime remains unchanged, 1 == particle disappears immediately. Range: [0, 1] Units: dimensionless.

Declaration

float physxDiffuseParticles:collisionDecay = 0.5

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCollisionDecayAttr() const

See GetCollisionDecayAttr(), 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 GetUseAccurateVelocityAttr() const

Enables accurate particle velocity estimation.

Declaration

bool physxDiffuseParticles:useAccurateVelocity = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateUseAccurateVelocityAttr() const

See GetUseAccurateVelocityAttr(), 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 PhysxSchemaPhysxDiffuseParticlesAPI Apply(const UsdPrim &prim)

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