Defines simulation material properties. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
UsdPhysicsMaterialAPI (const UsdPrim &prim=UsdPrim()) | |
Construct a UsdPhysicsMaterialAPI on UsdPrim prim . More... | |
UsdPhysicsMaterialAPI (const UsdSchemaBase &schemaObj) | |
Construct a UsdPhysicsMaterialAPI on the prim held by schemaObj . More... | |
virtual USDPHYSICS_API | ~UsdPhysicsMaterialAPI () |
Destructor. More... | |
USDPHYSICS_API UsdAttribute | GetDynamicFrictionAttr () const |
Dynamic friction coefficient. More... | |
USDPHYSICS_API UsdAttribute | CreateDynamicFrictionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetDynamicFrictionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
USDPHYSICS_API UsdAttribute | GetStaticFrictionAttr () const |
Static friction coefficient. More... | |
USDPHYSICS_API UsdAttribute | CreateStaticFrictionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetStaticFrictionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
USDPHYSICS_API UsdAttribute | GetRestitutionAttr () const |
Restitution coefficient. More... | |
USDPHYSICS_API UsdAttribute | CreateRestitutionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetRestitutionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
USDPHYSICS_API UsdAttribute | GetDensityAttr () const |
If non-zero, defines the density of the material. More... | |
USDPHYSICS_API UsdAttribute | CreateDensityAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetDensityAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
Static Public Member Functions | |
static USDPHYSICS_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 USDPHYSICS_API UsdPhysicsMaterialAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a UsdPhysicsMaterialAPI holding the prim adhering to this schema at path on stage . More... | |
static USDPHYSICS_API UsdPhysicsMaterialAPI | Apply (const UsdPrim &prim) |
Applies this single-apply API schema to the given prim . More... | |
Static Public Attributes | |
static const UsdSchemaType | schemaType = UsdSchemaType::SingleApplyAPI |
Compile time constant representing what kind of schema this class is. More... | |
Protected Member Functions | |
USDPHYSICS_API UsdSchemaType | _GetSchemaType () const override |
Returns the type of schema this class belongs to. More... | |
Friends | |
class | UsdSchemaRegistry |
Defines simulation material properties.
All collisions that have a material binding with purpose physics to this material will have their collision response defined through this material.
Definition at line 59 of file materialAPI.h.
|
inlineexplicit |
Construct a UsdPhysicsMaterialAPI on UsdPrim prim
.
Equivalent to UsdPhysicsMaterialAPI::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 materialAPI.h.
|
inlineexplicit |
Construct a UsdPhysicsMaterialAPI on the prim held by schemaObj
.
Should be preferred over UsdPhysicsMaterialAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
Definition at line 79 of file materialAPI.h.
|
virtual |
Destructor.
|
overrideprotected |
Returns the type of schema this class belongs to.
|
static |
Applies this single-apply API schema to the given prim
.
This information is stored by adding "PhysicsMaterialAPI" to the token-valued, listOp metadata apiSchemas on the prim.
USDPHYSICS_API UsdAttribute CreateDensityAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetDensityAttr(), 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
.
USDPHYSICS_API UsdAttribute CreateDynamicFrictionAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetDynamicFrictionAttr(), 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
.
USDPHYSICS_API UsdAttribute CreateRestitutionAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetRestitutionAttr(), 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
.
USDPHYSICS_API UsdAttribute CreateStaticFrictionAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetStaticFrictionAttr(), 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 |
Return a UsdPhysicsMaterialAPI 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:
USDPHYSICS_API UsdAttribute GetDensityAttr | ( | ) | const |
If non-zero, defines the density of the material.
This can be used for body mass computation, see PhysicsMassAPI. Note that if the density is 0.0 it is ignored. Units: mass/distance/distance/distance.
Declaration | float physics:density = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
USDPHYSICS_API UsdAttribute GetDynamicFrictionAttr | ( | ) | const |
Dynamic friction coefficient.
Unitless.
Declaration | float physics:dynamicFriction = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
USDPHYSICS_API UsdAttribute GetRestitutionAttr | ( | ) | const |
Restitution coefficient.
Unitless.
Declaration | float physics:restitution = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
|
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.
USDPHYSICS_API UsdAttribute GetStaticFrictionAttr | ( | ) | const |
Static friction coefficient.
Unitless.
Declaration | float physics:staticFriction = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 65 of file materialAPI.h.