irr::newton::VehicleSimple Class Reference

Class to management a vehicle. More...

#include <vehicle_simple.hpp>

Inheritance diagram for irr::newton::VehicleSimple:

irr::newton::Joint irr::newton::IrrNewt_Base List of all members.

Public Member Functions

VehicleTirecreateTire (irr::scene::ISceneNode *tire_node, irr::core::matrix4 offset_matrix, irr::core::vector3df pin, irr::f32 mass, irr::f32 width, irr::f32 radius, irr::newton::PosRot body_scene_node_offset=irr::newton::PosRot(), irr::f32 sus_shock=30.0f, irr::f32 sus_spring=200.0f, irr::f32 sus_length=1.2f)
irr::core::array< VehicleTire * > getAllTires ()
VehicleTiregetFirstTire ()
 get first tire of the vehicle tire set
VehicleTiregetNextTire (irr::newton::VehicleTire *current_tire)
void reset ()
 VehicleSimple (irr::newton::World *world, irr::newton::Body *chassis, irr::core::vector3df up_dir)
 VehicleSimple (VehicleSimple &v)
 ~VehicleSimple ()

Friends

void __cdecl VehicleTireCallBack (const NewtonJoint *vehicle)

Detailed Description

Class to management a vehicle.


Constructor & Destructor Documentation

irr::newton::VehicleSimple::VehicleSimple ( VehicleSimple v  ) 

costructor, don't call this directly

irr::newton::VehicleSimple::VehicleSimple ( irr::newton::World world,
irr::newton::Body chassis,
irr::core::vector3df  up_dir 
)

costructor, don't call this directly

irr::newton::VehicleSimple::~VehicleSimple (  ) 


Member Function Documentation

VehicleTire* irr::newton::VehicleSimple::createTire ( irr::scene::ISceneNode *  tire_node,
irr::core::matrix4  offset_matrix,
irr::core::vector3df  pin,
irr::f32  mass,
irr::f32  width,
irr::f32  radius,
irr::newton::PosRot  body_scene_node_offset = irr::newton::PosRot(),
irr::f32  sus_shock = 30.0f,
irr::f32  sus_spring = 200.0f,
irr::f32  sus_length = 1.2f 
)

add a tire to the vehicle After the application creates the vehicle joint, it must add the tires. the application should calculate the correct tire parameters, like tire mass, position, width height, spring and damper constants.

Parameters:
tire_node the scene node associated with the tire
offset_matrix the offset of the tire relative to the vehicle body. Use this to position and to rotation the tire
pin the rotation axis of the tire, in the space of the tire. It may be (0,0,1)
mass tire mass, must be much smaller than the vehicle body. ratio of 50:1 to 100:1 are the recommended values
width width of the tire, must be smaller than the tire radius
radius tire radius
body_scene_node_offset the position and the rotation offset of the tire relative to the tire scene node (tire_node)
sus_shock parametrized damping constant for a spring, mass, damper system. A value of one corresponds to a critically damped system.
sus_spring parametrized spring constant for a spring, mass, damper system. A value of one corresponds to a critically damped system.
sus_length distance from the tire set position to the upper stop on the vehicle body frame. The total suspension length is twice that.
Returns:
the new tire

irr::core::array<VehicleTire*> irr::newton::VehicleSimple::getAllTires (  ) 

Get all tires of the vehicle

Returns:
an array contain all vehicle tires. an empty array indicates that you don't add tires to the vehicle. To add a tire see VehicleSimple::addTire()

VehicleTire* irr::newton::VehicleSimple::getFirstTire (  ) 

get first tire of the vehicle tire set

VehicleTire* irr::newton::VehicleSimple::getNextTire ( irr::newton::VehicleTire current_tire  ) 

Get the next tire on the tire set

Parameters:
current_tire the current tire
Returns:
the tire after the current tire

void irr::newton::VehicleSimple::reset (  ) 

Reset all tires velocities to zero. This function is useful for reposition the vehicle

Returns:
none


Friends And Related Function Documentation

void __cdecl VehicleTireCallBack ( const NewtonJoint *  vehicle  )  [friend]

newton vehicle callback


The documentation for this class was generated from the following file:
Generated on Fri Dec 15 16:58:33 2006 for IrrNewt by  doxygen 1.5.1-p1