All Classes Files Functions Variables Pages
PhysxSchemaPhysxVehicleGearsAPI Class Reference

Properties of PhysX vehicle gears. More...

Inherits UsdAPISchemaBase.

Public Member Functions

 PhysxSchemaPhysxVehicleGearsAPI (const UsdPrim &prim=UsdPrim())
 Construct a PhysxSchemaPhysxVehicleGearsAPI on UsdPrim prim . More...
 
 PhysxSchemaPhysxVehicleGearsAPI (const UsdSchemaBase &schemaObj)
 Construct a PhysxSchemaPhysxVehicleGearsAPI on the prim held by schemaObj . More...
 
virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxVehicleGearsAPI ()
 Destructor. More...
 
PHYSXSCHEMA_API UsdAttribute GetRatiosAttr () const
 The gear ratios. More...
 
PHYSXSCHEMA_API UsdAttribute CreateRatiosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetRatiosAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetRatioScaleAttr () const
 Multiplier for gear ratio values. More...
 
PHYSXSCHEMA_API UsdAttribute CreateRatioScaleAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetRatioScaleAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More...
 
PHYSXSCHEMA_API UsdAttribute GetSwitchTimeAttr () const
 Time it takes to switch gear (units: seconds). More...
 
PHYSXSCHEMA_API UsdAttribute CreateSwitchTimeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetSwitchTimeAttr(), 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
PhysxSchemaPhysxVehicleGearsAPI 
Get (const UsdStagePtr &stage, const SdfPath &path)
 Return a PhysxSchemaPhysxVehicleGearsAPI holding the prim adhering to this schema at path on stage. More...
 
static PHYSXSCHEMA_API
PhysxSchemaPhysxVehicleGearsAPI 
Apply (const UsdPrim &prim)
 Applies this single-apply API schema to the given prim. More...
 

Static Public Attributes

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

Protected Member Functions

PHYSXSCHEMA_API UsdSchemaType _GetSchemaType () const override
 Returns the type of schema this class belongs to. More...
 

Friends

class UsdSchemaRegistry
 

Detailed Description

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

Definition at line 60 of file physxVehicleGearsAPI.h.

Constructor & Destructor Documentation

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

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

Definition at line 72 of file physxVehicleGearsAPI.h.

PhysxSchemaPhysxVehicleGearsAPI ( const UsdSchemaBase &  schemaObj)
inlineexplicit

Construct a PhysxSchemaPhysxVehicleGearsAPI on the prim held by schemaObj .

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

Definition at line 80 of file physxVehicleGearsAPI.h.

virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxVehicleGearsAPI ( )
virtual

Destructor.

Member Function Documentation

PHYSXSCHEMA_API UsdSchemaType _GetSchemaType ( ) const
overrideprotected

Returns the type of schema this class belongs to.

See Also
UsdSchemaType
static PHYSXSCHEMA_API PhysxSchemaPhysxVehicleGearsAPI Apply ( const UsdPrim &  prim)
static

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.

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.
See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
PHYSXSCHEMA_API UsdAttribute CreateRatiosAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetRatiosAttr(), 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 CreateRatioScaleAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetRatioScaleAttr(), 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 CreateSwitchTimeAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetSwitchTimeAttr(), 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 PhysxSchemaPhysxVehicleGearsAPI Get ( const UsdStagePtr &  stage,
const SdfPath &  path 
)
static

Return a PhysxSchemaPhysxVehicleGearsAPI 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:

* PhysxSchemaPhysxVehicleGearsAPI(stage->GetPrimAtPath(path));
*
PHYSXSCHEMA_API 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
PHYSXSCHEMA_API 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
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 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

Member Data Documentation

const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI
static

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

See Also
UsdSchemaType

Definition at line 66 of file physxVehicleGearsAPI.h.


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