intravenous

view src/ship.h @ 10:8fbdc6f84f64

fixed after the change in vmath
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 31 May 2013 01:30:14 +0300
parents 94d4c60af435
children
line source
1 #ifndef SHIP_H_
2 #define SHIP_H_
4 #include <vmath/vmath.h>
5 #include "game.h"
7 class Vein;
9 struct HitPoint {
10 Vector3 pos;
11 Vector3 normal;
12 };
14 class Ship {
15 private:
16 Vector3 pos, velocity;
17 Quaternion rot;
18 double friction;
19 Vein *vein;
21 public:
22 Ship(Vein *vein);
24 void accelerate(double a);
25 void accelerate_side(double a);
26 void turn(double yaw, double pitch);
28 void update(time_sec_t dt);
30 bool collision(const Vein *vein, const Vector3 &start, const Vector3 &end, HitPoint *hit) const;
32 const Vector3 &get_position() const;
33 Vector3 get_direction() const;
34 Vector3 get_right() const;
36 Matrix4x4 get_matrix() const;
38 void dbg_draw() const;
39 };
42 #endif // SHIP_H_