usdrt::PhysxSchemaPhysxVehicleEngineAPI

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

Functions

Variables

class PhysxSchemaPhysxVehicleEngineAPI : public usdrt::UsdAPISchemaBase

Properties of a PhysX vehicle engine. If the engine 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 engine setup, PhysxVehicleEngineAPI can be applied to a separate prim which can be linked to (see PhysxVehicleDriveStandardAPI).

Public Functions

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

Construct a PhysxSchemaPhysxVehicleEngineAPI on UsdPrim prim. Equivalent to PhysxSchemaPhysxVehicleEngineAPI::Get(prim.GetStage(), prim.GetPath()) for a valid prim , but will not immediately throw an error for an invalid prim.

inline explicit PhysxSchemaPhysxVehicleEngineAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxVehicleEngineAPI()

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 GetMoiAttr() const

The moment of inertia of the engine around the axis of rotation (units: mass * distance * distance). The value has to be positive.

Note: if not defined, the value 1.0 will be used. This default value is in meter length scale and kilograms and will get adjusted if other units are used.

Declaration

float physxVehicleEngine:moi

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateMoiAttr() const

See GetMoiAttr(), 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.

inline UsdAttribute GetPeakTorqueAttr() const

Maximum torque available to apply to the engine when the accelerator pedal is at maximum (units: mass * distance * distance / seconds / seconds). The value has to be greater or equal 0.

Note: the torque available is the value of the accelerator pedal (in range [0, 1]) multiplied by the normalized torque as computed from torqueCurve (see corresponding attribute) multiplied by peakTorque.

Note: the default value -1 is not a valid value as such but will result in the value 500.0 being used (in meter length scale and kilogram mass scale or the equivalent if other units are used).

Declaration

float physxVehicleEngine: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.

inline UsdAttribute GetMaxRotationSpeedAttr() const

Maximum rotation speed of the engine (units: radians / seconds). The value has to be greater or equal 0.

Declaration

float physxVehicleEngine:maxRotationSpeed = 600

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateMaxRotationSpeedAttr() const

See GetMaxRotationSpeedAttr(), 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.

inline UsdAttribute GetIdleRotationSpeedAttr() const

Rotation speed of the engine when idling (units: radians / seconds). The value has to be greater or equal 0.

Declaration

float physxVehicleEngine:idleRotationSpeed = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateIdleRotationSpeedAttr() const

See GetIdleRotationSpeedAttr(), 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.

inline UsdAttribute GetTorqueCurveAttr() const

Graph of normalized torque (torque / peakTorque) against normalized engine speed (engineRotationSpeed / maxRotationSpeed).

Note: the normalized engine speed is the x-axis of the graph, while the normalized torque is the y-axis of the graph. No more than 8 data points are supported.

Note: if not defined, the following values will be used: [(0.0, 0.8), (0.33, 1.0), (1.0, 0.8)].

Declaration

float2[] physxVehicleEngine:torqueCurve

C++ Type

VtArray<GfVec2f>

Usd Type

SdfValueTypeNames->Float2Array

inline UsdAttribute CreateTorqueCurveAttr() const

See GetTorqueCurveAttr(), 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.

inline UsdAttribute GetDampingRateFullThrottleAttr() const

Damping rate of engine when full throttle is applied (units: torque * seconds = mass * distance * distance / seconds). The value has to be greater or equal 0.

Note: if the clutch is engaged (any gear except neutral) then the damping rate applied at run-time is an interpolation between dampingRateZeroThrottleClutchEngaged (see corresponding attribute) and dampingRateFullThrottle: dampingRateZeroThrottleClutchEngaged + ((dampingRateFullThrottle-dampingRateZeroThrottleClutchEngaged) * acceleratorPedal).

Note: if the clutch is disengaged (in neutral gear) the damping rate applied at run-time is an interpolation between dampingRateZeroThrottleClutchDisengaged (see corresponding attribute) and dampingRateFullThrottle: dampingRateZeroThrottleClutchDisengaged + ((dampingRateFullThrottle-dampingRateZeroThrottleClutchDisengaged) * acceleratorPedal).

Note: the default value -1 is not a valid value as such but will result in the value 0.15 being used (in meter length scale and kilogram mass scale or the equivalent if other units are used).

Declaration

float physxVehicleEngine:dampingRateFullThrottle = -1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateDampingRateFullThrottleAttr() const

See GetDampingRateFullThrottleAttr(), 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.

inline UsdAttribute GetDampingRateZeroThrottleClutchEngagedAttr() const

Damping rate of engine when no throttle is applied and the clutch is engaged (units: torque * seconds = mass * distance * distance / seconds). See attribute “dampingRateFullThrottle” for information about the effect of the value. The value has to be greater or equal 0.

Note: the default value -1 is not a valid value as such but will result in the value 2.0 being used (in meter length scale and kilogram mass scale or the equivalent if other units are used).

Declaration

float physxVehicleEngine:dampingRateZeroThrottleClutchEngaged = -1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateDampingRateZeroThrottleClutchEngagedAttr() const

See GetDampingRateZeroThrottleClutchEngagedAttr(), 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.

inline UsdAttribute GetDampingRateZeroThrottleClutchDisengagedAttr() const

Damping rate of engine when no throttle is applied and the clutch is disengaged (units: torque * seconds = mass * distance * distance / seconds). See attribute “dampingRateFullThrottle” for information about the effect of the value. The value has to be greater or equal 0.

Note: the default value -1 is not a valid value as such but will result in the value 0.35 being used (in meter length scale and kilogram mass scale or the equivalent if other units are used).

Declaration

float physxVehicleEngine:dampingRateZeroThrottleClutchDisengaged = -1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateDampingRateZeroThrottleClutchDisengagedAttr() const

See GetDampingRateZeroThrottleClutchDisengagedAttr(), 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 PhysxSchemaPhysxVehicleEngineAPI Apply(const UsdPrim &prim)

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysxVehicleEngineAPI” 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 PhysxSchemaPhysxVehicleEngineAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxVehicleEngineAPI 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.