Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
worldtreescanner.h
1 #pragma once
2 
3 #include <list>
4 
5 #include <glm/glm.hpp>
6 
7 
8 class WorldTree;
9 class WorldObject;
10 
12 public:
14 
15  float scanInterval() const;
16  void setScanInterval(float scanInterval);
17 
18  float scanRadius() const;
19  void setScanRadius(float scanRadius);
20 
21  const std::list<WorldObject*>& worldObjects();
22  const std::list<WorldObject*>& foundWorldObjects();
23  const std::list<WorldObject*>& lostWorldObjects();
24 
25  void update(float deltaSec, WorldObject* worldObject);
26  void update(float deltaSec, const glm::vec3& position);
27 
28  virtual void onFoundWorldObject(WorldObject* worldObject);
29  virtual void onLostWorldObject(WorldObject* worldObject);
30 
31 
32 protected:
33  float m_scanInterval;
34  float m_scanCountdown;
35 
36  float m_scanRadius;
37 
38  std::list<WorldObject*> m_worldObjects;
39 
40  std::list<WorldObject*> m_foundWorldObjects;
41  std::list<WorldObject*> m_lostWorldObjects;
42 
43 
44  void update(float deltaSec, WorldObject* worldObject, const glm::vec3& position);
45  void scan(WorldObject* worldObject, const glm::vec3& position);
46  void callHooks();
47 };
48 
Definition: worldobject.h:43
Definition: worldtreescanner.h:11
Definition: worldtree.h:13