23 #include <boost/graph/adjacency_list.hpp>
24 #include <boost/graph/properties.hpp>
25 #include <boost/graph/graph_traits.hpp>
26 #include <boost/function.hpp>
27 #include <boost/unordered_set.hpp>
29 #include <tbb/queuing_mutex.h>
30 #include <tbb/queuing_rw_mutex.h>
31 #include <tbb/atomic.h>
32 #include <tbb/compat/condition_variable>
33 #include <tbb/mutex.h>
38 namespace MAKVRinTerra
40 class DtAStarGraphDebugger;
46 explicit VertexInfo(
const DtPoint& point);
64 bool isOneway()
const;
65 bool isDeleted()
const;
75 boost::shared_ptr<Data>
myData;
81 class BoostGraphVisitor;
82 friend class BoostGraphVisitor;
89 typedef boost::shared_ptr<DtAStarGraph>
Ptr;
91 Ptr shared_from_this();
93 typedef boost::adjacency_list<
114 typedef boost::property<boost::edge_weight_t, double>
Weight;
122 typedef std::list<PathVertex>
List;
124 static double Distance(
const List&);
138 typedef std::list<MultiPathVertex>
List;
148 void addPath(PathVertex::List::const_iterator, PathVertex::List::const_iterator);
150 void addPathToEnd(PathVertex::List::const_iterator, PathVertex::List::const_iterator);
162 explicit Path(
const std::string& = std::string());
167 void addPath(
const Path&);
171 bool empty()
const {
return myPathVertices.empty(); }
172 size_t numPaths()
const {
return myPathVertices.size(); }
184 template <
typename T>
200 std::auto_ptr<DtFeatureSet> input,
203 std::string label = std::string());
207 virtual void shutdown();
208 virtual bool isShutdown()
const;
223 double maxSearchRadius,
224 double startProximityThreshold,
225 double stopProximityThreshold,
245 void setMaxSearchRadius(
double radius);
246 void setSearchRadius(
double maxRadius,
double minRadius);
253 Results* results = 0,
254 unsigned recursionLevel = 0);
258 bool onPathFeature(
const DtPoint& location,
double offset = 0.5);
260 std::auto_ptr<DtPathFeatureSet> paths()
const;
276 const DtPoint& startingLocation,
277 const double& searchRadius,
278 bool* dataAvailable = NULL);
280 std::string label()
const;
285 void addFeatureToGraph(
287 bool joinToIntersectingEdges,
288 const boost::optional<DtFeatureGeometry>& searchArea = boost::none_t());
290 void addFeatureToGraph(
292 const boost::optional<DtFeatureGeometry>& searchArea = boost::none_t());
296 bool loadTile(
const DtPoint& localLocation,
double timeout = 0);
298 bool loadTileAndBlock(
300 bool loadTileAndBlock(
305 std::auto_ptr<DtFeatureSet> input,
324 struct GridTile :
public boost::enable_shared_from_this<GridTile>
326 typedef boost::shared_ptr<GridTile>
Ptr;
333 size_t operator()(
const EdgeRecord& edge)
const;
368 bool loaded(
double timeout)
const;
378 typedef tbb::queuing_rw_mutex
Mutex;
383 boost::shared_ptr<GridTile> subtiles[2][2];
401 template <
typename T>
420 for (
size_t i=0; i !=
size; ++i)
432 while (index >=
size())
440 while (index >=
size())
461 template <
typename T>
473 template <
typename T>
497 const DtPoint& localDestination,
498 double maxSearchRadius,
499 double startProximityThreshold,
500 double stopProximityThreshold,