All Classes Files Functions Variables Pages
PhysxSchemaPhysxHairAPI Class Reference

WARNING: This is a draft API; the design is not fixed and may change in the future. More...

Inherits UsdAPISchemaBase.

Public Member Functions

 PhysxSchemaPhysxHairAPI (const UsdPrim &prim=UsdPrim())
 Construct a PhysxSchemaPhysxHairAPI on UsdPrim prim . More...
 
 PhysxSchemaPhysxHairAPI (const UsdSchemaBase &schemaObj)
 Construct a PhysxSchemaPhysxHairAPI on the prim held by schemaObj . More...
 
virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxHairAPI ()
 Destructor. More...
 
PHYSXSCHEMA_API UsdAttribute GetExternalCollisionAttr () const
 Enables the hair segments to collide with other physics objects that have a collision API applied to them. More...
 
PHYSXSCHEMA_API UsdAttribute CreateExternalCollisionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetExternalCollisionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetTwosidedAttachmentAttr () const
 Whether the hair should have an effect on the body it is attached to. More...
 
PHYSXSCHEMA_API UsdAttribute CreateTwosidedAttachmentAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetTwosidedAttachmentAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetSegmentLengthAttr () const
 Length of one hair segment (i.e., distance between simulation vertices along a strand). More...
 
PHYSXSCHEMA_API UsdAttribute CreateSegmentLengthAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetSegmentLengthAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetGlobalShapeComplianceAtRootAttr () const
 Compliance to the global shape-matching constraint at the root of the strand. More...
 
PHYSXSCHEMA_API UsdAttribute CreateGlobalShapeComplianceAtRootAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetGlobalShapeComplianceAtRootAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API 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. More...
 
PHYSXSCHEMA_API UsdAttribute CreateGlobalShapeComplianceStrandAttenuationAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetGlobalShapeComplianceStrandAttenuationAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetInterHairRepulsionAttr () const
 Strength of the repulsion effect between hair segments. More...
 
PHYSXSCHEMA_API UsdAttribute CreateInterHairRepulsionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetInterHairRepulsionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetVelSmoothingAttr () const
 Strength of the velocity smoothing effect. More...
 
PHYSXSCHEMA_API UsdAttribute CreateVelSmoothingAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetVelSmoothingAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetLocalShapeMatchingComplianceAttr () const
 Compliance to the local shape matching constraint, which preserves strand shapes. More...
 
PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingComplianceAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetLocalShapeMatchingComplianceAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetLocalShapeMatchingLinearStretchingAttr () const
 Proportion of linear stretching vs rigid transformation allowed in the local shape matching constraint. More...
 
PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingLinearStretchingAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetLocalShapeMatchingLinearStretchingAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetLocalShapeMatchingGroupSizeAttr () const
 How many vertices of a strand are grouped together into one shape-matching constraint. More...
 
PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingGroupSizeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetLocalShapeMatchingGroupSizeAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetLocalShapeMatchingGroupOverlapAttr () const
 Number of vertices by which consecutive shape-matching groups are overlapping. More...
 
PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingGroupOverlapAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetLocalShapeMatchingGroupOverlapAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 

Static Public Member Functions

static PHYSXSCHEMA_API const
TfTokenVector & 
GetSchemaAttributeNames (bool includeInherited=true)
 Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxHairAPI 
Get (const UsdStagePtr &stage, const SdfPath &path)
 Return a PhysxSchemaPhysxHairAPI holding the prim adhering to this schema at path on stage. More...
 
static PHYSXSCHEMA_API bool CanApply (const UsdPrim &prim, std::string *whyNot=nullptr)
 Returns true if this single-apply API schema can be applied to the given prim. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxHairAPI 
Apply (const UsdPrim &prim)
 Applies this single-apply API schema to the given prim. More...
 

Static Public Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI
 Compile time constant representing what kind of schema this class is. More...
 

Protected Member Functions

PHYSXSCHEMA_API UsdSchemaKind _GetSchemaKind () const override
 Returns the kind of schema this class belongs to. More...
 

Friends

class UsdSchemaRegistry
 

Detailed Description

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.

Definition at line 59 of file physxHairAPI.h.

Constructor & Destructor Documentation

PhysxSchemaPhysxHairAPI ( const UsdPrim &  prim = UsdPrim())
inlineexplicit

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

Definition at line 71 of file physxHairAPI.h.

PhysxSchemaPhysxHairAPI ( const UsdSchemaBase &  schemaObj)
inlineexplicit

Construct a PhysxSchemaPhysxHairAPI on the prim held by schemaObj .

Should be preferred over PhysxSchemaPhysxHairAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.

Definition at line 79 of file physxHairAPI.h.

virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxHairAPI ( )
virtual

Destructor.

Member Function Documentation

PHYSXSCHEMA_API UsdSchemaKind _GetSchemaKind ( ) const
overrideprotected

Returns the kind of schema this class belongs to.

See Also
UsdSchemaKind
static PHYSXSCHEMA_API PhysxSchemaPhysxHairAPI Apply ( const UsdPrim &  prim)
static

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.

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.
See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
static PHYSXSCHEMA_API bool CanApply ( const UsdPrim &  prim,
std::string *  whyNot = nullptr 
)
static

Returns true if this single-apply API schema can be applied to the given prim.

If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied.

Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema.

See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
PHYSXSCHEMA_API UsdAttribute CreateExternalCollisionAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetExternalCollisionAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateGlobalShapeComplianceAtRootAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetGlobalShapeComplianceAtRootAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateGlobalShapeComplianceStrandAttenuationAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetGlobalShapeComplianceStrandAttenuationAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateInterHairRepulsionAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetInterHairRepulsionAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingComplianceAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetLocalShapeMatchingComplianceAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingGroupOverlapAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetLocalShapeMatchingGroupOverlapAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingGroupSizeAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetLocalShapeMatchingGroupSizeAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateLocalShapeMatchingLinearStretchingAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetLocalShapeMatchingLinearStretchingAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateSegmentLengthAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetSegmentLengthAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateTwosidedAttachmentAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetTwosidedAttachmentAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateVelSmoothingAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetVelSmoothingAttr(), and also Usd_Create_Or_Get_Property 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.

static PHYSXSCHEMA_API PhysxSchemaPhysxHairAPI Get ( const UsdStagePtr &  stage,
const SdfPath &  path 
)
static

Return a PhysxSchemaPhysxHairAPI holding the prim adhering to this schema at path on stage.

If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

* PhysxSchemaPhysxHairAPI(stage->GetPrimAtPath(path));
*
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
static PHYSXSCHEMA_API const TfTokenVector& GetSchemaAttributeNames ( bool  includeInherited = true)
static

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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

Member Data Documentation

const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI
static

Compile time constant representing what kind of schema this class is.

See Also
UsdSchemaKind

Definition at line 65 of file physxHairAPI.h.


The documentation for this class was generated from the following file: