All Classes Files Functions Variables Pages
PhysxSchemaPhysxVehicleDriveBasicAPI Class Reference

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

PHYSXSCHEMA_API UsdSchemaType _GetSchemaType () const override
 Returns the type of schema this class belongs to. More...
 

Friends

class UsdSchemaRegistry
 

Detailed Description

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.

Constructor & Destructor Documentation

PhysxSchemaPhysxVehicleDriveBasicAPI ( const UsdPrim &  prim = UsdPrim())
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.

PhysxSchemaPhysxVehicleDriveBasicAPI ( const UsdSchemaBase &  schemaObj)
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 PHYSXSCHEMA_API ~PhysxSchemaPhysxVehicleDriveBasicAPI ( )
virtual

Destructor.

Member Function Documentation

PHYSXSCHEMA_API UsdSchemaType _GetSchemaType ( ) const
overrideprotected

Returns the type of schema this class belongs to.

See Also
UsdSchemaType
static PHYSXSCHEMA_API PhysxSchemaPhysxVehicleDriveBasicAPI Apply ( const UsdPrim &  prim)
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.

Returns
A valid PhysxSchemaPhysxVehicleDriveBasicAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxVehicleDriveBasicAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.
See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
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 PHYSXSCHEMA_API PhysxSchemaPhysxVehicleDriveBasicAPI Get ( const UsdStagePtr &  stage,
const SdfPath &  path 
)
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:

* PhysxSchemaPhysxVehicleDriveBasicAPI(stage->GetPrimAtPath(path));
*
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 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.

Member Data Documentation

const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI
static

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

See Also
UsdSchemaType

Definition at line 69 of file physxVehicleDriveBasicAPI.h.


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