[go: up one dir, main page]

Menu

[r8]: / include / coche.h  Maximize  Restore  History

Download this file

57 lines (43 with data), 933 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/***********************
* COCHE
***********************/
#ifndef COCHE_H
#define COCHE_H
#define TRACC_DEL 0
#define TRACC_TRS 1
#define TRACC_4x4 2
#define KEYBOARD 0
#define JOYSTICK 1
#define COMPUTER 2
#define NETWORK 3
class Coche
{
dGeomID box[1];
dGeomID sphere[4];
dJointID joint[4];
float length; // chassis length
float width; // chassis width
float height; // chassis height
float radius; // wheel radius
float startz,starty,startx; // starting
float cmass; // chassis mass
float wmass; // wheel mass
float tracc; // wheel mass
float power; // wheel mass
int input;
public:
float x,y,z,xs,ys,zs,vel;
//revoluciones del motor se calculan a partir
//de la velocitat de las ruedas
float rev;
ObjModel chasis;
ObjModel rueda;
dSpaceID car_space;
dBodyID body[5];
float speed,steer,brake;
void create();
void destroy();
void move();
void draw();
};
#endif