SO3Engine
SO3VehicleContraint.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
32#ifndef __SO3VEHICLECONTRAINT_H__
33#define __SO3VEHICLECONTRAINT_H__
34
37#include "SO3Body.h"
38
39namespace SO3
40{
41
43{
44public:
45protected:
46private:
47
48public:
51 SVehicleContraint(SScene* scene, SBody* son);
52
56
59 virtual void SetParentBody(SBody* body);
60
63 virtual void SetSonBody(SBody* body);
64
67 Ogre::Real GetSpeed();
68
71 void AddTire(SNode* node, Ogre::Real mass, Ogre::Real radius, Ogre::Real width, Ogre::Real friction, Ogre::Real susLength, Ogre::Real susSpring, Ogre::Real susShock, bool steer, bool driving);
72
75 void SetSteerAngle(Ogre::Radian angle);
76
79 void SetDrivingTorque(Ogre::Radian torque);
80
83 void SetBrake(Ogre::Real brake);
84
87 bool GetVehicleOnAir();
88
91 bool GetTireOnAir(SNode* node);
92
95 Ogre::Real GetTireAngularVelocity(SNode* node);
96
97protected:
98private:
100 void UpdateJoint();
101};
102
103}
104
105#endif
librairies include
void AddTire(SNode *node, Ogre::Real mass, Ogre::Real radius, Ogre::Real width, Ogre::Real friction, Ogre::Real susLength, Ogre::Real susSpring, Ogre::Real susShock, bool steer, bool driving)
Ogre::Real GetTireAngularVelocity(SNode *node)
virtual void SetParentBody(SBody *body)
void SetSteerAngle(Ogre::Radian angle)
void SetDrivingTorque(Ogre::Radian torque)
virtual void SetSonBody(SBody *body)
void SetBrake(Ogre::Real brake)