MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Element_Boids2.h
1 #ifndef ELEMENT_BOIDS2_H /* -*- C++ -*- */
2 #define ELEMENT_BOIDS2_H
3 
4 #include "Element_Boids.h"
5 
6 namespace MFM
7 {
8 
9  template <class CC>
10  class Element_Boids2 : public Element_Boids<CC>
11  {
12  // Extract short names for parameter types
13  typedef typename CC::ATOM_TYPE T;
14  typedef typename CC::PARAM_CONFIG P;
15  public:
16  const char* GetName() const { return "B2"; }
17 
18  static Element_Boids2 THE_INSTANCE;
19  static const u32 SUB_TYPE = 2;
20  static const u32 TYPE = Element_Boids<CC>::TYPE|(SUB_TYPE<<Element_Boids<CC>::TYPE_BITS);
21 
22  Element_Boids2() { }
23 
24  virtual const T & GetDefaultAtom() const
25  {
26  static T defaultAtom(TYPE,0,0,Element_Boids<CC>::STATE_BITS);
27  return defaultAtom;
28  }
29 
30  virtual u32 DefaultPhysicsColor() const
31  {
32  return 0xfff00000;
33  }
34  };
35 
36  template <class CC>
37  Element_Boids2<CC> Element_Boids2<CC>::THE_INSTANCE;
38 
39 }
40 
41 #endif /* ELEMENT_BOIDS2_H */
Definition: Element_Boids.h:111
virtual const T & GetDefaultAtom() const
Definition: Element_Boids2.h:24
virtual u32 DefaultPhysicsColor() const
Definition: Element_Boids2.h:30
Definition: Element_Boids2.h:10