Roguelike
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
processor.h
Go to the documentation of this file.
1 #ifndef ROGUELIKE_ALG_LOS_PROCESSOR_H_
2 #define ROGUELIKE_ALG_LOS_PROCESSOR_H_
3 
4 // Inheritance
5 // (none)
6 
7 // External Dependencies
8 #include <array>
9 #include <ugdk/portable/tr1.h>
10 #include FROM_TR1(functional)
11 #include <set>
12 
13 // Internal Dependencies
14 #include "game/alg/los/eye.h"
15 #include "game/alg/los/cone.h"
16 
17 // Forward Declarations
18 #include <ugdk/math.h>
19 #include "utils/integer2Dutils.h"
20 #include "game/alg.h"
21 #include "game/alg/los.h"
22 
23 namespace game {
24 namespace alg {
25 namespace los {
26 
27 class Processor {
28  // lacks operator=
29  Processor& operator=(const Processor&);
30 
31  public:
32  Processor(const std::set<int>& relevant_octants, const VisibleTileAction& visible_tile_action,
33  const double& sight_range, const std::set<Eye*>& eyes,
34  const std::tr1::function<bool (const ugdk::math::Integer2D&)>& blocks_vision);
35  ~Processor();
36 
37  void Process();
38 
39  private:
40  const std::set<int>& relevant_octants_;
41  const VisibleTileAction& visible_tile_action_;
42 
43  std::array<OctantProcessor*,8> octants_;
44 };
45 
46 } // namespace los
47 } // namespace alg
48 } // namespace game
49 
50 #endif // ROGUELIKE_ALG_LOS_PROCESSOR_H_
Definition: aim.cc:15
~Processor()
Definition: processor.cc:29
Processor(const std::set< int > &relevant_octants, const VisibleTileAction &visible_tile_action, const double &sight_range, const std::set< Eye * > &eyes, const std::tr1::function< bool(const ugdk::math::Integer2D &)> &blocks_vision)
Definition: processor.cc:21
bool blocks_vision(const Integer2D &tile)
Definition: vision.cc:27
void Process()
Definition: processor.cc:34
std::tr1::function< void(const ugdk::math::Integer2D &tile, const EquationalLineDouble &upper, const EquationalLineDouble &lower, enums::bump::BumpType bump)> VisibleTileAction
Definition: los.h:37
Definition: processor.h:27