5 #include <boost/geometry.hpp> 6 #include <boost/geometry/geometries/point.hpp> 7 #include <boost/geometry/geometries/segment.hpp> 8 #include <boost/geometry/index/rtree.hpp> 19 namespace bg = boost::geometry;
20 namespace bgm = boost::geometry::model;
21 namespace bgi = boost::geometry::index;
24 typedef bgm::point<double, 3, bg::cs::cartesian>
Point;
26 typedef bg::model::box<Point>
Box;
32 typedef bgi::rtree<PointValue, bgi::rstar<16> >
PointRTree;
35 typedef bgi::rtree<BoxValue, bgi::rstar<16> >
BoxRTree;
45 typedef bgm::point<double, 2, bg::cs::cartesian>
Point2d;
47 typedef bg::model::box<Point2d>
Box2d;
56 typedef bgi::rtree<Box2dValue, bgi::rstar<16> >
Box2dRTree;
58 LX_GEOM_EXPORT
Box2d getBox2d(
const double& minx,
const double& miny,
const double& maxx,
const double& maxy);
62 LX_GEOM_EXPORT
Box2dValue getBox2dValue(
const double& minx,
const double& miny,
const double& maxx,
const double& maxy, uintptr_t userData);
77 BoxRTree(
const std::vector<Value>& values);
81 void insert(
const Bnd_Box& bbox, uintptr_t userData);
82 void insert(
const Value& value);
83 bool remove(
const Bnd_Box& bbox, uintptr_t userData);
84 bool remove(
const Value& value);
86 void queryIntersects(
const Bnd_Box& bbox, std::vector<uintptr_t>& userDataVec)
const;
107 void insert(
const Bnd_Box& bbox, uintptr_t userData);
108 void insert(
const Value& value);
109 bool remove(
const Bnd_Box& bbox, uintptr_t userData);
110 bool remove(
const Value& value);
112 void queryIntersects(
const Bnd_Box& bbox, std::vector<uintptr_t>& userDataVec)
const;
113 void queryIntersects(
const RTree::Box2d& bbox, std::vector<uintptr_t>& userDataVec)
const;
114 bool hasIntersection(
const Bnd_Box& bbox)
const;
bgm::point< double, 2, bg::cs::cartesian > Point2d
Definition: RTree.h:45
LX_GEOM_EXPORT Point getPoint(const Geom::Pnt &p)
std::pair< Point, uintptr_t > PointValue
Definition: RTree.h:31
LX_GEOM_EXPORT Box2d getBox2d(const double &minx, const double &miny, const double &maxx, const double &maxy)
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:43
LX_GEOM_EXPORT Box getBox(const Geom::Pnt &p, const double &radius)
bgi::rtree< BoxValue, bgi::rstar< 16 > > BoxRTree
Definition: RTree.h:35
LX_GEOM_EXPORT PointValue getPointValue(const Geom::Pnt &p, uintptr_t userData)
LX_GEOM_EXPORT BoxValue getBoxValue(const Bnd_Box &bbox, uintptr_t userData)
uintptr_t userData
Definition: RTree.h:73
LX_GEOM_EXPORT Box2dValue getBox2dValue(const double &minx, const double &miny, const double &maxx, const double &maxy, uintptr_t userData)
std::pair< Segment, uintptr_t > SegmentValue
Definition: RTree.h:28
bgi::rtree< Box2dValue, bgi::rstar< 16 > > Box2dRTree
Definition: RTree.h:56
std::pair< Segment2d, uintptr_t > Segment2dValue
Definition: RTree.h:49
uintptr_t userData
Definition: RTree.h:99
bg::model::box< Point2d > Box2d
Definition: RTree.h:47
bgi::rtree< Point2dValue, bgi::rstar< 16 > > Point2dRTree
Definition: RTree.h:53
bg::model::box< Point > Box
Definition: RTree.h:26
bgi::rtree< Segment2dValue, bgi::rstar< 16 > > Segment2dRTree
Definition: RTree.h:50
bgm::segment< Point > Segment
Definition: RTree.h:25
bgm::segment< Point2d > Segment2d
Definition: RTree.h:46
bgi::rtree< SegmentValue, bgi::rstar< 16 > > SegmentRTree
Definition: RTree.h:29
bgm::point< double, 3, bg::cs::cartesian > Point
Definition: RTree.h:24
Geom::Bnd_Box bbox
Definition: RTree.h:98
std::pair< Point2d, uintptr_t > Point2dValue
Definition: RTree.h:52
Geom::Bnd_Box bbox
Definition: RTree.h:72
Defines a non-persistent 2D cartesian point.
Definition: Pnt2d.h:33
bgi::rtree< PointValue, bgi::rstar< 16 > > PointRTree
Definition: RTree.h:32
std::pair< Box2d, uintptr_t > Box2dValue
Definition: RTree.h:55
std::pair< Box, uintptr_t > BoxValue
Definition: RTree.h:34