usdrt::PhysxSchemaPhysxVehicleBrakesAPI

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

Functions

Variables

class PhysxSchemaPhysxVehicleBrakesAPI : public usdrt::UsdAPISchemaBase

Describes a braking system for a vehicle by specifying which wheels are connected to the brake control and by defining the brake torque that gets applied to those wheels. Currently, up to two braking systems are supported. Use the instance name TfToken “brakes0” and “brakes1” of this multipleApply schema to distinguish between the two braking systems. Note that system “brakes0” will be coupled to the brake control brake0 while system “brakes1” will be coupled to the brake control brake1 (see PhysxVehicleControllerAPI for the brake controls). An example for using two systems is to provide brake and handbrake control (the former applying brake torque to all wheels and the latter applying brake torque to the rear wheels only). This API schema has to be applied to a prim with PhysxVehicleAPI applied. Can only be used for vehicles that have a drive (see PhysxVehicleDriveBasicAPI or PhysxVehicleDriveStandardAPI).

Public Functions

inline explicit PhysxSchemaPhysxVehicleBrakesAPI(const UsdPrim &prim = UsdPrim(), const TfToken &name = TfToken())

Construct a PhysxSchemaPhysxVehicleBrakesAPI on UsdPrim prim with name name . Equivalent to PhysxSchemaPhysxVehicleBrakesAPI::Get( prim.GetStage(), prim.GetPath().AppendProperty( “physxVehicleBrakes:name”));.

for a valid prim , but will not immediately throw an error for an invalid prim

inline explicit PhysxSchemaPhysxVehicleBrakesAPI(const UsdSchemaBase &schemaObj, const TfToken &name)

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

inline virtual ~PhysxSchemaPhysxVehicleBrakesAPI()

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 TfToken GetName() const

Returns the name of this multiple-apply schema instance.

inline UsdAttribute GetWheelsAttr() const

List of indices, referencing the wheels that receive brake torque. The indices refer to the attribute “index” of PhysxVehicleWheelAttachmentAPI. If not specified, each wheel will receive a brake torque using a torque multiplier of 1 (see attribute torqueMultipliers).

Declaration

int[] wheels

C++ Type

VtArray<int>

Usd Type

SdfValueTypeNames->IntArray

inline UsdAttribute CreateWheelsAttr() const

See GetWheelsAttr(), 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 GetMaxBrakeTorqueAttr() const

The maximum brake torque that can be generated by the braking system (units: mass * distance * distance / seconds / seconds). Has to be greater or equal zero. For braking system “brakes0”, the brake torque applied to wheels[i] will be defined by maxBrakeTorque * torqueMultipliers[i] * physxVehicleController:brake0 (see PhysxVehicleControllerAPI).

Declaration

float maxBrakeTorque = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateMaxBrakeTorqueAttr() const

See GetMaxBrakeTorqueAttr(), 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 GetTorqueMultipliersAttr() const

Defines how much of the max brake torque can be delivered to the wheels that are connected to the braking system. The values are unitless multipliers and have to be greater or equal to zero. See maxBrakeTorque for how these multipliers affect the brake torque applied to a wheel. If the attribute is defined, then the length of the array needs to match the length of the “wheels” array. If the attribute is not defined, a multiplier value of 1 will be used for all connected wheels.

Declaration

float[] torqueMultipliers

C++ Type

VtArray<float>

Usd Type

SdfValueTypeNames->FloatArray

inline UsdAttribute CreateTorqueMultipliersAttr() const

See GetTorqueMultipliersAttr(), 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 PhysxSchemaPhysxVehicleBrakesAPI Apply(const UsdPrim &prim, const TfToken &name)

Applies this multiple-apply API schema to the given prim along with the given instance name, name.

This information is stored by adding “PhysxVehicleBrakesAPI:<i>name</i>” to the token-valued, listOp metadata apiSchemas on the prim. For example, if name is ‘instance1’, the token ‘PhysxVehicleBrakesAPI:instance1’ is added to ‘apiSchemas’.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns

A valid PhysxSchemaPhysxVehicleBrakesAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxVehicleBrakesAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::MultipleApplyAPI

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.