vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Boid.h
Go to the documentation of this file.
1 /*
2  Boids - virtualny krdel (roj, hejno) vtakov, ryb, hmyzu ...
3  Michal Pancik, 172460
4  Laborator interakci cloveka s pocitacem
5  2008
6 
7  Problematiku boidov rozpracoval Craig W. Reynolds
8  - http://www.red3d.com/cwr/
9  Uzitocne vysvetlenie a pseudokod napisal Conrad Parker
10  - http://www.metadecks.org/~conrad/boids/pseudocode.html
11  */
12 
13 #ifndef BOID_H
14 #define BOID_H
15 
16 #include <vrecko/Ability.h>
18 #include <vrecko/World.h>
19 
20 using namespace vrecko;
21 
22 namespace boids {
23 
24 class Boid: public Ability {
25  public:
26  Boid();
27  ~Boid();
28 
29 // void processEvent(const std::string &input_name, void *value);
30  void preInitialize(void);
31  void postInitialize(void);
32  void update(void);
33 
34  bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *pParametersNode);
35  XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *saveXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *);
36 
37  protected:
39  osg::Vec3 up_vector;
40 
41  DECLARE_INPUT(Position, MessageVec3);
42  DECLARE_INPUT(Velocity, MessageVec3);
43 };
44 
45 }
46 
47 #endif
48 
49