voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
accessor.hpp
1 #ifndef PROCEDURAL_VOXEL_TERRAIN_ACCESSOR_HPP
2 #define PROCEDURAL_VOXEL_TERRAIN_ACCESSOR_HPP
3 
4 #include "blub/core/globals.hpp"
5 #include "blub/core/vector.hpp"
6 #include "blub/procedural/voxel/terrain/base.hpp"
7 
8 
9 namespace blub
10 {
11 namespace procedural
12 {
13 namespace voxel
14 {
15 namespace terrain
16 {
17 
18 
23 template <class configType>
24 class accessor : public base<typename configType::t_accessor::t_simple>
25 {
26 public:
27  typedef configType t_config;
28  typedef typename t_config::t_accessor::t_simple t_simple;
29  typedef base<t_simple> t_base;
30 
31  typedef typename t_config::t_container::t_simple t_simpleContainer;
32 
40  t_simpleContainer &voxels,
41  const uint32& numLod)
42  : m_voxels(voxels)
43  {
44  for (uint32 indLod = 0; indLod < numLod; ++indLod)
45  {
46  t_simple* lod = new t_simple(worker, voxels, indLod);
47  t_base::m_lods.emplace_back(lod);
48  }
49  }
50 
55  {
56  }
57 
62  t_simpleContainer &getVoxelContainer() const
63  {
64  return m_voxels;
65  }
66 
67 private:
68  t_simpleContainer &m_voxels;
69 
70 };
71 
72 
73 }
74 }
75 }
76 }
77 
78 
79 #endif // PROCEDURAL_VOXEL_TERRAIN_ACCESSOR_HPP
Definition: customVertexInformation.cpp:193
accessor(blub::async::dispatcher &worker, t_simpleContainer &voxels, const uint32 &numLod)
accessor constructor
Definition: accessor.hpp:39
t_lodList m_lods
m_lods container for the lods.
Definition: base.hpp:78
Definition: dispatcher.hpp:29
~accessor()
~accessor destructor
Definition: accessor.hpp:54
Definition: deadlineTimer.hpp:10
t_simpleContainer & getVoxelContainer() const
getVoxelContainer returns the voxel-container to get the data from and to sync with.
Definition: accessor.hpp:62