Properties of PhysX vehicle gears. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
PhysxSchemaPhysxVehicleGearsAPI (const UsdPrim &prim=UsdPrim()) | |
Construct a PhysxSchemaPhysxVehicleGearsAPI on UsdPrim prim . More... | |
PhysxSchemaPhysxVehicleGearsAPI (const UsdSchemaBase &schemaObj) | |
Construct a PhysxSchemaPhysxVehicleGearsAPI on the prim held by schemaObj . More... | |
virtual PHYSXSCHEMA_API | ~PhysxSchemaPhysxVehicleGearsAPI () |
Destructor. More... | |
PHYSXSCHEMA_API UsdAttribute | GetRatiosAttr () const |
The gear ratios. More... | |
PHYSXSCHEMA_API UsdAttribute | CreateRatiosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetRatiosAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
PHYSXSCHEMA_API UsdAttribute | GetRatioScaleAttr () const |
Multiplier for gear ratio values. More... | |
PHYSXSCHEMA_API UsdAttribute | CreateRatioScaleAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetRatioScaleAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
PHYSXSCHEMA_API UsdAttribute | GetSwitchTimeAttr () const |
Time it takes to switch gear (units: seconds). More... | |
PHYSXSCHEMA_API UsdAttribute | CreateSwitchTimeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetSwitchTimeAttr(), 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 PhysxSchemaPhysxVehicleGearsAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a PhysxSchemaPhysxVehicleGearsAPI 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 PhysxSchemaPhysxVehicleGearsAPI | 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 |
Properties of PhysX vehicle gears.
If the gears setup does not need to be shared among vehicle instances, it can be applied to the prim which has PhysxVehicleDriveStandardAPI applied. If the intent is to share the gears setup, PhysxVehicleGearsAPI can be applied to a separate prim which can be linked to (see PhysxVehicleDriveStandardAPI).
Definition at line 60 of file physxVehicleGearsAPI.h.
|
inlineexplicit |
Construct a PhysxSchemaPhysxVehicleGearsAPI on UsdPrim prim
.
Equivalent to PhysxSchemaPhysxVehicleGearsAPI::Get(prim.GetStage(), prim.GetPath()) for a valid prim
, but will not immediately throw an error for an invalid prim
Definition at line 72 of file physxVehicleGearsAPI.h.
|
inlineexplicit |
Construct a PhysxSchemaPhysxVehicleGearsAPI on the prim held by schemaObj
.
Should be preferred over PhysxSchemaPhysxVehicleGearsAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
Definition at line 80 of file physxVehicleGearsAPI.h.
|
virtual |
Destructor.
|
overrideprotected |
Returns the kind of schema this class belongs to.
|
static |
Applies this single-apply API schema to the given prim
.
This information is stored by adding "PhysxVehicleGearsAPI" to the token-valued, listOp metadata apiSchemas on the prim.
|
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.
PHYSXSCHEMA_API UsdAttribute CreateRatiosAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetRatiosAttr(), 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 CreateRatioScaleAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetRatioScaleAttr(), 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 CreateSwitchTimeAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetSwitchTimeAttr(), 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 PhysxSchemaPhysxVehicleGearsAPI 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:
PHYSXSCHEMA_API UsdAttribute GetRatiosAttr | ( | ) | const |
The gear ratios.
First entry is for reverse, then there is support for up to 30 gears (neutral has a fixed value of 0 and is not represented in this array). The value for reverse has to be negative, else a positive value is expected and the ratios have to form a descending sequence.
Note: if not defined, the following values will be used: [-4.0, 4.0, 2.0, 1.5, 1.1, 1.0].
Declaration | float[] physxVehicleGears:ratios |
C++ Type | VtArray<float> |
Usd Type | SdfValueTypeNames->FloatArray |
PHYSXSCHEMA_API UsdAttribute GetRatioScaleAttr | ( | ) | const |
Multiplier for gear ratio values.
Final gear ratio is computed as ratios[currentGear] * ratioScale. The value has to be positive.
Note: if not defined, the value 4.0 will be used.
Declaration | float physxVehicleGears:ratioScale |
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.
PHYSXSCHEMA_API UsdAttribute GetSwitchTimeAttr | ( | ) | const |
Time it takes to switch gear (units: seconds).
Note: if not defined, the value 0.5 will be used.
Declaration | float physxVehicleGears:switchTime |
C++ Type | float |
Usd Type | SdfValueTypeNames->Float |
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 66 of file physxVehicleGearsAPI.h.