summaryrefslogtreecommitdiff
path: root/gaunt01/src/bird.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-04-05 14:00:51 +0100
committerTim Redfern <tim@eclectronics.org>2012-04-05 14:00:51 +0100
commitf65006daf4979d82d67fd8c8a234d3913088821d (patch)
tree104d30c316ca295cd4bad1110c7f341640112738 /gaunt01/src/bird.h
parent0c2a97dcc0fb370938dc0d2d3a27053c2c9cb31e (diff)
starting to implement bird
Diffstat (limited to 'gaunt01/src/bird.h')
-rw-r--r--gaunt01/src/bird.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/gaunt01/src/bird.h b/gaunt01/src/bird.h
new file mode 100644
index 0000000..4114ad3
--- /dev/null
+++ b/gaunt01/src/bird.h
@@ -0,0 +1,57 @@
+#ifndef BIRD_H
+#define BIRD_H
+
+/*
+ Hostile bird character for 'Run the gauntlet' game
+
+ Tim Redfern April 2012
+
+ ??how to manage visibility
+ Bird should automatically stay within viewing volume of camera
+
+ from the birds POV, The visible area is a frustrum extending down from the camera
+
+ 1) like opensteer, extend the birds heading and decide whether this will hit the edge
+ 2) have an actual model of the volume and work within it
+
+ 3) how do we make the bird aware of players in front of it
+
+ --> this all implies being able to take a sightline from the bird and determine
+ -visibility of objects
+ -distance to obstructions
+
+ -build basic of time/speed/heading update/draw
+ -basic anim cycle
+
+*/
+
+#include "ofMain.h"
+#include "morphmesh.h"
+#include "normBindTexture.h"
+
+
+class bird
+{
+ public:
+ bird();
+ virtual ~bird();
+ void update(const vector<ofVec3f>& players);
+ void draw();
+ protected:
+ private:
+
+ ofVec3f position;
+ ofVec3f heading;
+ ofVec3f direction;
+
+ float velocity; //per second
+ float turnAngle; //per second
+ float diveAngle; //per second
+
+ float lastTime;
+
+ morphmesh model;
+ ofImage texture;
+};
+
+#endif // BIRD_H