Main   Class List   Namespace List   Wiki

WheeledVehicle Class Reference
[Vehicles]

A wheeled vehicle. More...

Inheritance diagram for WheeledVehicle:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int getWheelCount ()
 Get the number of wheels on this vehicle.
bool setWheelPowered (int wheel, bool powered)
 Set whether the wheel is powered (has torque applied from the engine).
bool setWheelSpring (int wheel, WheeledVehicleSpring spring)
 Set the WheeledVehicleSpring datablock for this wheel.
bool setWheelSteering (int wheel, float steering)
 Set how much the wheel is affected by steering.
bool setWheelTire (int wheel, WheeledVehicleTire tire)
 Set the WheeledVehicleTire datablock for this wheel.

Static Public Attributes

static bool isRenderable
 Disables rendering of all instances of this type.
static bool isSelectable
 Disables selection of all instances of this type.

Detailed Description

A wheeled vehicle.


Member Function Documentation

int WheeledVehicle::getWheelCount (  ) 

Get the number of wheels on this vehicle.

Returns:
the number of wheels (equal to the number of hub nodes defined in the model)
bool WheeledVehicle::setWheelPowered ( int  wheel,
bool  powered 
)

Set whether the wheel is powered (has torque applied from the engine).

A rear wheel drive car for example would set the front wheels to false, and the rear wheels to true.

Parameters:
wheel index of the wheel to set
powered flag indicating whether to power the wheel or not
Returns:
true if successful, false if failed
bool WheeledVehicle::setWheelSpring ( int  wheel,
WheeledVehicleSpring  spring 
)

Set the WheeledVehicleSpring datablock for this wheel.

Parameters:
wheel index of the wheel to set
spring WheeledVehicleSpring datablock
Returns:
true if successful, false if failed
Example:
%obj.setWheelSpring( 0, FrontSpring );
bool WheeledVehicle::setWheelSteering ( int  wheel,
float  steering 
)

Set how much the wheel is affected by steering.

The steering factor controls how much the wheel is rotated by the vehicle steering. For example, most cars would have their front wheels set to 1.0, and their rear wheels set to 0 since only the front wheels should turn.

Negative values will turn the wheel in the opposite direction to the steering angle.

Parameters:
wheel index of the wheel to set
steering steering factor from -1 (full inverse) to 1 (full)
Returns:
true if successful, false if failed
bool WheeledVehicle::setWheelTire ( int  wheel,
WheeledVehicleTire  tire 
)

Set the WheeledVehicleTire datablock for this wheel.

Parameters:
wheel index of the wheel to set
tire WheeledVehicleTire datablock
Returns:
true if successful, false if failed
Example:
%obj.setWheelTire( 0, FrontTire );

Member Data Documentation

Disables rendering of all instances of this type.

Reimplemented from Vehicle.

Disables selection of all instances of this type.

Reimplemented from Vehicle.



Copyright © GarageGames, LLC. All Rights Reserved.