usdrt::PhysxSchemaPhysxParticleSamplingAPI

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

Functions

Variables

class PhysxSchemaPhysxParticleSamplingAPI : public usdrt::UsdAPISchemaBase

WARNING: This is a draft API; the design is not fixed and may change in the future. Applied to a UsdGeomMesh which is Poisson-sampled to generate particles in the particles relationship.

Public Functions

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

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

inline explicit PhysxSchemaPhysxParticleSamplingAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxParticleSamplingAPI()

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

The distance between the sampled positions. In general, choose a value larger than the corresponding particle rest offset. Default value zero means that a suitable value is auto-determined. Range: [0, inf) Units: distance.

Declaration

float physxParticleSampling:samplingDistance = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSamplingDistanceAttr() const

See GetSamplingDistanceAttr(), 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 GetVolumeAttr() const

Whether to sample points inside the mesh or not.

Declaration

bool physxParticleSampling:volume = 1

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateVolumeAttr() const

See GetVolumeAttr(), 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 GetMaxSamplesAttr() const

Approximate upper bound on the number of samples. Zero means unbounded. Range: [0, inf)

Declaration

int physxParticleSampling:maxSamples = 50000

C++ Type

int

Usd Type

SdfValueTypeNames->Int

inline UsdAttribute CreateMaxSamplesAttr() const

See GetMaxSamplesAttr(), 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 GetParticlesRel() const

Relationship to the particle set sampled from the mesh.

inline UsdRelationship CreateParticlesRel() const

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

Public Static Functions

static inline PhysxSchemaPhysxParticleSamplingAPI Apply(const UsdPrim &prim)

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