12 #include <tbb/queuing_rw_mutex.h>
13 #include <tbb/spin_rw_mutex.h>
15 #include <boost/logic/tribool.hpp>
17 namespace MAKVRinTerra
19 class DtUnusedFeatureTileTracker;
20 class DtSharedMemoryFeaturesDebugDrawer;
22 template <
typename FS>
34 typedef typename FeatureSet::Feature
Feature;
37 typedef boost::shared_ptr<DtPagingFeatureSet>
Ptr;
41 typedef boost::shared_ptr<const Tile>
TileCPtr;
44 typedef boost::shared_ptr<const Grid>
GridCPtr;
46 typedef boost::shared_ptr<const Leaf>
LeafCPtr;
50 typedef boost::function<void (const FeatureSet&, DtFeatureGeometry)>
Callback;
54 typedef boost::shared_ptr<Config>
Ptr;
69 boost::shared_ptr<Queue> queue = boost::shared_ptr<Queue>());
71 int loadLevel()
const;
72 void setLoadLevel(
const Subset&);
77 std::string label()
const;
82 bool loaded(
double)
const;
83 unsigned numberOfFeatures()
const;
99 template <
typename FS>
106 virtual int level()
const = 0;
111 typename FS::List&, boost::optional<DtFeatureGeometry>) = 0;
113 virtual boost::optional<unsigned> sizeEstimate()
const = 0;
114 virtual void updateStats();
117 template <
typename FS>
127 typename FS::List&, boost::optional<DtFeatureGeometry>,
unsigned startLevel) = 0;
130 virtual bool index(
const FS&) = 0;
136 const Config& config()
const;
153 template <
typename FS>
156 ,
public boost::enable_shared_from_this<typename DtPagingFeatureSet<FS>::Grid>
159 std::string
label()
const;
166 typename FS::List&, boost::optional<DtFeatureGeometry>,
unsigned startLevel);
170 boost::optional<unsigned> sizeEstimate()
const;
173 virtual TilePtr getSubtile(
unsigned i, boost::tribool forceLeaf)
const = 0;
174 virtual TilePtr getLoadedSubtile(
unsigned i)
const = 0;
178 bool loaded(
double)
const;
187 struct ParallelCaller;
199 template <
typename FS>
205 bool index(
const FS&);
207 TilePtr getSubtile(
unsigned i, boost::tribool forceLeaf)
const;
208 TilePtr getLoadedSubtile(
unsigned i)
const;
217 template <
typename FS>
228 bool loaded(
double = 0)
const;
231 bool index(
const FS&);
234 typename FS::List&, boost::optional<DtFeatureGeometry>);
236 typename FS::List&, boost::optional<DtFeatureGeometry>,
unsigned startLevel);
240 boost::optional<unsigned> sizeEstimate()
const;
244 std::string
label()
const;
256 FS* createFeatureSet(
FS*)
const;
259 template <
typename FS>
266 std::string
label()
const;
272 struct WrapWithPagingFeature;