CEL

Public API Reference

iPcWheeled Struct Reference

List of all members.

Public Member Functions

virtual void Accelerate (bool applied)=0
 Set wether the vehicle will accelerate.
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
 Add a wheel to the vehicle's wheel layout.
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 (bool applied)=0
 Set wether the vehicle will brake.
virtual void DeleteAllWheels ()=0
 Destroy and delete all wheels in the layout.
virtual void DeleteWheel (size_t wheelnum)=0
 Destroy a wheel on the car, and delete it from the layout.
virtual void DestroyAllWheels ()=0
 Destroy all wheels on the car.
virtual void DestroyWheel (size_t wheelnum)=0
 Destroy a wheel on the car.
virtual iBodyGroup * GetBodyGroup ()=0
 Get the BodyGroup that the car belongs too.
virtual int GetGear ()=0
 Get the vehicle's gear.
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 whether 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 bool GetWheelHandbrakeAffected (size_t wheelnum)=0
 Get whether the handbrake applies to a wheel.
virtual iODEHinge2Joint * GetWheelJoint (size_t wheelnum)=0
 Get whether the joint connecting this wheel.
virtual float GetWheelLeftSteerSensitivity (size_t wheelnum)=0
 Get the sensitivity of a wheel when steering left.
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 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 IsAccelerating ()=0
 Get whether the vehicle is accelerating.
virtual bool IsBraking ()=0
 Get whether the vehicle is brakeing.
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 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 SetFrontWheelPreset (float sensitivity, float power, float suspensionsoftness, float suspensiondamping)=0
 A wheel grouping preset which sets steering amount and drive power to front wheels.
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)=0
 A wheel grouping preset which sets steering amount and drive power to rear wheels.
virtual void SetSteerAmount (float amount)=0
 Set the tightness of the vehicle's turning.
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 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.This is initially automatically determined from the wheels position.
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 SteerLeft ()=0
 Steer the vehicle left.
virtual void SteerRight ()=0
 Steer the vehicle right.
virtual void SteerStraight ()=0
 Straighten the steering wheels.

Detailed Description

Definition at line 52 of file wheeled.h.


Member Function Documentation

virtual void iPcWheeled::Accelerate ( bool  applied  )  [pure virtual]

Set wether the vehicle will accelerate.

Parameters:
applied Whether the accelerator is applied.

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]

Add a wheel to the vehicle's wheel layout.

This method allows for total control over the wheel, overriding the vehicle's presets.

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.
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::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.

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.
rotation A rotation matrix to set on the wheel's mesh.

virtual void iPcWheeled::Brake ( bool  applied  )  [pure virtual]

Set wether the vehicle will brake.

Parameters:
applied Wether the brake is applied

virtual void iPcWheeled::DeleteAllWheels (  )  [pure virtual]

Destroy and delete all wheels in the layout.

virtual void iPcWheeled::DeleteWheel ( size_t  wheelnum  )  [pure virtual]

Destroy a wheel on the car, and delete it from the layout.

It

Parameters:
wheelnum Index of the wheel to delete.

virtual void iPcWheeled::DestroyAllWheels (  )  [pure virtual]

Destroy all wheels on the car.

The layout is still retained, so the wheels can be restored with RestoreWheelLayout().

virtual void iPcWheeled::DestroyWheel ( size_t  wheelnum  )  [pure virtual]

Destroy a wheel on the car.

It will remain in the layout, so it can be restored along with all its settings with RestoreWheel(wheelnum).

virtual iBodyGroup* iPcWheeled::GetBodyGroup (  )  [pure virtual]

Get the BodyGroup that the car belongs too.

virtual int iPcWheeled::GetGear (  )  [pure virtual]

Get the vehicle's gear.

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 whether 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 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 whether the joint connecting this wheel.

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 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 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::IsAccelerating (  )  [pure virtual]

Get whether the vehicle is accelerating.

virtual bool iPcWheeled::IsBraking (  )  [pure virtual]

Get whether the vehicle is brakeing.

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::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::SetFrontWheelPreset ( float  sensitivity,
float  power,
float  suspensionsoftness,
float  suspensiondamping 
) [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.

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.

virtual void iPcWheeled::SetGearSettings ( int  gear,
float  velocity,
float  force 
) [pure virtual]

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 
) [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.

virtual void iPcWheeled::SetSteerAmount ( float  amount  )  [pure virtual]

Set the tightness of the vehicle's turning.

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::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.This is initially automatically determined from the wheels position.

If it is an outer wheel when steering left, it is decreased. If it is a back wheel it is decreased further.

Parameters:
wheelnum Index of the wheel to set.
sensitivity Sensitivity of the steering, from 0 to 1.

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.

This is initially automatically determined from the wheels position. If it is an outer wheel when steering right, it is decreased. If it is a back wheel it is decreased further.

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::SteerLeft (  )  [pure virtual]

Steer the vehicle left.

virtual void iPcWheeled::SteerRight (  )  [pure virtual]

Steer the vehicle right.

virtual void iPcWheeled::SteerStraight (  )  [pure virtual]

Straighten the steering wheels.


The documentation for this struct was generated from the following file:
Generated for CEL: Crystal Entity Layer by doxygen 1.4.7