usdrt::PhysxSchemaPhysxHairAPI

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

Functions

Variables

class PhysxSchemaPhysxHairAPI : public usdrt::UsdAPISchemaBase

WARNING: This is a draft API; the design is not fixed and may change in the future. This is the PhysX Hair API. This API should be applied to a UsdGeomPointBased, for example UsdGeomMesh or UsdGeomBasisCurves to simulate the geometry as a PhysX Hairsystem.

Public Functions

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

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

inline explicit PhysxSchemaPhysxHairAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxHairAPI()

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

Enables the hair segments to collide with other physics objects that have a collision API applied to them.

Declaration

bool physxHair:externalCollision = 1

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateExternalCollisionAttr() const

See GetExternalCollisionAttr(), 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 GetTwosidedAttachmentAttr() const

Whether the hair should have an effect on the body it is attached to.

Declaration

bool physxHair:twosidedAttachment = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateTwosidedAttachmentAttr() const

See GetTwosidedAttachmentAttr(), 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 GetSegmentLengthAttr() const

Length of one hair segment (i.e., distance between simulation vertices along a strand). This value is used to automatically place simulation vertices (=control points) along a strand. The default value of 0 means the length is autocomputed such that the longest strand has 32 vertices. Range: [0, inf), Units: distance.

Declaration

float physxHair:segmentLength = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSegmentLengthAttr() const

See GetSegmentLengthAttr(), 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 GetGlobalShapeComplianceAtRootAttr() const

Compliance to the global shape-matching constraint at the root of the strand. The higher the compliance the softer the constraint. A negative value disables the shape-matching constraint. Range: [0, inf) Units: dimensionless.

Declaration

float physxHair:globalShapeComplianceAtRoot = -inf

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateGlobalShapeComplianceAtRootAttr() const

See GetGlobalShapeComplianceAtRootAttr(), 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 GetGlobalShapeComplianceStrandAttenuationAttr() const

The factor by which the compliance to the global shape-matching constraint changes from a simulation vertex to the next one along the strand. Use it to increase or decrease the compliance along a strand, starting with globalShapeComplianceAtRoot. A value > 1.0 means the constraint becomes softer towards the strand tips. Range: (0, inf) Units: dimensionless.

Declaration

float physxHair:globalShapeComplianceStrandAttenuation = 1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateGlobalShapeComplianceStrandAttenuationAttr() const

See GetGlobalShapeComplianceStrandAttenuationAttr(), 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 GetInterHairRepulsionAttr() const

Strength of the repulsion effect between hair segments. This effect is based on the volumetric density of hair vertices in space. Can be used as a substitute or complement to self-collisions. Range: [0.0, inf) Units: dimensionless.

Declaration

float physxHair:interHairRepulsion = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateInterHairRepulsionAttr() const

See GetInterHairRepulsionAttr(), 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 GetVelSmoothingAttr() const

Strength of the velocity smoothing effect. The higher the value the more the hair moves like a single rigid body. A value of zero disables the constraint. Range: [0.0, 1.0] Units: dimensionless.

Declaration

float physxHair:velSmoothing = 0.3

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateVelSmoothingAttr() const

See GetVelSmoothingAttr(), 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 GetLocalShapeMatchingComplianceAttr() const

Compliance to the local shape matching constraint, which preserves strand shapes. The larger the compliance the softer the constraint. A negative value disables the constraint. Range [0, inf) Units: dimensionless.

Declaration

float physxHair:localShapeMatchingCompliance = -inf

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateLocalShapeMatchingComplianceAttr() const

See GetLocalShapeMatchingComplianceAttr(), 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 GetLocalShapeMatchingLinearStretchingAttr() const

Proportion of linear stretching vs rigid transformation allowed in the local shape matching constraint. Only takes effect if local shape matching is enabled. A value of 0 allows only rigid transforms, a value of 1 permits linear deformations freely. Range [0.0, 1.0] Units: dimensionless.

Declaration

float physxHair:localShapeMatchingLinearStretching = 0.1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateLocalShapeMatchingLinearStretchingAttr() const

See GetLocalShapeMatchingLinearStretchingAttr(), 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 GetLocalShapeMatchingGroupSizeAttr() const

How many vertices of a strand are grouped together into one shape-matching constraint. The larger this number to more rigid a strand appears. The value is automatically capped at the strand length. Setting only takes effect if shape matching is enabled. Range [2, inf).

Declaration

uint physxHair:localShapeMatchingGroupSize = 32

C++ Type

unsigned int

Usd Type

SdfValueTypeNames->UInt

inline UsdAttribute CreateLocalShapeMatchingGroupSizeAttr() const

See GetLocalShapeMatchingGroupSizeAttr(), 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 GetLocalShapeMatchingGroupOverlapAttr() const

Number of vertices by which consecutive shape-matching groups are overlapping. Only takes effect if shape matching is enabled. Default value of -1 means maximum overlap, i.e., shapeMatchingGroupSize/2 Range [0, shapeMatchingGroupSize/2].

Declaration

int physxHair:localShapeMatchingGroupOverlap = -1

C++ Type

int

Usd Type

SdfValueTypeNames->Int

inline UsdAttribute CreateLocalShapeMatchingGroupOverlapAttr() const

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

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