usdrt::PhysxSchemaPhysxVehicleGearsAPI

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

Functions

Variables

class PhysxSchemaPhysxVehicleGearsAPI : public usdrt::UsdAPISchemaBase

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

Public Functions

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

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.

inline explicit PhysxSchemaPhysxVehicleGearsAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxVehicleGearsAPI()

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

inline UsdAttribute CreateRatiosAttr() const

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

inline UsdAttribute CreateRatioScaleAttr() const

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

inline UsdAttribute CreateSwitchTimeAttr() const

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

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.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns

A valid PhysxSchemaPhysxVehicleGearsAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxVehicleGearsAPI 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.