usdrt::PhysxSchemaPhysxVehicleSuspensionAPI

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

Functions

Variables

class PhysxSchemaPhysxVehicleSuspensionAPI : public usdrt::UsdAPISchemaBase

Properties of a PhysX vehicle wheel suspension. If the suspension setup does not need to be shared among vehicle instances, it can be applied to the prim which has PhysxVehicleWheelAttachmentAPI applied. If the intent is to share the suspension setup, PhysxVehicleSuspensionAPI can be applied to a separate prim which can be linked to (see PhysxVehicleWheelAttachmentAPI).

Public Functions

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

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

inline explicit PhysxSchemaPhysxVehicleSuspensionAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxVehicleSuspensionAPI()

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

Spring strength of suspension unit (units: force / distance = mass / seconds / seconds).

Note: this attribute has to be specified (there is no default).

Declaration

float physxVehicleSuspension:springStrength

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSpringStrengthAttr() const

See GetSpringStrengthAttr(), 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 GetSpringDamperRateAttr() const

Spring damper rate of suspension unit (units: force * seconds / distance = mass / seconds).

Note: this attribute has to be specified (there is no default).

Declaration

float physxVehicleSuspension:springDamperRate

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSpringDamperRateAttr() const

See GetSpringDamperRateAttr(), 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 GetTravelDistanceAttr() const

Distance the wheel can travel along the suspension when going from max compression to max droop (units: distance). The value has to be positive.

Note: either this attribute or the deprecated maxCompression/maxDroop have to to be specified (with the former taking precedence). When migrating from the deprecated attributes, travelDistance can be set to the sum of maxCompression and maxDroop.

Declaration

float physxVehicleSuspension:travelDistance

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateTravelDistanceAttr() const

See GetTravelDistanceAttr(), 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 GetMaxCompressionAttr() const

Deprecated. Please use travelDistance instead.

Maximum compression from rest state allowed by suspension spring (units: distance). The value has to be positive.

Note: will be ignored if travelDistance is authored.

Declaration

float physxVehicleSuspension:maxCompression

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateMaxCompressionAttr() const

See GetMaxCompressionAttr(), 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 GetMaxDroopAttr() const

Deprecated. Please use travelDistance instead.

Maximum elongation from rest state allowed by suspension spring (units: distance). The value has to be positive unless it should get computed automatically in which case any negative number can be used to indicate as much. It is highly recommended to chose a value close to: sprungMass * gravity / springStrength.

Note: will be ignored if travelDistance is authored.

Declaration

float physxVehicleSuspension:maxDroop

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateMaxDroopAttr() const

See GetMaxDroopAttr(), 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 GetSprungMassAttr() const

Mass of vehicle that is supported by suspension spring (units: mass). If set to 0, the sprung mass will get computed automatically.

Note: it is not possible for a vehicle to have some sprung mass values being user-defined and some being computed automatically. Either all values have to be user-defined or all have to be set to 0 for auto-computation.

Declaration

float physxVehicleSuspension:sprungMass = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSprungMassAttr() const

See GetSprungMassAttr(), 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 GetCamberAtRestAttr() const

Deprecated. Please use PhysxVehicleSuspensionComplianceAPI instead.

Camber angle (in radians) of wheel when the suspension is at its rest position.

Note: will be ignored if PhysxVehicleSuspensionComplianceAPI is used.

Declaration

float physxVehicleSuspension:camberAtRest

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCamberAtRestAttr() const

See GetCamberAtRestAttr(), 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 GetCamberAtMaxCompressionAttr() const

Deprecated. Please use PhysxVehicleSuspensionComplianceAPI instead.

Camber angle (in radians) of wheel when the suspension is at maximum compression.

Note: will be ignored if PhysxVehicleSuspensionComplianceAPI is used.

Declaration

float physxVehicleSuspension:camberAtMaxCompression

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCamberAtMaxCompressionAttr() const

See GetCamberAtMaxCompressionAttr(), 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 GetCamberAtMaxDroopAttr() const

Deprecated. Please use PhysxVehicleSuspensionComplianceAPI instead.

Camber angle (in radians) of wheel when the suspension is at maximum droop.

Note: will be ignored if PhysxVehicleSuspensionComplianceAPI is used.

Declaration

float physxVehicleSuspension:camberAtMaxDroop

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateCamberAtMaxDroopAttr() const

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

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