usdrt::PhysxSchemaPhysxVehicleControllerAPI

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

Functions

Variables

class PhysxSchemaPhysxVehicleControllerAPI : public usdrt::UsdAPISchemaBase

PhysX vehicle controller that samples user input to drive the vehicle. Has to be applied to a prim with PhysxVehicleAPI applied.

Public Functions

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

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

inline explicit PhysxSchemaPhysxVehicleControllerAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxVehicleControllerAPI()

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

Driven vehicle. Throttle input, 0.0 to 1.0.

Declaration

float physxVehicleController:accelerator = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateAcceleratorAttr() const

See GetAcceleratorAttr(), 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 GetBrake0Attr() const

Brake control for braking system “brakes0” (see PhysxVehicleBrakesAPI) that triggers the connected brakes and defines the brake strength. Value has to be in range [0.0, 1.0].

Declaration

float physxVehicleController:brake0 = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateBrake0Attr() const

See GetBrake0Attr(), 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 GetBrake1Attr() const

Brake control for braking system “brakes1” (see PhysxVehicleBrakesAPI) that triggers the connected brakes and defines the brake strength. Value has to be in range [0.0, 1.0].

Declaration

float physxVehicleController:brake1 = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateBrake1Attr() const

See GetBrake1Attr(), 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 GetBrakeAttr() const

Deprecated. Please use brake0/brake1 instead.

Driven vehicle. Brake input, 0.0 to 1.0.

Declaration

float physxVehicleController:brake = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateBrakeAttr() const

See GetBrakeAttr(), 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 GetHandbrakeAttr() const

Deprecated. Please use brake0/brake1 instead.

Driven vehicle. Handbrake input, 0.0 to 1.0.

Declaration

float physxVehicleController:handbrake = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateHandbrakeAttr() const

See GetHandbrakeAttr(), 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 GetSteerAttr() const

Steer control for the steering system (see PhysxVehicleSteeringAPI). Defines the extent of the wheels’ steer angles with respect to the maximum steer angle. Value has to be in range [-1.0, 1.0].

Declaration

float physxVehicleController:steer = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSteerAttr() const

See GetSteerAttr(), 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 GetSteerLeftAttr() const

Deprecated. Please use steer instead.

Driven vehicle. Left steering input. 0.0 to 1.0. Net steering is the aggregate of steerRight and steerLeft.

Declaration

float physxVehicleController:steerLeft = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSteerLeftAttr() const

See GetSteerLeftAttr(), 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 GetSteerRightAttr() const

Deprecated. Please use steer instead.

Driven vehicle. Right steering input, 0.0 to 1.0. Net steering is the aggregate of steerRight and steerLeft.

Declaration

float physxVehicleController:steerRight = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSteerRightAttr() const

See GetSteerRightAttr(), 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 GetTargetGearAttr() const

Driven vehicle. Desired gear to shift into. -1 = Reverse, 0 = Neutral, 1 = First etc. The special value 255 is used to denote automatic forward gear shifting (similar to <D> in automatic transmissions).

Note: if set to automatic gear shifting, the vehicle is expected to have an autobox defined (see PhysxVehicleAutoGearBoxAPI).

Note: please be aware that the target gear definition differs from the PhysX vehicle API.

Declaration

int physxVehicleController:targetGear = 255

C++ Type

int

Usd Type

SdfValueTypeNames->Int

inline UsdAttribute CreateTargetGearAttr() const

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

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