|
RavEngine
|
Data structure with instanced dynamics data for wheels. More...
#include <PxVehicleWheels.h>
Public Member Functions | |
| void | setToRestState () |
| Set all wheels to their rest state. | |
| void | setTireForceShaderFunction (PxVehicleComputeTireForce tireForceShaderFn) |
| Set the tire force shader function. | |
| void | setTireForceShaderData (const PxU32 tireId, const void *tireForceShaderData) |
| Set the tire force shader data for a specific tire. | |
| const void * | getTireForceShaderData (const PxU32 tireId) const |
| Get the tire force shader data for a specific tire. | |
| void | setWheelRotationSpeed (const PxU32 wheelIdx, const PxReal speed) |
| Set the wheel rotation speed (radians per second) about the rolling axis for the specified wheel. | |
| PxReal | getWheelRotationSpeed (const PxU32 wheelIdx) const |
| Return the rotation speed about the rolling axis of a specified wheel . | |
| void | setWheelRotationAngle (const PxU32 wheelIdx, const PxReal angle) |
| Set the wheel rotation angle (radians) about the rolling axis of the specified wheel. | |
| PxReal | getWheelRotationAngle (const PxU32 wheelIdx) const |
| Return the rotation angle about the rolling axis for the specified wheel. | |
| void | setUserData (const PxU32 tireIdx, void *userData) |
| Set the user data pointer for the specified wheel It has a default value of NULL. | |
| void * | getUserData (const PxU32 tireIdx) const |
| Get the user data pointer that was set for the specified wheel. | |
| void | copy (const PxVehicleWheelsDynData &src, const PxU32 srcWheel, const PxU32 trgWheel) |
| Copy the dynamics data of a single wheel unit (wheel, suspension, tire) from srcWheel of src to trgWheel. | |
| void | setTireContacts (const PxU32 *nbHits, const PxPlane *contactPlanes, const PxReal *contactFrictions, const PxTireContactIntersectionMethod::Enum *intersectionMethods, const PxU32 nbWheels) |
| Directly set tire contact plane and friction for all tires on the vehicle as an alternative to using PxVehicleSuspensionSweeps() or PxVehicleSuspensionRaycasts(). | |
| PxU32 | getNbWheelRotationSpeed () const |
| PxU32 | getNbWheelRotationAngle () const |
| PxVehicleWheels4DynData * | getWheel4DynData () const |
| PxU32 | getNbConstraints () const |
| Retrieve the number of PxConstraint objects associated with the vehicle. | |
| PxU32 | getConstraints (PxConstraint **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const |
| Retrieve all the PxConstraint objects associated with the vehicle. | |
Static Public Member Functions | |
| static void | getBinaryMetaData (PxOutputStream &stream) |
Friends | |
| class | PxVehicleWheels |
| class | PxVehicleDrive4W |
| class | PxVehicleDriveTank |
| class | PxVehicleUpdate |
Data structure with instanced dynamics data for wheels.
| void physx::PxVehicleWheelsDynData::copy | ( | const PxVehicleWheelsDynData & | src, |
| const PxU32 | srcWheel, | ||
| const PxU32 | trgWheel | ||
| ) |
Copy the dynamics data of a single wheel unit (wheel, suspension, tire) from srcWheel of src to trgWheel.
| [in] | src | is the data to be copied. |
| [in] | srcWheel | is the wheel whose data will be copied from src. |
| [in] | trgWheel | is the wheel that will be assigned the copied data. |
| PxU32 physx::PxVehicleWheelsDynData::getConstraints | ( | PxConstraint ** | userBuffer, |
| PxU32 | bufferSize, | ||
| PxU32 | startIndex = 0 |
||
| ) | const |
Retrieve all the PxConstraint objects associated with the vehicle.
There is one PxConstraint per block of 4 wheels. The count can be extracted through getNbConstraints()
| [out] | userBuffer | The buffer to store the constraint pointers. |
| [in] | bufferSize | Size of provided user buffer. |
| [in] | startIndex | Index of first constraint pointer to be retrieved |
|
inline |
Retrieve the number of PxConstraint objects associated with the vehicle.
You can use getConstraints() to retrieve the constraint pointers.
| void physx::PxVehicleWheelsDynData::setTireContacts | ( | const PxU32 * | nbHits, |
| const PxPlane * | contactPlanes, | ||
| const PxReal * | contactFrictions, | ||
| const PxTireContactIntersectionMethod::Enum * | intersectionMethods, | ||
| const PxU32 | nbWheels | ||
| ) |
Directly set tire contact plane and friction for all tires on the vehicle as an alternative to using PxVehicleSuspensionSweeps() or PxVehicleSuspensionRaycasts().
| [in] | nbHits | is an array describing whether each tire has a contact plane or not. Each element of the array is either 0 (no contact) or 1 (contact). |
| [in] | contactPlanes | is an array of contact planes describing the contact plane per tire. |
| [in] | contactFrictions | is the friction value of each tire contact with the drivable surface. |
| [in] | intersectionMethods | describes how each tire will individually interact with its contact plane in order to compute the spring compression that places the tire on the contact plane. A value of eCYLINDER will compute the spring compression by intersecting the wheel's cylindrical shape with the contact plane. A value of eRAY will compute the spring compression by casting a ray through the wheel center and along the suspension direction until it hits the contact plane. |
| [in] | nbWheels | is the length of the arrays nbContacts, contactPlanes, contactFrictions and intersectionMethods. |
| void physx::PxVehicleWheelsDynData::setTireForceShaderData | ( | const PxU32 | tireId, |
| const void * | tireForceShaderData | ||
| ) |
Set the tire force shader data for a specific tire.
| [in] | tireId | is the wheel index |
| [in] | tireForceShaderData | is the data describing the tire. |
| void physx::PxVehicleWheelsDynData::setTireForceShaderFunction | ( | PxVehicleComputeTireForce | tireForceShaderFn | ) |
Set the tire force shader function.
| [in] | tireForceShaderFn | is the shader function that will be used to compute tire forces. |
| void physx::PxVehicleWheelsDynData::setToRestState | ( | ) |
Set all wheels to their rest state.
| void physx::PxVehicleWheelsDynData::setUserData | ( | const PxU32 | tireIdx, |
| void * | userData | ||
| ) |
Set the user data pointer for the specified wheel It has a default value of NULL.
| [in] | tireIdx | is the wheel index |
| [in] | userData | is the data to be associated with the wheel. |
| void physx::PxVehicleWheelsDynData::setWheelRotationAngle | ( | const PxU32 | wheelIdx, |
| const PxReal | angle | ||
| ) |
Set the wheel rotation angle (radians) about the rolling axis of the specified wheel.
| [in] | wheelIdx | is the wheel index |
| [in] | angle | is the rotation angle to be applied to the wheel. |
| void physx::PxVehicleWheelsDynData::setWheelRotationSpeed | ( | const PxU32 | wheelIdx, |
| const PxReal | speed | ||
| ) |
Set the wheel rotation speed (radians per second) about the rolling axis for the specified wheel.
| [in] | wheelIdx | is the wheel index |
| [in] | speed | is the rotation speed to be applied to the wheel. |