1 #ifndef PROCEDURAL_VOXEL_TERRAIN_BASE_HPP
2 #define PROCEDURAL_VOXEL_TERRAIN_BASE_HPP
4 #include "blub/async/predecl.hpp"
5 #include "blub/core/globals.hpp"
6 #include "blub/core/noncopyable.hpp"
7 #include "blub/core/scopedPtr.hpp"
8 #include "blub/core/vector.hpp"
9 #include "blub/procedural/predecl.hpp"
10 #include "blub/procedural/voxel/simple/base.hpp"
12 #include <boost/function/function_fwd.hpp>
29 template <
class simpleType>
30 class base :
public noncopyable
33 typedef simpleType t_simple;
34 typedef t_simple* t_lod;
35 typedef vector<scopedPointer<t_simple> > t_lodList;
36 typedef typename t_simple::t_createTileCallback t_createTileCallback;
52 t_lod
getLod(
const uint16& lod)
const;
82 template <
class tileType>
87 template <
class tileType>
93 template <
class tileType>
96 BASSERT(lod < m_lods.size());
97 return m_lods[lod].get();
100 template <
class tileType>
106 template <
class tileType>
109 return m_lods.size();
112 template <
class tileType>
115 for (
typename t_lodList::value_type &lod : m_lods)
117 lod->setCreateTileCallback(toSet);
128 #endif // PROCEDURAL_VOXEL_TERRAIN_BASE_HPP
t_lod getLod(const uint16 &lod) const
getLod returns a level of detail.
Definition: base.hpp:94
const t_lodList & getLodList() const
getLodList returns all level of details.
Definition: base.hpp:101
t_lodList m_lods
m_lods container for the lods.
Definition: base.hpp:78
void setCreateTileCallback(const t_createTileCallback &toSet)
setCreateTileCallback sets the callback for creating tiles to the lods.
Definition: base.hpp:113
base()
base contructor
Definition: base.hpp:83
int32 getNumLod() const
getNumLod returns number of level of details.
Definition: base.hpp:107
~base()
~base destructor
Definition: base.hpp:88
Definition: deadlineTimer.hpp:10