ld33_umonster
diff src/dragon.h @ 7:92d662deb66e
capsule distance seems broken
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Aug 2015 00:38:00 +0300 |
parents | 3b4460b34d43 |
children |
line diff
1.1 --- a/src/dragon.h Sun Aug 23 05:37:09 2015 +0300 1.2 +++ b/src/dragon.h Tue Aug 25 00:38:00 2015 +0300 1.3 @@ -2,6 +2,18 @@ 1.4 #define DRAGON_H_ 1.5 1.6 #include "vmath/vmath.h" 1.7 +#include "mesh.h" 1.8 +#include "metasurf.h" 1.9 + 1.10 +struct Capsule { 1.11 + Vector3 p[2]; 1.12 + float w[2]; 1.13 +}; 1.14 + 1.15 +struct DynVertex { 1.16 + float x, y, z; 1.17 + float nx, ny, nz; 1.18 +}; 1.19 1.20 class Dragon { 1.21 private: 1.22 @@ -9,6 +21,8 @@ 1.23 Vector3 head_pos, target; 1.24 float head_xlim[2], head_ylim[2]; 1.25 1.26 + struct metasurface *msurf; 1.27 + 1.28 public: 1.29 Dragon(); 1.30 ~Dragon(); 1.31 @@ -25,6 +39,15 @@ 1.32 1.33 void update(); 1.34 void draw() const; 1.35 + 1.36 + // implementation details, must be public for the msurf callbacks 1.37 + Capsule *neck_seg; 1.38 + int neck_seg_count; 1.39 + DynVertex *dyn_varr; 1.40 + mutable int dyn_vidx; 1.41 + unsigned int dyn_vbo; 1.42 + 1.43 + void flush_dynvbo() const; 1.44 }; 1.45 1.46 #endif // DRAGON_H_