usdrt::PhysxSchemaPhysxVehicleDriveBasicAPI

Defined in usdrt/scenegraph/usd/physxSchema/physxVehicleDriveBasicAPI.h

Functions

Variables

class PhysxSchemaPhysxVehicleDriveBasicAPI : public usdrt::UsdAPISchemaBase

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).

Public Functions

inline explicit PhysxSchemaPhysxVehicleDriveBasicAPI(const UsdPrim &prim = UsdPrim())

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.

inline explicit PhysxSchemaPhysxVehicleDriveBasicAPI(const UsdSchemaBase &schemaObj)

Construct a PhysxSchemaPhysxVehicleDriveBasicAPI on the prim held by schemaObj . Should be preferred over PhysxSchemaPhysxVehicleDriveBasicAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.

inline virtual ~PhysxSchemaPhysxVehicleDriveBasicAPI()

Destructor.

inline operator bool() const

Boolean operator.

Returns

Return true if the contained prim is has this api schema applied using HasAPI, and false otherwise.

inline 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

inline UsdAttribute CreatePeakTorqueAttr() const

See GetPeakTorqueAttr(), and also Create vs Get Property Methods 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.

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

Return the SdfPath to this schema object’s held prim.

Public Static Functions

static inline PhysxSchemaPhysxVehicleDriveBasicAPI Apply(const UsdPrim &prim)

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.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

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.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI

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

See also

UsdSchemaType

Protected Functions

inline const TfToken &_GetInstanceName() const

Returns the instance name of the API schema object belonging to a multiple-apply API schema.

The returned instance name will be empty for non-applied and single-apply API schemas.