Very simple drive model for a PhysX vehicle. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
PhysxSchemaPhysxVehicleDriveBasicAPI (const UsdPrim &prim=UsdPrim()) | |
Construct a PhysxSchemaPhysxVehicleDriveBasicAPI on UsdPrim prim . More... | |
PhysxSchemaPhysxVehicleDriveBasicAPI (const UsdSchemaBase &schemaObj) | |
Construct a PhysxSchemaPhysxVehicleDriveBasicAPI on the prim held by schemaObj . More... | |
virtual PHYSXSCHEMA_API | ~PhysxSchemaPhysxVehicleDriveBasicAPI () |
Destructor. More... | |
PHYSXSCHEMA_API UsdAttribute | GetPeakTorqueAttr () const |
Maximum torque to generate when the accelerator pedal is at maximum (units: mass * distance * distance / seconds / seconds). More... | |
PHYSXSCHEMA_API UsdAttribute | CreatePeakTorqueAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetPeakTorqueAttr(), 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 PhysxSchemaPhysxVehicleDriveBasicAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a PhysxSchemaPhysxVehicleDriveBasicAPI 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 PhysxSchemaPhysxVehicleDriveBasicAPI | 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 |
Very simple drive model for a PhysX vehicle.
A torque will be directly applied to the wheels that are marked as driven (see PhysxVehicleMultiWheelDifferentialAPI or deprecated attribute "driven" in PhysxVehicleWheelAttachmentAPI).
If the drive setup does not need to be shared among vehicle instances, it can be applied to the prim which has PhysxVehicleAPI applied. If the intent is to share the drive setup, PhysxVehicleDriveBasicAPI can be applied to a separate prim which can be linked to (see PhysxVehicleAPI).
Definition at line 63 of file physxVehicleDriveBasicAPI.h.
|
inlineexplicit |
Construct a PhysxSchemaPhysxVehicleDriveBasicAPI on UsdPrim prim
.
Equivalent to PhysxSchemaPhysxVehicleDriveBasicAPI::Get(prim.GetStage(), prim.GetPath()) for a valid prim
, but will not immediately throw an error for an invalid prim
Definition at line 75 of file physxVehicleDriveBasicAPI.h.
|
inlineexplicit |
Construct a PhysxSchemaPhysxVehicleDriveBasicAPI on the prim held by schemaObj
.
Should be preferred over PhysxSchemaPhysxVehicleDriveBasicAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
Definition at line 83 of file physxVehicleDriveBasicAPI.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 "PhysxVehicleDriveBasicAPI" 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 CreatePeakTorqueAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetPeakTorqueAttr(), 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 PhysxSchemaPhysxVehicleDriveBasicAPI 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 GetPeakTorqueAttr | ( | ) | const |
Maximum torque to generate when the accelerator pedal is at maximum (units: mass * distance * distance / seconds / seconds).
The value has to be greater or equal 0.
Note: PhysxVehicleMultiWheelDifferentialAPI can be used to specify which wheels are connected to the drive as well as how the torque should be distributed among those wheels. If the deprecated attribute "driven" of PhysxVehicleWheelAttachmentAPI is used, then each driven wheel can experience a torque up to the value defined in this attribute.
Note: the applied torque is the value of the accelerator pedal (in range [0, 1]) multiplied by peakTorque.
Note: the default value -1 is not a valid value as such but will result in the value 1000.0 being used (in meter length scale and kilogram mass scale or the equivalent if other units are used).
Declaration | float physxVehicleDriveBasic:peakTorque = -1 |
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 |
Compile time constant representing what kind of schema this class is.
Definition at line 69 of file physxVehicleDriveBasicAPI.h.