Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/shoot_rocket.h @ 1977

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

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

File size: 1.0 KB
RevLine 
[1920]1
2#ifndef SHOOT_ROCKET_H
3#define SHOOT_ROCKET_H
4
5/* openGL Headers */
6#include <GL/glut.h>
[1926]7#include <math.h>
[1920]8
9#include "stdincl.h"
10#include "data_tank.h"
[1921]11#include "npc.h"
[1920]12
[1926]13enum RocketType { HOMING, SIDEACC, BACKPARABLE, ROTATER};
[1924]14enum RocketDirection {LEFT, RIGHT, UP, DOWN};
15
[1920]16class ShootRocket {
17
18
19 public:
20 
21  /* a list of all shoot-amental objects */
22  struct shoot {
[1924]23    enum RocketType type;
[1920]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;
[1957]35    float lifetime;
[1920]36    float collisionRadius;
37  };
38  shoot* lastShoot;
[1926]39 
[1920]40  ShootRocket ();
41  ~ShootRocket ();
[1921]42 
43  int inhibitor;
[1926]44  float rotateAngle;
[1920]45
46  void drawShoot(void);
47  void addShoot(shoot* sh);
[1924]48  void addBackParable(float x, float y, float z);
49  void addSideAcc(float x, float y, float z, enum RocketDirection direction);
[1926]50  void addRotater(float x, float y, float z);
51
[1920]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.