usdrt::PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI
Defined in usdrt/scenegraph/usd/physxSchema/physxVehicleMultiWheelDifferentialAPI.h
-
class PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI : public usdrt::UsdAPISchemaBase
Describes which wheels of a vehicle are driven as well as the distribution of the drive torque among those wheels. 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 PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI(const UsdPrim &prim = UsdPrim())
Construct a PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI on UsdPrim
prim. Equivalent to PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI::Get(prim.GetStage(), prim.GetPath()) for a validprim, but will not immediately throw an error for an invalidprim.
-
inline explicit PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI(const UsdSchemaBase &schemaObj)
Construct a PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI on the prim held by
schemaObj. Should be preferred over PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
-
inline virtual ~PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI()
Destructor.
-
inline UsdAttribute GetWheelsAttr() const
List of indices, referencing the wheels that are driven (receiving torque from the engine). The indices refer to the attribute “index” of PhysxVehicleWheelAttachmentAPI.
Declaration
int[] physxVehicleMultiWheelDifferential:wheelsC++ 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
defaultValueas the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparselyistrue- the default forwriteSparselyisfalse.
-
inline UsdAttribute GetTorqueRatiosAttr() const
Defines how the drive torque should get distributed among the wheels specified in the “wheels” attribute. The provided ratios must be in range [-1, 1] and under normal circumstances the absolute values should sum up to 1. 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, the torque will get split equally among all driven wheels.
Declaration
float[] physxVehicleMultiWheelDifferential:torqueRatiosC++ Type
VtArray<float>
Usd Type
SdfValueTypeNames->FloatArray
-
inline UsdAttribute CreateTorqueRatiosAttr() const
See GetTorqueRatiosAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValueas the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparselyistrue- the default forwriteSparselyisfalse.
-
inline UsdAttribute GetAverageWheelSpeedRatiosAttr() const
Defines how the speeds of the driven wheels get weighted when computing the average wheel speed at the clutch (for computing clutch slip). The provided ratios must be in range [0, 1] and under normal circumstances sum up to 1. 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, the wheel speeds of all driven wheels will get weighted equally.
Note: if a vehicle is using a PhysxVehicleDriveBasicAPI drive, then this attribute should not be used.
Declaration
float[] physxVehicleMultiWheelDifferential:averageWheelSpeedRatiosC++ Type
VtArray<float>
Usd Type
SdfValueTypeNames->FloatArray
-
inline UsdAttribute CreateAverageWheelSpeedRatiosAttr() const
See GetAverageWheelSpeedRatiosAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValueas the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparselyistrue- the default forwriteSparselyisfalse.
-
inline explicit operator bool() const
Check if this schema object is compatible with it’s held prim and that the prim is valid.
A typed schema object is compatible if the held prim’s type is or is a subtype of the schema’s type. Based on
prim.IsA().An API schema object is compatible if the API is of type SingleApplyAPI or UsdSchemaType::MultipleApplyAPI, and the schema has been applied to the prim. Based on
prim.HasAPI.This method invokes polymorphic behaviour.
See also
- Returns
True if the help prim is valid, and the schema object is compatible with its held prim.
Public Static Functions
-
static inline PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given
prim. This information is stored by adding “PhysxVehicleMultiWheelDifferentialAPI” to the token-valued, listOp metadata apiSchemas on the prim.See also
See also
See also
See also
- Returns
A valid PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI 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
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.
-
inline virtual bool _IsCompatible() const
Check whether this APISchema object is valid for the currently held prim.
If this is an applied API schema, this returns true if the held prim is valid and already has the API schema applied to it, along with the instanceName (in the case of multiple-apply). The instanceName should not be empty in the case of a multiple-apply API schema.
This check is performed when clients invoke the explicit bool conversion operator, implemented in UsdSchemaBase.
See also
-
inline explicit PhysxSchemaPhysxVehicleMultiWheelDifferentialAPI(const UsdPrim &prim = UsdPrim())