A conical force field that attracts and/or repels rigid bodies from a central point, but not outside of the cone angle limit, depending on the function coefficients. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
ForceFieldSchemaPhysxForceFieldConicalAPI (const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken()) | |
Construct a ForceFieldSchemaPhysxForceFieldConicalAPI on UsdPrim prim with name name . More... | |
ForceFieldSchemaPhysxForceFieldConicalAPI (const UsdSchemaBase &schemaObj, const TfToken &name) | |
Construct a ForceFieldSchemaPhysxForceFieldConicalAPI on the prim held by schemaObj with name name . More... | |
virtual FORCEFIELDSCHEMA_API | ~ForceFieldSchemaPhysxForceFieldConicalAPI () |
Destructor. More... | |
TfToken | GetName () const |
Returns the name of this multiple-apply schema instance. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | GetDirectionAttr () const |
The direction vector of the central axis of the cone. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | CreateDirectionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetDirectionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | GetAngleAttr () const |
Angle from the central axis of the cone to the surface that defines the extents of the cone. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | CreateAngleAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetAngleAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | GetConstantAttr () const |
constant applies a steady force. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | CreateConstantAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetConstantAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | GetLinearAttr () const |
linear sets a force that varies with distance to the center. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | CreateLinearAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetLinearAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | GetInverseSquareAttr () const |
inverseSquare sets a force that varies with the reciprocal of the square of the distance to the center. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | CreateInverseSquareAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetInverseSquareAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | GetLinearFalloffAttr () const |
ramp down forces linearly with the angle from the central axis. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | CreateLinearFalloffAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetLinearFalloffAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | GetPowerFalloffAttr () const |
ramp down forces dramatically with the angle from the central axis. More... | |
FORCEFIELDSCHEMA_API UsdAttribute | CreatePowerFalloffAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetPowerFalloffAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
Static Public Member Functions | |
static FORCEFIELDSCHEMA_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 FORCEFIELDSCHEMA_API TfTokenVector | GetSchemaAttributeNames (bool includeInherited, const TfToken &instanceName) |
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name. More... | |
static FORCEFIELDSCHEMA_API ForceFieldSchemaPhysxForceFieldConicalAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a ForceFieldSchemaPhysxForceFieldConicalAPI holding the prim adhering to this schema at path on stage . More... | |
static FORCEFIELDSCHEMA_API ForceFieldSchemaPhysxForceFieldConicalAPI | Get (const UsdPrim &prim, const TfToken &name) |
Return a ForceFieldSchemaPhysxForceFieldConicalAPI with name name holding the prim prim . More... | |
static FORCEFIELDSCHEMA_API std::vector < ForceFieldSchemaPhysxForceFieldConicalAPI > | GetAll (const UsdPrim &prim) |
Return a vector of all named instances of ForceFieldSchemaPhysxForceFieldConicalAPI on the given prim . More... | |
static FORCEFIELDSCHEMA_API bool | IsSchemaPropertyBaseName (const TfToken &baseName) |
Checks if the given name baseName is the base name of a property of PhysxForceFieldConicalAPI. More... | |
static FORCEFIELDSCHEMA_API bool | IsPhysxForceFieldConicalAPIPath (const SdfPath &path, TfToken *name) |
Checks if the given path path is of an API schema of type PhysxForceFieldConicalAPI. More... | |
static FORCEFIELDSCHEMA_API bool | CanApply (const UsdPrim &prim, const TfToken &name, std::string *whyNot=nullptr) |
Returns true if this multiple-apply API schema can be applied, with the given instance name, name , to the given prim . More... | |
static FORCEFIELDSCHEMA_API ForceFieldSchemaPhysxForceFieldConicalAPI | Apply (const UsdPrim &prim, const TfToken &name) |
Applies this multiple-apply API schema to the given prim along with the given instance name, name . More... | |
Static Public Attributes | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::MultipleApplyAPI |
Compile time constant representing what kind of schema this class is. More... | |
Protected Member Functions | |
FORCEFIELDSCHEMA_API UsdSchemaKind | _GetSchemaKind () const override |
Returns the kind of schema this class belongs to. More... | |
Friends | |
class | UsdSchemaRegistry |
A conical force field that attracts and/or repels rigid bodies from a central point, but not outside of the cone angle limit, depending on the function coefficients.
Positive values attract and negative values repel. The net force on the rigid body is calculated using f = constant + linear * r + inverseSquare / r^2, where r is the distance to the center.
Definition at line 60 of file physxForceFieldConicalAPI.h.
|
inlineexplicit |
Construct a ForceFieldSchemaPhysxForceFieldConicalAPI on UsdPrim prim
with name name
.
Equivalent to ForceFieldSchemaPhysxForceFieldConicalAPI::Get( prim.GetStage(), prim.GetPath().AppendProperty( "physxForceField:name"));
for a valid prim
, but will not immediately throw an error for an invalid prim
Definition at line 77 of file physxForceFieldConicalAPI.h.
|
inlineexplicit |
Construct a ForceFieldSchemaPhysxForceFieldConicalAPI on the prim held by schemaObj
with name name
.
Should be preferred over ForceFieldSchemaPhysxForceFieldConicalAPI(schemaObj.GetPrim(), name), as it preserves SchemaBase state.
Definition at line 86 of file physxForceFieldConicalAPI.h.
|
virtual |
Destructor.
|
overrideprotected |
Returns the kind of schema this class belongs to.
|
static |
Applies this multiple-apply API schema to the given prim
along with the given instance name, name
.
This information is stored by adding "PhysxForceFieldConicalAPI:<i>name</i>" to the token-valued, listOp metadata apiSchemas on the prim. For example, if name
is 'instance1', the token 'PhysxForceFieldConicalAPI:instance1' is added to 'apiSchemas'.
|
static |
Returns true if this multiple-apply API schema can be applied, with the given instance name, name
, to the given prim
.
If this schema can not be a applied 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.
FORCEFIELDSCHEMA_API UsdAttribute CreateAngleAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetAngleAttr(), 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
.
FORCEFIELDSCHEMA_API UsdAttribute CreateConstantAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetConstantAttr(), 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
.
FORCEFIELDSCHEMA_API UsdAttribute CreateDirectionAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetDirectionAttr(), 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
.
FORCEFIELDSCHEMA_API UsdAttribute CreateInverseSquareAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetInverseSquareAttr(), 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
.
FORCEFIELDSCHEMA_API UsdAttribute CreateLinearAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetLinearAttr(), 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
.
FORCEFIELDSCHEMA_API UsdAttribute CreateLinearFalloffAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetLinearFalloffAttr(), 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
.
FORCEFIELDSCHEMA_API UsdAttribute CreatePowerFalloffAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetPowerFalloffAttr(), 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 ForceFieldSchemaPhysxForceFieldConicalAPI 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. path
must be of the format <path>.physxForceField:name .
This is shorthand for the following:
|
static |
Return a ForceFieldSchemaPhysxForceFieldConicalAPI with name name
holding the prim prim
.
Shorthand for ForceFieldSchemaPhysxForceFieldConicalAPI(prim, name);
|
static |
Return a vector of all named instances of ForceFieldSchemaPhysxForceFieldConicalAPI on the given prim
.
FORCEFIELDSCHEMA_API UsdAttribute GetAngleAttr | ( | ) | const |
Angle from the central axis of the cone to the surface that defines the extents of the cone.
Forces are not applied to rigid bodies outside of the cone.
Declaration | float physxForceFieldConical:angle = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
FORCEFIELDSCHEMA_API UsdAttribute GetConstantAttr | ( | ) | const |
constant applies a steady force.
Declaration | float physxForceFieldConical:constant = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
FORCEFIELDSCHEMA_API UsdAttribute GetDirectionAttr | ( | ) | const |
The direction vector of the central axis of the cone.
Forces are not applied to rigid bodies outside of the cone.
Declaration | vector3f physxForceFieldLinear:direction = (0, 0, 0) |
C++ Type | GfVec3f |
Usd Type | SdfValueTypeNames->Vector3f |
FORCEFIELDSCHEMA_API UsdAttribute GetInverseSquareAttr | ( | ) | const |
inverseSquare sets a force that varies with the reciprocal of the square of the distance to the center.
Declaration | float physxForceFieldConical:inverseSquare = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
FORCEFIELDSCHEMA_API UsdAttribute GetLinearAttr | ( | ) | const |
linear sets a force that varies with distance to the center.
Declaration | float physxForceFieldConical:linear = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
FORCEFIELDSCHEMA_API UsdAttribute GetLinearFalloffAttr | ( | ) | const |
ramp down forces linearly with the angle from the central axis.
set linearFalloff to 0.0 to disable. linearFalloff is the percentage of the force remaining at the cone angle extents (>0.0 to 1.0).
Declaration | float physxForceFieldConical:linearFalloff = 0 |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
|
inline |
Returns the name of this multiple-apply schema instance.
Definition at line 112 of file physxForceFieldConicalAPI.h.
FORCEFIELDSCHEMA_API UsdAttribute GetPowerFalloffAttr | ( | ) | const |
ramp down forces dramatically with the angle from the central axis.
set powerFalloff to 0.0 to disable. >0.0 to 1.0 decay more as this angle increases. 1.0 and greater decay more as the angle apporaches the cone angle limit.
Declaration | float physxForceFieldConical:powerFalloff = 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.
|
static |
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name.
Does not include attributes that may be authored by custom/extended methods of the schemas involved. The names returned will have the proper namespace prefix.
|
static |
Checks if the given path path
is of an API schema of type PhysxForceFieldConicalAPI.
If so, it stores the instance name of the schema in name
and returns true. Otherwise, it returns false.
|
static |
Checks if the given name baseName
is the base name of a property of PhysxForceFieldConicalAPI.
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 66 of file physxForceFieldConicalAPI.h.