Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/john/src/shoot_rocket.h @ 2447

Last change on this file since 2447 was 1957, checked in by bensch, 20 years ago

orxonox/truk: now the rockets are frame-rate-driven

File size: 1.0 KB
Line 
1
2#ifndef SHOOT_ROCKET_H
3#define SHOOT_ROCKET_H
4
5/* openGL Headers */
6#include <GL/glut.h>
7#include <math.h>
8
9#include "stdincl.h"
10#include "data_tank.h"
11#include "npc.h"
12
13enum RocketType { HOMING, SIDEACC, BACKPARABLE, ROTATER};
14enum RocketDirection {LEFT, RIGHT, UP, DOWN};
15
16class ShootRocket {
17
18
19 public:
20 
21  /* a list of all shoot-amental objects */
22  struct shoot {
23    enum RocketType type;
24    shoot *next;
25    float xCor;
26    float yCor;
27    float zCor;   
28    float xVel;
29    float yVel;
30    float zVel;
31    float xAcc;
32    float yAcc;
33    float zAcc;
34    float age;
35    float lifetime;
36    float collisionRadius;
37  };
38  shoot* lastShoot;
39 
40  ShootRocket ();
41  ~ShootRocket ();
42 
43  int inhibitor;
44  float rotateAngle;
45
46  void drawShoot(void);
47  void addShoot(shoot* sh);
48  void addBackParable(float x, float y, float z);
49  void addSideAcc(float x, float y, float z, enum RocketDirection direction);
50  void addRotater(float x, float y, float z);
51
52  void setShootStep(float step);
53  void removeShoot(shoot* sh);
54
55
56 private:
57
58  float step;
59
60};
61
62#endif
Note: See TracBrowser for help on using the repository browser.