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. More...
Inherits UsdAPISchemaBase.
Public Member Functions | |
PhysxSchemaPhysxVehicleBrakesAPI (const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken()) | |
Construct a PhysxSchemaPhysxVehicleBrakesAPI on UsdPrim prim with name name . More... | |
PhysxSchemaPhysxVehicleBrakesAPI (const UsdSchemaBase &schemaObj, const TfToken &name) | |
Construct a PhysxSchemaPhysxVehicleBrakesAPI on the prim held by schemaObj with name name . More... | |
virtual PHYSXSCHEMA_API | ~PhysxSchemaPhysxVehicleBrakesAPI () |
Destructor. More... | |
TfToken | GetName () const |
Returns the name of this multiple-apply schema instance. More... | |
PHYSXSCHEMA_API UsdAttribute | GetWheelsAttr () const |
List of indices, referencing the wheels that receive brake torque. More... | |
PHYSXSCHEMA_API UsdAttribute | CreateWheelsAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetWheelsAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
PHYSXSCHEMA_API UsdAttribute | GetMaxBrakeTorqueAttr () const |
The maximum brake torque that can be generated by the braking system (units: mass * distance * distance / seconds / seconds). More... | |
PHYSXSCHEMA_API UsdAttribute | CreateMaxBrakeTorqueAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetMaxBrakeTorqueAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. More... | |
PHYSXSCHEMA_API UsdAttribute | GetTorqueMultipliersAttr () const |
Defines how much of the max brake torque can be delivered to the wheels that are connected to the braking system. More... | |
PHYSXSCHEMA_API UsdAttribute | CreateTorqueMultipliersAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const |
See GetTorqueMultipliersAttr(), 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 TfTokenVector | GetSchemaAttributeNames (bool includeInherited, const TfToken &instanceName) |
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name. More... | |
static PHYSXSCHEMA_API PhysxSchemaPhysxVehicleBrakesAPI | Get (const UsdStagePtr &stage, const SdfPath &path) |
Return a PhysxSchemaPhysxVehicleBrakesAPI holding the prim adhering to this schema at path on stage . More... | |
static PHYSXSCHEMA_API PhysxSchemaPhysxVehicleBrakesAPI | Get (const UsdPrim &prim, const TfToken &name) |
Return a PhysxSchemaPhysxVehicleBrakesAPI with name name holding the prim prim . More... | |
static PHYSXSCHEMA_API std::vector < PhysxSchemaPhysxVehicleBrakesAPI > | GetAll (const UsdPrim &prim) |
Return a vector of all named instances of PhysxSchemaPhysxVehicleBrakesAPI on the given prim . More... | |
static PHYSXSCHEMA_API bool | IsSchemaPropertyBaseName (const TfToken &baseName) |
Checks if the given name baseName is the base name of a property of PhysxVehicleBrakesAPI. More... | |
static PHYSXSCHEMA_API bool | IsPhysxVehicleBrakesAPIPath (const SdfPath &path, TfToken *name) |
Checks if the given path path is of an API schema of type PhysxVehicleBrakesAPI. More... | |
static PHYSXSCHEMA_API bool | CanApply (const UsdPrim &prim, const TfToken &name, std::string *whyNot=nullptr) |
Returns true if this multiple-apply API schema can be applied, with the given instance name, name , to the given prim . More... | |
static PHYSXSCHEMA_API 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 . More... | |
Static Public Attributes | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::MultipleApplyAPI |
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 |
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).
Definition at line 66 of file physxVehicleBrakesAPI.h.
|
inlineexplicit |
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
Definition at line 83 of file physxVehicleBrakesAPI.h.
|
inlineexplicit |
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.
Definition at line 92 of file physxVehicleBrakesAPI.h.
|
virtual |
Destructor.
|
overrideprotected |
Returns the kind of schema this class belongs to.
|
static |
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'.
|
static |
Returns true if this multiple-apply API schema can be applied, with the given instance name, name
, to the given prim
.
If this schema can not be a applied 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.
PHYSXSCHEMA_API UsdAttribute CreateMaxBrakeTorqueAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetMaxBrakeTorqueAttr(), 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 CreateTorqueMultipliersAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetTorqueMultipliersAttr(), 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 CreateWheelsAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetWheelsAttr(), 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 |
Return a PhysxSchemaPhysxVehicleBrakesAPI 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. path
must be of the format <path>.physxVehicleBrakes:name .
This is shorthand for the following:
|
static |
Return a PhysxSchemaPhysxVehicleBrakesAPI with name name
holding the prim prim
.
Shorthand for PhysxSchemaPhysxVehicleBrakesAPI(prim, name);
|
static |
Return a vector of all named instances of PhysxSchemaPhysxVehicleBrakesAPI on the given prim
.
PHYSXSCHEMA_API 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 |
Returns the name of this multiple-apply schema instance.
Definition at line 118 of file physxVehicleBrakesAPI.h.
|
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.
|
static |
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name.
Does not include attributes that may be authored by custom/extended methods of the schemas involved. The names returned will have the proper namespace prefix.
PHYSXSCHEMA_API 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 |
PHYSXSCHEMA_API 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 |
|
static |
Checks if the given path path
is of an API schema of type PhysxVehicleBrakesAPI.
If so, it stores the instance name of the schema in name
and returns true. Otherwise, it returns false.
|
static |
Checks if the given name baseName
is the base name of a property of PhysxVehicleBrakesAPI.
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 72 of file physxVehicleBrakesAPI.h.