usdrt::PhysxSchemaPhysxHairAPI
Defined in usdrt/scenegraph/usd/physxSchema/physxHairAPI.h
Functions
usdrt::PhysxSchemaPhysxHairAPI::Apply: 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.usdrt::PhysxSchemaPhysxHairAPI::CreateExternalCollisionAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateGlobalShapeComplianceAtRootAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateGlobalShapeComplianceStrandAttenuationAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateInterHairRepulsionAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateLocalShapeMatchingComplianceAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateLocalShapeMatchingGroupOverlapAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateLocalShapeMatchingGroupSizeAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateLocalShapeMatchingLinearStretchingAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateSegmentLengthAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateTwosidedAttachmentAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::CreateVelSmoothingAttr: 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxHairAPI::GetExternalCollisionAttr: Enables the hair segments to collide with other physics objects that have a collision API applied to them.
usdrt::PhysxSchemaPhysxHairAPI::GetGlobalShapeComplianceAtRootAttr: 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.
usdrt::PhysxSchemaPhysxHairAPI::GetGlobalShapeComplianceStrandAttenuationAttr: 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.
usdrt::PhysxSchemaPhysxHairAPI::GetInterHairRepulsionAttr: 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.
usdrt::PhysxSchemaPhysxHairAPI::GetLocalShapeMatchingComplianceAttr: 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.
usdrt::PhysxSchemaPhysxHairAPI::GetLocalShapeMatchingGroupOverlapAttr: 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].
usdrt::PhysxSchemaPhysxHairAPI::GetLocalShapeMatchingGroupSizeAttr: 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).
usdrt::PhysxSchemaPhysxHairAPI::GetLocalShapeMatchingLinearStretchingAttr: 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.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPath: Return the SdfPath to this schema object's held prim.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPrim: Return this schema object's held prim.
usdrt::PhysxSchemaPhysxHairAPI::GetSegmentLengthAttr: 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.
usdrt::PhysxSchemaPhysxHairAPI::GetTwosidedAttachmentAttr: Whether the hair should have an effect on the body it is attached to.
usdrt::PhysxSchemaPhysxHairAPI::GetVelSmoothingAttr: 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.
usdrt::PhysxSchemaPhysxHairAPI::PhysxSchemaPhysxHairAPI: Construct a PhysxSchemaPhysxHairAPI on UsdPrim
prim
. Equivalent to PhysxSchemaPhysxHairAPI::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.usdrt::PhysxSchemaPhysxHairAPI::PhysxSchemaPhysxHairAPI: Construct a PhysxSchemaPhysxHairAPI on the prim held by
schemaObj
. Should be preferred over PhysxSchemaPhysxHairAPI (schemaObj.GetPrim()), as it preserves SchemaBase state.usdrt::DestructionSchemaDestructibleBaseAPI::_GetInstanceName: Returns the instance name of the API schema object belonging to a multiple-apply API schema.
usdrt::PhysxSchemaPhysxHairAPI::operator bool: Boolean operator.
usdrt::PhysxSchemaPhysxHairAPI::~PhysxSchemaPhysxHairAPI: Destructor.
Variables
usdrt::PhysxSchemaPhysxHairAPI::schemaType: Compile time constant representing what kind of schema this class is.
-
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 validprim
, but will not immediately throw an error for an invalidprim
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
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
-
inline explicit PhysxSchemaPhysxHairAPI(const UsdPrim &prim = UsdPrim())