All Classes Files Functions Variables Pages
PhysxSchemaPhysxVehicleSuspensionAPI Class Reference

Properties of a PhysX vehicle wheel suspension. More...

Inherits UsdAPISchemaBase.

Public Member Functions

 PhysxSchemaPhysxVehicleSuspensionAPI (const UsdPrim &prim=UsdPrim())
 Construct a PhysxSchemaPhysxVehicleSuspensionAPI on UsdPrim prim . More...
 
 PhysxSchemaPhysxVehicleSuspensionAPI (const UsdSchemaBase &schemaObj)
 Construct a PhysxSchemaPhysxVehicleSuspensionAPI on the prim held by schemaObj . More...
 
virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxVehicleSuspensionAPI ()
 Destructor. More...
 
PHYSXSCHEMA_API UsdAttribute GetSpringStrengthAttr () const
 Spring strength of suspension unit (units: force / distance = mass / seconds / seconds). More...
 
PHYSXSCHEMA_API UsdAttribute CreateSpringStrengthAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetSpringStrengthAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetSpringDamperRateAttr () const
 Spring damper rate of suspension unit (units: force * seconds / distance = mass / seconds). More...
 
PHYSXSCHEMA_API UsdAttribute CreateSpringDamperRateAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetSpringDamperRateAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetTravelDistanceAttr () const
 Distance the wheel can travel along the suspension when going from max compression to max droop (units: distance). More...
 
PHYSXSCHEMA_API UsdAttribute CreateTravelDistanceAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetTravelDistanceAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetMaxCompressionAttr () const
 Deprecated. More...
 
PHYSXSCHEMA_API UsdAttribute CreateMaxCompressionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetMaxCompressionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetMaxDroopAttr () const
 Deprecated. More...
 
PHYSXSCHEMA_API UsdAttribute CreateMaxDroopAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetMaxDroopAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetSprungMassAttr () const
 Mass of vehicle that is supported by suspension spring (units: mass). More...
 
PHYSXSCHEMA_API UsdAttribute CreateSprungMassAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetSprungMassAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetCamberAtRestAttr () const
 Deprecated. More...
 
PHYSXSCHEMA_API UsdAttribute CreateCamberAtRestAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetCamberAtRestAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetCamberAtMaxCompressionAttr () const
 Deprecated. More...
 
PHYSXSCHEMA_API UsdAttribute CreateCamberAtMaxCompressionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetCamberAtMaxCompressionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetCamberAtMaxDroopAttr () const
 Deprecated. More...
 
PHYSXSCHEMA_API UsdAttribute CreateCamberAtMaxDroopAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetCamberAtMaxDroopAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 

Static Public Member Functions

static PHYSXSCHEMA_API const
TfTokenVector & 
GetSchemaAttributeNames (bool includeInherited=true)
 Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxVehicleSuspensionAPI 
Get (const UsdStagePtr &stage, const SdfPath &path)
 Return a PhysxSchemaPhysxVehicleSuspensionAPI holding the prim adhering to this schema at path on stage. More...
 
static PHYSXSCHEMA_API bool CanApply (const UsdPrim &prim, std::string *whyNot=nullptr)
 Returns true if this single-apply API schema can be applied to the given prim. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxVehicleSuspensionAPI 
Apply (const UsdPrim &prim)
 Applies this single-apply API schema to the given prim. More...
 

Static Public Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI
 Compile time constant representing what kind of schema this class is. More...
 

Protected Member Functions

PHYSXSCHEMA_API UsdSchemaKind _GetSchemaKind () const override
 Returns the kind of schema this class belongs to. More...
 

Friends

class UsdSchemaRegistry
 

Detailed Description

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

Definition at line 60 of file physxVehicleSuspensionAPI.h.

Constructor & Destructor Documentation

PhysxSchemaPhysxVehicleSuspensionAPI ( const UsdPrim &  prim = UsdPrim())
inlineexplicit

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

Definition at line 72 of file physxVehicleSuspensionAPI.h.

PhysxSchemaPhysxVehicleSuspensionAPI ( const UsdSchemaBase &  schemaObj)
inlineexplicit

Construct a PhysxSchemaPhysxVehicleSuspensionAPI on the prim held by schemaObj .

Should be preferred over PhysxSchemaPhysxVehicleSuspensionAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.

Definition at line 80 of file physxVehicleSuspensionAPI.h.

virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxVehicleSuspensionAPI ( )
virtual

Destructor.

Member Function Documentation

PHYSXSCHEMA_API UsdSchemaKind _GetSchemaKind ( ) const
overrideprotected

Returns the kind of schema this class belongs to.

See Also
UsdSchemaKind
static PHYSXSCHEMA_API PhysxSchemaPhysxVehicleSuspensionAPI Apply ( const UsdPrim &  prim)
static

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.

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.
See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
static PHYSXSCHEMA_API bool CanApply ( const UsdPrim &  prim,
std::string *  whyNot = nullptr 
)
static

Returns true if this single-apply API schema can be applied to the given prim.

If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied.

Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema.

See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
PHYSXSCHEMA_API UsdAttribute CreateCamberAtMaxCompressionAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetCamberAtMaxCompressionAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateCamberAtMaxDroopAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetCamberAtMaxDroopAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateCamberAtRestAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetCamberAtRestAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateMaxCompressionAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetMaxCompressionAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateMaxDroopAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetMaxDroopAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateSpringDamperRateAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetSpringDamperRateAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateSpringStrengthAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetSpringStrengthAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateSprungMassAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetSprungMassAttr(), and also Usd_Create_Or_Get_Property 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.

PHYSXSCHEMA_API UsdAttribute CreateTravelDistanceAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetTravelDistanceAttr(), and also Usd_Create_Or_Get_Property 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.

static PHYSXSCHEMA_API PhysxSchemaPhysxVehicleSuspensionAPI Get ( const UsdStagePtr &  stage,
const SdfPath &  path 
)
static

Return a PhysxSchemaPhysxVehicleSuspensionAPI holding the prim adhering to this schema at path on stage.

If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

* PhysxSchemaPhysxVehicleSuspensionAPI(stage->GetPrimAtPath(path));
*
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
static PHYSXSCHEMA_API const TfTokenVector& GetSchemaAttributeNames ( bool  includeInherited = true)
static

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

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

Member Data Documentation

const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI
static

Compile time constant representing what kind of schema this class is.

See Also
UsdSchemaKind

Definition at line 66 of file physxVehicleSuspensionAPI.h.


The documentation for this class was generated from the following file: