iPcWheeled Struct Reference
Inheritance diagram for iPcWheeled:
Public Member Functions | |
| virtual void | Accelerate (float amount=1.0f)=0 |
| Set the vehicle's accelerator. | |
| virtual size_t | AddWheel (csVector3 position, float turnspeed, float returnspeed, float suspensionsoftness, float suspensiondamping, float brakepower, float enginepower, float leftsteersensitivity, float friction, float mass, float rightsteersensitivity, bool handbrakeaffect, bool steerinvert, const char *wheelfact=0, const char *wheelfile=0, csMatrix3 rotation=csMatrix3(0.0f, 0.0f, 0.0f, 0.0f))=0 |
| Add a wheel to the vehicle's wheel layout. | |
| virtual size_t | AddWheel (csVector3 position, float turnspeed, float returnspeed, float suspensionsoftness, float suspensiondamping, float brakepower, float enginepower, float leftsteersensitivity, float rightsteersensitivity, bool handbrakeaffect, bool steerinvert, const char *wheelfact=0, const char *wheelfile=0, csMatrix3 rotation=csMatrix3(0.0f, 0.0f, 0.0f, 0.0f))=0 |
| Old version of AddWheel, missing parameters for friction and mass. | |
| virtual size_t | AddWheelAuto (csVector3 position, const char *wheelfact=0, const char *wheelfile=0, csMatrix3 rotation=csMatrix3(0.0f, 0.0f, 0.0f, 0.0f))=0 |
| Add a wheel to the vehicle's wheel layout. | |
| virtual void | Brake (float amount=1.0f)=0 |
| Set the vehicle's brakes. | |
| virtual void | DeleteAllWheels ()=0 |
| Destroy and delete all wheels from memory. | |
| virtual void | DeleteWheel (size_t wheelnum)=0 |
| Destroy a wheel on the car, and delete it from the memory. | |
| virtual void | DestroyAllWheels ()=0 |
| Destroy all wheels on the car. | |
| virtual void | DestroyWheel (size_t wheelnum)=0 |
| Physically remove a wheel on the car. | |
| virtual bool | GetABS ()=0 |
| Get if the vehicle uses anti-lock braking. | |
| virtual bool | GetABSEnabled ()=0 |
| Get if the vehicle uses anti-lock braking. | |
| virtual float | GetAcceleratorAmount ()=0 |
| Get the Amount that the vehicle accelerator has been applied. | |
| virtual float | GetAverageWheelSpin ()=0 |
| Get the average spin of all wheels. | |
| virtual iBodyGroup * | GetBodyGroup ()=0 |
| Get the BodyGroup that the car belongs too. | |
| virtual float | GetBrakeAmount ()=0 |
| Get the amount that the vehicle brakes have been applied. | |
| virtual iODEAMotorJoint * | GetBrakeMotor (size_t wheelnum)=0 |
| Get the motor which brakes this wheel. | |
| virtual bool | GetDifferential ()=0 |
| Get if the vehicle uses a differential between left and right wheels. | |
| virtual int | GetGear ()=0 |
| Get the vehicle's gear. | |
| virtual float | GetGearForce (int gear)=0 |
| Get the target force of a given velocity. | |
| virtual float | GetGearVelocity (int gear)=0 |
| Get the target velocity of a given velocity. | |
| virtual float | GetSpeed ()=0 |
| Get the forward velocity of the vehicle. | |
| virtual float | GetSteerAmount ()=0 |
| Get the tightness of the vehicle's turning. | |
| virtual bool | GetTankMode ()=0 |
| Get if tank mode is enabled. | |
| virtual int | GetTopGear ()=0 |
| Get the highest gear the vehicle has. | |
| virtual iRigidBody * | GetWheelBody (size_t wheelnum)=0 |
| Get the rigid body of this wheel. | |
| virtual float | GetWheelBrakePower (size_t wheelnum)=0 |
| Get the amount of power from the brakes which goes to a wheel. | |
| virtual size_t | GetWheelCount ()=0 |
| Get the number of wheels on this vehicle. | |
| virtual float | GetWheelEnginePower (size_t wheelnum)=0 |
| Get the amount of power from the engine which goes to a wheel when accelerating. | |
| virtual float | GetWheelFriction (size_t wheelnum)=0 |
| Get the friction of the wheel. | |
| virtual bool | GetWheelHandbrakeAffected (size_t wheelnum)=0 |
| Get whether the handbrake applies to a wheel. | |
| virtual iODEHinge2Joint * | GetWheelJoint (size_t wheelnum)=0 |
| Get the joint connecting this wheel to the body. | |
| virtual float | GetWheelLeftSteerSensitivity (size_t wheelnum)=0 |
| Get the sensitivity of a wheel when steering left. | |
| virtual float | GetWheelMass (size_t wheelnum)=0 |
| Get the mass of the wheel. | |
| virtual csVector3 | GetWheelPosition (size_t wheelnum)=0 |
| Get the position of a wheel. | |
| virtual float | GetWheelReturnSpeed (size_t wheelnum)=0 |
| Get the speed at which a wheel returns to the middle. | |
| virtual float | GetWheelRightSteerSensitivity (size_t wheelnum)=0 |
| Get the sensitivity of a wheel when steering right. | |
| virtual csMatrix3 | GetWheelRotation (size_t wheelnum)=0 |
| Get the rotation of a wheel. | |
| virtual float | GetWheelSpin (size_t wheelnum)=0 |
| Get the spin of a given wheel. | |
| virtual bool | GetWheelSteerInverted (size_t wheelnum)=0 |
| Get whether a wheel steers in the opposite direction. | |
| virtual float | GetWheelSuspensionDamping (size_t wheelnum)=0 |
| Get the damping of a wheel's suspension. | |
| virtual float | GetWheelSuspensionSoftness (size_t wheelnum)=0 |
| Get the softness of a wheel's suspension. | |
| virtual float | GetWheelTurnSpeed (size_t wheelnum)=0 |
| Get the speed at which a wheel turns away from the middle. | |
| virtual void | Handbrake (bool applied)=0 |
| Set wether the vehicle will handbrake. | |
| virtual bool | IsCollisionCallbackEnabled () const =0 |
| Get whether to send messages back to the entity when wheels collide with other bodies. | |
| virtual bool | IsHandbraking ()=0 |
| Get whether the vehicle is handbrakeing. | |
| virtual void | Neutral ()=0 |
| Call this to put the car in neutral gear. | |
| virtual void | RestoreAllWheels ()=0 |
| Restore all of the vehicle's wheels from the layout. | |
| virtual void | RestoreWheel (size_t wheelnum)=0 |
| Restore a wheel, along with its settings, from the layout. | |
| virtual void | Reverse ()=0 |
| Reverse the vehicle. | |
| virtual void | SetABS (bool enabled)=0 |
| Set if the vehicle uses anti-lock braking. | |
| virtual void | SetABSEnabled (bool enabled)=0 |
| Set if the vehicle uses anti-lock braking. | |
| virtual void | SetAutoReverse (bool autoreverse)=0 |
| Set wether the vehicle will automatically begin reversing after braking to a stop. | |
| virtual void | SetAutoTransmission (bool auto)=0 |
| Set whether the vehicle has an automatic transmission, or gears will be manually controlled. | |
| virtual void | SetBrakeForce (float force)=0 |
| Set the force at which the vehicle brakes. | |
| virtual void | SetCollisionCallbackEnabled (bool en)=0 |
| Set whether to send messages back to the entity when wheels collide with other bodies. | |
| virtual void | SetDifferential (bool enabled)=0 |
| Set if the vehicle uses a differential between left and right wheels. | |
| virtual void | SetFrontWheelPreset (float sensitivity, float power, float suspensionsoftness, float suspensiondamping, float friction, float mass)=0 |
| A wheel grouping preset which sets steering amount and drive power to front wheels. | |
| virtual void | SetFrontWheelPreset (float sensitivity, float power, float suspensionsoftness, float suspensiondamping)=0 |
| Old deprectated version, missing parameters for friciton and mass. | |
| virtual void | SetGear (int gear)=0 |
| Change the vehicle's gear. | |
| virtual void | SetGearSettings (int gear, float velocity, float force)=0 |
| Set up a gear with a given velocity and force. | |
| virtual void | SetOuterWheelSteerPreset (float sensitivity)=0 |
| A wheel grouping preset which lowers by the sensitivity of outer wheels, to improve handling. | |
| virtual void | SetRearWheelPreset (float sensitivity, float power, float suspensionsoftness, float suspensiondamping, float friction, float mass)=0 |
| A wheel grouping preset which sets steering amount and drive power to rear wheels. | |
| virtual void | SetRearWheelPreset (float sensitivity, float power, float suspensionsoftness, float suspensiondamping)=0 |
| Old deprectated version, missing parameters for friciton and mass. | |
| virtual void | SetSteerAmount (float amount)=0 |
| Set the tightness of the vehicle's turning (Wheel turning angle). | |
| virtual void | SetTankMode (bool tankmode)=0 |
| Set if tank steering is enabled vehicle. | |
| virtual void | SetWheelBrakePower (size_t wheelnum, float power)=0 |
| Set amount of power from the brakes which goes to a wheel. | |
| virtual void | SetWheelEnginePower (size_t wheelnum, float power)=0 |
| Set amount of power from the engine which goes to a wheel when accelerating. | |
| virtual void | SetWheelFriction (size_t wheelnum, float friction)=0 |
| Set the friction of a wheel. | |
| virtual void | SetWheelHandbrakeAffected (size_t wheelnum, bool handbrakeaffected)=0 |
| Set whether the handbrake applies to a wheel. | |
| virtual void | SetWheelLeftSteerSensitivity (size_t wheelnum, float sensitivity)=0 |
| Set the sensitivity of a wheel when steering left. | |
| virtual void | SetWheelMass (size_t wheelnum, float mass)=0 |
| Set the mass of a wheel. | |
| virtual void | SetWheelMesh (size_t wheelnum, const char *wheelfact, const char *wheelfile)=0 |
| Set the mesh to use for a wheel. | |
| virtual void | SetWheelMesh (const char *wheelfact, const char *wheelfile)=0 |
| Set the mesh to use for the wheels when not specified. | |
| virtual void | SetWheelPosition (size_t wheelnum, csVector3 position)=0 |
| Set the position of a wheel. | |
| virtual void | SetWheelReturnSpeed (size_t wheelnum, float speed)=0 |
| Set the speed at which a wheel returns to the middle. | |
| virtual void | SetWheelRightSteerSensitivity (size_t wheelnum, float sensitivity)=0 |
| Set the sensitivity of a wheel when steering right. | |
| virtual void | SetWheelRotation (size_t wheelnum, csMatrix3 rotation)=0 |
| Set the rotation of a wheel. | |
| virtual void | SetWheelSteerInverted (size_t wheelnum, bool inverted)=0 |
| Set whether a wheel steers in the opposite direction. | |
| virtual void | SetWheelSuspensionDamping (size_t wheelnum, float damping)=0 |
| Set the damping of a wheel's suspension. | |
| virtual void | SetWheelSuspensionSoftness (size_t wheelnum, float softness)=0 |
| Set the softness of a wheel's suspension. | |
| virtual void | SetWheelTurnSpeed (size_t wheelnum, float speed)=0 |
| Set the speed at which a wheel turns away from the middle. | |
| virtual void | Steer (float amount)=0 |
| Combined steer. | |
| virtual void | SteerLeft (float amount=1.0f)=0 |
| Steer the vehicle left, by a fraction of full steer. | |
| virtual void | SteerRight (float amount=1.0f)=0 |
| Steer the vehicle right, by a fraction of full steer. | |
| virtual void | SteerStraight ()=0 |
| Straighten the steering wheels. | |
Detailed Description
Definition at line 126 of file wheeled.h.
Member Function Documentation
| virtual void iPcWheeled::Accelerate | ( | float | amount = 1.0f |
) | [pure virtual] |
Set the vehicle's accelerator.
- Parameters:
-
amount Amount to apply the accelerator (0.0 - 1.0)
| virtual size_t iPcWheeled::AddWheel | ( | csVector3 | position, | |
| float | turnspeed, | |||
| float | returnspeed, | |||
| float | suspensionsoftness, | |||
| float | suspensiondamping, | |||
| float | brakepower, | |||
| float | enginepower, | |||
| float | leftsteersensitivity, | |||
| float | friction, | |||
| float | mass, | |||
| float | rightsteersensitivity, | |||
| bool | handbrakeaffect, | |||
| bool | steerinvert, | |||
| const char * | wheelfact = 0, |
|||
| const char * | wheelfile = 0, |
|||
| csMatrix3 | rotation = csMatrix3(0.0f, 0.0f, 0.0f, 0.0f) | |||
| ) | [pure virtual] |
Add a wheel to the vehicle's wheel layout.
This method allows for total control over the wheel, overriding the vehicle's presets. All right wheels automatically have their meshes flipped.
- Parameters:
-
position Where the wheel will be placed. turnspeed How fast the wheel should steer away from centre. returnspeed How fast the wheel should return to the centre. suspensionsoftness How soft the suspension on the wheel should be. suspensiondamping How dampened the suspension on the wheel should be. brakepower Fraction of vehicle's brake force this wheel recieves. leftsteersensitivity How sensitive wheel is when steering left. rightsteersensitivity How sensitive wheel is when steering right. friction The traction of the wheel. mass Mass of the wheel, in kilograms. handbrakeaffect Wether the handbrake applies to this wheel. steerinvert Wether this wheel steers back-to-front. wheelfact The name of the factory to use for wheel meshes. wheelfile VFS path to the file which contains the wheel's factory. If 0, it is assumed the factory has already been loaded. rotation A rotation matrix to set on the wheel's mesh.
| virtual size_t iPcWheeled::AddWheel | ( | csVector3 | position, | |
| float | turnspeed, | |||
| float | returnspeed, | |||
| float | suspensionsoftness, | |||
| float | suspensiondamping, | |||
| float | brakepower, | |||
| float | enginepower, | |||
| float | leftsteersensitivity, | |||
| float | rightsteersensitivity, | |||
| bool | handbrakeaffect, | |||
| bool | steerinvert, | |||
| const char * | wheelfact = 0, |
|||
| const char * | wheelfile = 0, |
|||
| csMatrix3 | rotation = csMatrix3(0.0f, 0.0f, 0.0f, 0.0f) | |||
| ) | [pure virtual] |
Old version of AddWheel, missing parameters for friction and mass.
| virtual size_t iPcWheeled::AddWheelAuto | ( | csVector3 | position, | |
| const char * | wheelfact = 0, |
|||
| const char * | wheelfile = 0, |
|||
| csMatrix3 | rotation = csMatrix3(0.0f, 0.0f, 0.0f, 0.0f) | |||
| ) | [pure virtual] |
Add a wheel to the vehicle's wheel layout.
This method uses the vehicle's wheel presets for steering, power and suspension, and automatically applies handbrake and invert steering to rear wheels. to rear wheels. All right wheels automatically have their meshes flipped.
- Parameters:
-
position Where the wheel will be placed. wheelfact The name of the factory to use for wheel meshes. wheelfile VFS path to the file which contains the wheel's factory. If 0, it is assumed the factory has already been loaded. rotation A rotation matrix to set on the wheel's mesh.
| virtual void iPcWheeled::Brake | ( | float | amount = 1.0f |
) | [pure virtual] |
Set the vehicle's brakes.
- Parameters:
-
amount Amount to apply the brakes (0.0 - 1.0)
| virtual void iPcWheeled::DeleteAllWheels | ( | ) | [pure virtual] |
Destroy and delete all wheels from memory.
| virtual void iPcWheeled::DeleteWheel | ( | size_t | wheelnum | ) | [pure virtual] |
Destroy a wheel on the car, and delete it from the memory.
- Parameters:
-
wheelnum Index of the wheel to delete.
| virtual void iPcWheeled::DestroyAllWheels | ( | ) | [pure virtual] |
Destroy all wheels on the car.
The memor is still retained, so the wheels can be restored with RestoreAllWheels().
| virtual void iPcWheeled::DestroyWheel | ( | size_t | wheelnum | ) | [pure virtual] |
Physically remove a wheel on the car.
It will remain in the memory, so all settings remain, and it can be restoredwith RestoreWheel(wheelnum).
| virtual bool iPcWheeled::GetABS | ( | ) | [pure virtual] |
Get if the vehicle uses anti-lock braking.
| virtual bool iPcWheeled::GetABSEnabled | ( | ) | [pure virtual] |
Get if the vehicle uses anti-lock braking.
This is renamed to GetABS.
| virtual float iPcWheeled::GetAcceleratorAmount | ( | ) | [pure virtual] |
Get the Amount that the vehicle accelerator has been applied.
| virtual float iPcWheeled::GetAverageWheelSpin | ( | ) | [pure virtual] |
Get the average spin of all wheels.
| virtual iBodyGroup* iPcWheeled::GetBodyGroup | ( | ) | [pure virtual] |
Get the BodyGroup that the car belongs too.
| virtual float iPcWheeled::GetBrakeAmount | ( | ) | [pure virtual] |
Get the amount that the vehicle brakes have been applied.
| virtual iODEAMotorJoint* iPcWheeled::GetBrakeMotor | ( | size_t | wheelnum | ) | [pure virtual] |
Get the motor which brakes this wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual bool iPcWheeled::GetDifferential | ( | ) | [pure virtual] |
Get if the vehicle uses a differential between left and right wheels.
| virtual int iPcWheeled::GetGear | ( | ) | [pure virtual] |
Get the vehicle's gear.
Get the target force of a given velocity.
- Parameters:
-
gear The gear to get.
Get the target velocity of a given velocity.
- Parameters:
-
gear The gear to get.
| virtual float iPcWheeled::GetSpeed | ( | ) | [pure virtual] |
Get the forward velocity of the vehicle.
| virtual float iPcWheeled::GetSteerAmount | ( | ) | [pure virtual] |
Get the tightness of the vehicle's turning.
| virtual bool iPcWheeled::GetTankMode | ( | ) | [pure virtual] |
Get if tank mode is enabled.
| virtual int iPcWheeled::GetTopGear | ( | ) | [pure virtual] |
Get the highest gear the vehicle has.
| virtual iRigidBody* iPcWheeled::GetWheelBody | ( | size_t | wheelnum | ) | [pure virtual] |
Get the rigid body of this wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelBrakePower | ( | size_t | wheelnum | ) | [pure virtual] |
Get the amount of power from the brakes which goes to a wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual size_t iPcWheeled::GetWheelCount | ( | ) | [pure virtual] |
Get the number of wheels on this vehicle.
| virtual float iPcWheeled::GetWheelEnginePower | ( | size_t | wheelnum | ) | [pure virtual] |
Get the amount of power from the engine which goes to a wheel when accelerating.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelFriction | ( | size_t | wheelnum | ) | [pure virtual] |
Get the friction of the wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual bool iPcWheeled::GetWheelHandbrakeAffected | ( | size_t | wheelnum | ) | [pure virtual] |
Get whether the handbrake applies to a wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual iODEHinge2Joint* iPcWheeled::GetWheelJoint | ( | size_t | wheelnum | ) | [pure virtual] |
Get the joint connecting this wheel to the body.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelLeftSteerSensitivity | ( | size_t | wheelnum | ) | [pure virtual] |
Get the sensitivity of a wheel when steering left.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelMass | ( | size_t | wheelnum | ) | [pure virtual] |
Get the mass of the wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual csVector3 iPcWheeled::GetWheelPosition | ( | size_t | wheelnum | ) | [pure virtual] |
Get the position of a wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelReturnSpeed | ( | size_t | wheelnum | ) | [pure virtual] |
Get the speed at which a wheel returns to the middle.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelRightSteerSensitivity | ( | size_t | wheelnum | ) | [pure virtual] |
Get the sensitivity of a wheel when steering right.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual csMatrix3 iPcWheeled::GetWheelRotation | ( | size_t | wheelnum | ) | [pure virtual] |
Get the rotation of a wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelSpin | ( | size_t | wheelnum | ) | [pure virtual] |
Get the spin of a given wheel.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual bool iPcWheeled::GetWheelSteerInverted | ( | size_t | wheelnum | ) | [pure virtual] |
Get whether a wheel steers in the opposite direction.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelSuspensionDamping | ( | size_t | wheelnum | ) | [pure virtual] |
Get the damping of a wheel's suspension.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelSuspensionSoftness | ( | size_t | wheelnum | ) | [pure virtual] |
Get the softness of a wheel's suspension.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual float iPcWheeled::GetWheelTurnSpeed | ( | size_t | wheelnum | ) | [pure virtual] |
Get the speed at which a wheel turns away from the middle.
- Parameters:
-
wheelnum Index of the wheel to get.
| virtual void iPcWheeled::Handbrake | ( | bool | applied | ) | [pure virtual] |
Set wether the vehicle will handbrake.
(rear wheel lock)
- Parameters:
-
applied Wether the handbrake is applied
| virtual bool iPcWheeled::IsCollisionCallbackEnabled | ( | ) | const [pure virtual] |
Get whether to send messages back to the entity when wheels collide with other bodies.
Is true by default.
| virtual bool iPcWheeled::IsHandbraking | ( | ) | [pure virtual] |
Get whether the vehicle is handbrakeing.
| virtual void iPcWheeled::Neutral | ( | ) | [pure virtual] |
Call this to put the car in neutral gear.
This is the same as setting gear to 0.
| virtual void iPcWheeled::RestoreAllWheels | ( | ) | [pure virtual] |
Restore all of the vehicle's wheels from the layout.
| virtual void iPcWheeled::RestoreWheel | ( | size_t | wheelnum | ) | [pure virtual] |
Restore a wheel, along with its settings, from the layout.
| virtual void iPcWheeled::Reverse | ( | ) | [pure virtual] |
Reverse the vehicle.
This is the same as setting the gear to -1.
| virtual void iPcWheeled::SetABS | ( | bool | enabled | ) | [pure virtual] |
Set if the vehicle uses anti-lock braking.
- Parameters:
-
enabled Whether abs is enabled.
| virtual void iPcWheeled::SetABSEnabled | ( | bool | enabled | ) | [pure virtual] |
Set if the vehicle uses anti-lock braking.
This is renamed to SetABS.
- Parameters:
-
enabled Whether abs is enabled.
| virtual void iPcWheeled::SetAutoReverse | ( | bool | autoreverse | ) | [pure virtual] |
Set wether the vehicle will automatically begin reversing after braking to a stop.
This is enabled by default.
- Parameters:
-
autoreverse. Whether the vehicle will automatically reverse.
| virtual void iPcWheeled::SetAutoTransmission | ( | bool | auto | ) | [pure virtual] |
Set whether the vehicle has an automatic transmission, or gears will be manually controlled.
- Parameters:
-
auto Whether automatic transmission is enabled or not.
| virtual void iPcWheeled::SetBrakeForce | ( | float | force | ) | [pure virtual] |
Set the force at which the vehicle brakes.
- Parameters:
-
force The force with which the vehicle will brake
| virtual void iPcWheeled::SetCollisionCallbackEnabled | ( | bool | en | ) | [pure virtual] |
Set whether to send messages back to the entity when wheels collide with other bodies.
- Parameters:
-
en Wether callback is enabled
| virtual void iPcWheeled::SetDifferential | ( | bool | enabled | ) | [pure virtual] |
Set if the vehicle uses a differential between left and right wheels.
This primarily aids in steering by letting the inner wheels travel slower when turning.
- Parameters:
-
enabled Whether differential is enabled.
| virtual void iPcWheeled::SetFrontWheelPreset | ( | float | sensitivity, | |
| float | power, | |||
| float | suspensionsoftness, | |||
| float | suspensiondamping, | |||
| float | friction, | |||
| float | mass | |||
| ) | [pure virtual] |
A wheel grouping preset which sets steering amount and drive power to front wheels.
Note that changing this will overwrite per-wheel steer and power settings! You will have to set per-wheel settings after you set all the presets.
- Parameters:
-
sensitivity sensitivity for front wheels when steering power power which front wheels recieve when accelerating (0-1) suspensionsoftness How soft the suspension on the wheel should be. suspensiondamping How dampened the suspension on the wheel should be. friction The traction of the wheel. mass Mass of the wheel, in kilograms.
| virtual void iPcWheeled::SetFrontWheelPreset | ( | float | sensitivity, | |
| float | power, | |||
| float | suspensionsoftness, | |||
| float | suspensiondamping | |||
| ) | [pure virtual] |
Old deprectated version, missing parameters for friciton and mass.
| virtual void iPcWheeled::SetGear | ( | int | gear | ) | [pure virtual] |
Change the vehicle's gear.
- Parameters:
-
gear The gear to switch to. -1 is reverse, 0 is neutral, anything above are forwards gears.
Set up a gear with a given velocity and force.
| virtual void iPcWheeled::SetOuterWheelSteerPreset | ( | float | sensitivity | ) | [pure virtual] |
A wheel grouping preset which lowers by the sensitivity of outer wheels, to improve handling.
Note that changing this will overwrite per-wheel steer and power settings! You will have to set per-wheel settings after you set all the presets.
- Parameters:
-
sensitivity factor of sensitivity for outer wheels
| virtual void iPcWheeled::SetRearWheelPreset | ( | float | sensitivity, | |
| float | power, | |||
| float | suspensionsoftness, | |||
| float | suspensiondamping, | |||
| float | friction, | |||
| float | mass | |||
| ) | [pure virtual] |
A wheel grouping preset which sets steering amount and drive power to rear wheels.
Note that changing this will overwrite per-wheel steer and power settings! You will have to set per-wheel settings after you set all the presets.
- Parameters:
-
sensitivity sensitivity for rear wheels when steering power power which rear wheels recieve when accelerating (0-1) suspensionsoftness How soft the suspension on the wheel should be. suspensiondamping How dampened the suspension on the wheel should be. friction The traction of the wheel. mass Mass of the wheel, in kilograms.
| virtual void iPcWheeled::SetRearWheelPreset | ( | float | sensitivity, | |
| float | power, | |||
| float | suspensionsoftness, | |||
| float | suspensiondamping | |||
| ) | [pure virtual] |
Old deprectated version, missing parameters for friciton and mass.
| virtual void iPcWheeled::SetSteerAmount | ( | float | amount | ) | [pure virtual] |
Set the tightness of the vehicle's turning (Wheel turning angle).
- Parameters:
-
amount How tight the car will steer.
| virtual void iPcWheeled::SetTankMode | ( | bool | tankmode | ) | [pure virtual] |
Set if tank steering is enabled vehicle.
- Parameters:
-
tankmode Whether tank steering is enabled or not.
| virtual void iPcWheeled::SetWheelBrakePower | ( | size_t | wheelnum, | |
| float | power | |||
| ) | [pure virtual] |
Set amount of power from the brakes which goes to a wheel.
This is initially 1.
- Parameters:
-
wheelnum Index of the wheel to set. power Amount of brake power going to the wheel, from 0 to 1.
| virtual void iPcWheeled::SetWheelEnginePower | ( | size_t | wheelnum, | |
| float | power | |||
| ) | [pure virtual] |
Set amount of power from the engine which goes to a wheel when accelerating.
This is initially 1.
- Parameters:
-
wheelnum Index of the wheel to set. power Amount of power going to the wheel, from 0 to 1.
| virtual void iPcWheeled::SetWheelFriction | ( | size_t | wheelnum, | |
| float | friction | |||
| ) | [pure virtual] |
Set the friction of a wheel.
The default is 0.7.
- Parameters:
-
wheelnum Index of the wheel to set. friction Friction of the wheel.
| virtual void iPcWheeled::SetWheelHandbrakeAffected | ( | size_t | wheelnum, | |
| bool | handbrakeaffected | |||
| ) | [pure virtual] |
Set whether the handbrake applies to a wheel.
This is initially automatically determined from it's position, where rear wheels are affected by the handbrake
- Parameters:
-
wheelnum Index of the wheel to set. handbrakeaffected Whether the handbrake affects the wheel.
| virtual void iPcWheeled::SetWheelLeftSteerSensitivity | ( | size_t | wheelnum, | |
| float | sensitivity | |||
| ) | [pure virtual] |
Set the sensitivity of a wheel when steering left.
- Parameters:
-
wheelnum Index of the wheel to set. sensitivity Sensitivity of the steering, from 0 to 1.
| virtual void iPcWheeled::SetWheelMass | ( | size_t | wheelnum, | |
| float | mass | |||
| ) | [pure virtual] |
Set the mass of a wheel.
The default is 10.0.
- Parameters:
-
wheelnum Index of the wheel to set. mass Mass of the wheel.
| virtual void iPcWheeled::SetWheelMesh | ( | size_t | wheelnum, | |
| const char * | wheelfact, | |||
| const char * | wheelfile | |||
| ) | [pure virtual] |
Set the mesh to use for a wheel.
- Parameters:
-
wheelnum Index of the wheel to set. wheelfact The name of the factory to use for wheel meshes. wheelfile VFS path to the file which contains the wheel's factory. If 0, it is assumed the factory has already been loaded.
| virtual void iPcWheeled::SetWheelMesh | ( | const char * | wheelfact, | |
| const char * | wheelfile | |||
| ) | [pure virtual] |
Set the mesh to use for the wheels when not specified.
It is expected to be a left wheel. For right wheels it is flipped around.
- Parameters:
-
wheelfact The name of the factory to use for wheel meshes. wheelfile VFS path to the file which contains the wheel's factory. If 0, it is assumed the factory has already been loaded.
| virtual void iPcWheeled::SetWheelPosition | ( | size_t | wheelnum, | |
| csVector3 | position | |||
| ) | [pure virtual] |
Set the position of a wheel.
- Parameters:
-
wheelnum Index of the wheel to set. position The new position of the wheel.
| virtual void iPcWheeled::SetWheelReturnSpeed | ( | size_t | wheelnum, | |
| float | speed | |||
| ) | [pure virtual] |
Set the speed at which a wheel returns to the middle.
This is initially 2.
- Parameters:
-
wheelnum Index of the wheel to set. speed Speed at which the wheel returns.
| virtual void iPcWheeled::SetWheelRightSteerSensitivity | ( | size_t | wheelnum, | |
| float | sensitivity | |||
| ) | [pure virtual] |
Set the sensitivity of a wheel when steering right.
- Parameters:
-
wheelnum Index of the wheel to set. sensitivity Sensitivity of the steering, from 0 to 1.
| virtual void iPcWheeled::SetWheelRotation | ( | size_t | wheelnum, | |
| csMatrix3 | rotation | |||
| ) | [pure virtual] |
Set the rotation of a wheel.
- Parameters:
-
wheelnum Index of the wheel to set. rotation The new rotation of the wheel.
| virtual void iPcWheeled::SetWheelSteerInverted | ( | size_t | wheelnum, | |
| bool | inverted | |||
| ) | [pure virtual] |
Set whether a wheel steers in the opposite direction.
This is initially automatically determined from it's position, where rear wheels are inverted.
- Parameters:
-
wheelnum Index of the wheel to set. inverted Wether the wheel is inverted.
| virtual void iPcWheeled::SetWheelSuspensionDamping | ( | size_t | wheelnum, | |
| float | damping | |||
| ) | [pure virtual] |
Set the damping of a wheel's suspension.
It is initially 0.125.
- Parameters:
-
wheelnum Index of the wheel to set. damping Damping of the suspension, from 0 to 1.
| virtual void iPcWheeled::SetWheelSuspensionSoftness | ( | size_t | wheelnum, | |
| float | softness | |||
| ) | [pure virtual] |
Set the softness of a wheel's suspension.
It is initially 0.000125.
- Parameters:
-
wheelnum Index of the wheel to set. softness Softness of the suspension, from 0 to 1.
| virtual void iPcWheeled::SetWheelTurnSpeed | ( | size_t | wheelnum, | |
| float | speed | |||
| ) | [pure virtual] |
Set the speed at which a wheel turns away from the middle.
This is initially 2.
- Parameters:
-
wheelnum Index of the wheel to set. speed Speed at which the wheel turns.
| virtual void iPcWheeled::Steer | ( | float | amount | ) | [pure virtual] |
Combined steer.
Steer the vehicle by a certain amount (-1 to 1). If amount is less then 0, it will steer left. If more than 0, steer right. Using Steer(0) is the same as calling SteerStraight().
- Parameters:
-
amount How tight / direction the car will steer.
| virtual void iPcWheeled::SteerLeft | ( | float | amount = 1.0f |
) | [pure virtual] |
Steer the vehicle left, by a fraction of full steer.
- Parameters:
-
amount Ratio of steeramount to steer (0 - 1)
| virtual void iPcWheeled::SteerRight | ( | float | amount = 1.0f |
) | [pure virtual] |
Steer the vehicle right, by a fraction of full steer.
- Parameters:
-
amount Ratio of steeramount to steer(0 - 1)
| virtual void iPcWheeled::SteerStraight | ( | ) | [pure virtual] |
Straighten the steering wheels.
The documentation for this struct was generated from the following file:
- propclass/wheeled.h
Generated for CEL: Crystal Entity Layer 1.2 by doxygen 1.4.7
