#include <CPhysicsCar.h>
Inherits IPhysicsCar.
Public Member Functions | |
| CPhysicsCar () | |
| ~CPhysicsCar () | |
| void | assembleCarPhysics (SPhysicsCar *car, NewtonWorld *world) |
| void | setSteeringPercent (f32 steeringPercent) |
| Set the steering as a percentage of the maximum steering value that was specified when the car was created. Use a negative value for turning left, positive for turning right. If you set this to 0, the wheels will be straight. This will be clamped at -100 and 100. | |
| void | setThrottlePercent (f32 throttlePercent) |
| Set the throttle as a percentage of the maximum throttle value that was specified when the car was created. Use a positive value for going forwards, negative for reversing. If you set this to 0, the car will come to a halt. This will be clamped at -100 and 100. | |
| void | setBrakesPercent (f32 brakesPercent) |
| Set the brakes as a percentage of the maximum brakes value that was specified when the car was created. This will be clamped at 0 and 100. | |
| void | setSteering (f32 steerangle) |
| void | setTorque (f32 torque) |
| void | setBrakes (f32 brakes) |
| void | setVehicleSpeed (f32 speed) |
| ISceneNode * | getNode () |
| Get a pointer to the Irrlicht SceneNode. | |
| NewtonJoint * | getVehicleJoint () |
| void | setPosition (vector3df position) |
| Set position. | |
| void | setRotation (vector3df rotation) |
| Set rotation. | |
| void | setScale (vector3df scale) |
| Set the scale. | |
| vector3df | getPosition () |
| Get position. | |
| vector3df | getRotation () |
| Get rotation. | |
| vector3df | getScale () |
| Get scale. | |
| NewtonBody * | getBody () |
| Get a pointer to the Newton body. This will be the body of the vehicle hull, not of the wheels. You should only need this if you want to make direct calls to Newton. | |
Public Attributes | |
| CPhysicsCarWheel | wheel_FL |
| CPhysicsCarWheel | wheel_FR |
| CPhysicsCarWheel | wheel_RR |
| CPhysicsCarWheel | wheel_RL |
Protected Member Functions | |
| void | cap (f32 limit, f32 *target, bool positiveAndNegative) |
Protected Attributes | |
| ISceneNode * | m_carNode |
| f32 | m_vehicleSpeed |
| NewtonWorld * | m_world |
| NewtonBody * | m_carBody |
| NewtonJoint * | m_vehicleJoint |
| f32 | m_maxTorque |
| f32 | m_maxSteerAngle |
| f32 | m_maxBrakes |
| CPhysicsCar::CPhysicsCar | ( | ) |
| CPhysicsCar::~CPhysicsCar | ( | ) |
| void CPhysicsCar::assembleCarPhysics | ( | SPhysicsCar * | car, | |
| NewtonWorld * | world | |||
| ) |
| void CPhysicsCar::setSteeringPercent | ( | f32 | steeringPercent | ) | [virtual] |
Set the steering as a percentage of the maximum steering value that was specified when the car was created. Use a negative value for turning left, positive for turning right. If you set this to 0, the wheels will be straight. This will be clamped at -100 and 100.
Implements IPhysicsCar.
| void CPhysicsCar::setThrottlePercent | ( | f32 | throttlePercent | ) | [virtual] |
Set the throttle as a percentage of the maximum throttle value that was specified when the car was created. Use a positive value for going forwards, negative for reversing. If you set this to 0, the car will come to a halt. This will be clamped at -100 and 100.
Implements IPhysicsCar.
| void CPhysicsCar::setBrakesPercent | ( | f32 | brakesPercent | ) | [virtual] |
Set the brakes as a percentage of the maximum brakes value that was specified when the car was created. This will be clamped at 0 and 100.
Implements IPhysicsCar.
| void CPhysicsCar::setSteering | ( | f32 | steerangle | ) |
| void CPhysicsCar::setTorque | ( | f32 | torque | ) |
| void CPhysicsCar::setBrakes | ( | f32 | brakes | ) |
| void CPhysicsCar::setVehicleSpeed | ( | f32 | speed | ) |
| ISceneNode * CPhysicsCar::getNode | ( | ) | [virtual] |
| NewtonJoint * CPhysicsCar::getVehicleJoint | ( | ) |
| void CPhysicsCar::setPosition | ( | vector3df | position | ) | [virtual] |
| void CPhysicsCar::setRotation | ( | vector3df | rotation | ) | [virtual] |
| void CPhysicsCar::setScale | ( | vector3df | scale | ) | [virtual] |
| vector3df CPhysicsCar::getPosition | ( | ) | [virtual] |
| vector3df CPhysicsCar::getRotation | ( | ) | [virtual] |
| vector3df CPhysicsCar::getScale | ( | ) | [virtual] |
| NewtonBody * CPhysicsCar::getBody | ( | ) | [virtual] |
Get a pointer to the Newton body. This will be the body of the vehicle hull, not of the wheels. You should only need this if you want to make direct calls to Newton.
Implements IPhysicsCar.
| void CPhysicsCar::cap | ( | f32 | limit, | |
| f32 * | target, | |||
| bool | positiveAndNegative | |||
| ) | [protected] |
ISceneNode* CPhysicsCar::m_carNode [protected] |
f32 CPhysicsCar::m_vehicleSpeed [protected] |
NewtonWorld* CPhysicsCar::m_world [protected] |
NewtonBody* CPhysicsCar::m_carBody [protected] |
NewtonJoint* CPhysicsCar::m_vehicleJoint [protected] |
f32 CPhysicsCar::m_maxTorque [protected] |
f32 CPhysicsCar::m_maxSteerAngle [protected] |
f32 CPhysicsCar::m_maxBrakes [protected] |
1.5.1-p1