#include <vehicle_simple.hpp>
Inheritance diagram for irr::newton::VehicleSimple:
Public Member Functions | |
VehicleTire * | 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) |
irr::core::array< VehicleTire * > | getAllTires () |
VehicleTire * | getFirstTire () |
get first tire of the vehicle tire set | |
VehicleTire * | getNextTire (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) |
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 | ( | ) |
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.
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. |
irr::core::array<VehicleTire*> irr::newton::VehicleSimple::getAllTires | ( | ) |
Get all tires of the vehicle
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
current_tire | the current tire |
void irr::newton::VehicleSimple::reset | ( | ) |
Reset all tires velocities to zero. This function is useful for reposition the vehicle
void __cdecl VehicleTireCallBack | ( | const NewtonJoint * | vehicle | ) | [friend] |
newton vehicle callback