11 #include <concurrent_vector.h> 13 #include <tbb/spin_mutex.h> 20 float x()
const {
return vec[0]; }
21 float y()
const {
return vec[1]; }
22 float z()
const {
return vec[2]; }
33 bool operator==(
const QuadTreeIterator& b)
const {
return (b._current == _current); }
67 void clear() { mData.clear(); };
68 bool empty()
const {
return mData.empty(); };
89 const std::deque<Geom::ColorPoint>& getPoints()
const;
90 const bool hasPoints()
const;
91 const size_t getPointCount()
const;
92 std::vector<QuadTree*> getChildren()
const;
94 void getPointsRecursive(std::deque<Geom::ColorPoint>& points);
95 const size_t getPointCountRecursive()
const;
96 std::vector<QuadTree*> getChildrenRecursive()
const;
97 void removePointsRecursive();
99 void setAutoSplit(
bool on);
101 void setDeep(
int deep);
116 void getDeep(
int& deep);
142 using container = concurrency::concurrent_vector<ColorPoint>;
154 bool empty()
const {
return mData.empty(); };
174 bool insert(
const FloatPoint& fp,
const uint32_t color );
177 std::vector<FloatPoint> getPoints()
const;
178 std::vector<uint32_t> getColors()
const;
179 const bool hasPoints()
const;
180 const size_t getPointCount()
const;
181 std::vector<QuadTreeMT*> getChildren()
const;
183 const size_t getPointCountRecursive()
const;
184 std::vector<QuadTreeMT*> getChildrenRecursive()
const;
185 void removePointsRecursive();
189 void setDeep(
int deep);
202 void getDeep(
int& deep);
218 concurrency::concurrent_vector<FloatPoint> _points;
219 concurrency::concurrent_vector<uint32_t> _colors;
iterator end()
Definition: QuadTree.h:61
void clear()
Definition: QuadTree.h:67
Base::MColor c
Definition: QuadTree.h:48
QuadTree * northEast
Definition: QuadTree.h:107
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:43
float y() const
Definition: QuadTree.h:21
std::deque< ColorPoint > container
Definition: QuadTree.h:55
QuadTreeMT * northEast
Definition: QuadTree.h:195
void addPoint(const ColorPoint &p)
Definition: QuadTree.h:151
Definition: QuadTree.h:52
Definition: QuadTree.h:29
const container & getData() const
Definition: QuadTree.h:156
typename container::const_iterator const_iterator
Definition: QuadTree.h:144
QuadTree * southWest
Definition: QuadTree.h:108
ColorPoint()
Definition: QuadTree.h:45
iterator begin()
Definition: QuadTree.h:60
Definition: QuadTree.h:15
const_iterator cbegin() const
Definition: QuadTree.h:148
typename container::iterator iterator
Definition: QuadTree.h:56
QuadTreeMT * southWest
Definition: QuadTree.h:196
void addPoint(const ColorPoint &p)
Definition: QuadTree.h:59
bool empty() const
Definition: QuadTree.h:68
FloatPoint(float x, float y, float z)
Definition: QuadTree.h:18
Definition: QuadTree.h:166
const_iterator cbegin() const
Definition: QuadTree.h:64
const container & getData() const
Definition: QuadTree.h:70
Geom::Bnd_Box getBBox()
Definition: QuadTree.h:188
QuadTree * southEast
Definition: QuadTree.h:109
QuadTreeMT * northWest
Definition: QuadTree.h:194
float x() const
Definition: QuadTree.h:20
FloatPoint(const float v[3])
Definition: QuadTree.h:17
const_iterator begin() const
Definition: QuadTree.h:146
const_iterator cend() const
Definition: QuadTree.h:149
QuadTree * northWest
Definition: QuadTree.h:106
QuadTreeMT * southEast
Definition: QuadTree.h:197
bool empty() const
Definition: QuadTree.h:154
void clear()
Definition: QuadTree.h:153
const_iterator end() const
Definition: QuadTree.h:147
Definition: QuadTree.h:80
const_iterator cend() const
Definition: QuadTree.h:65
float vec[3]
Definition: QuadTree.h:19
const_iterator begin() const
Definition: QuadTree.h:62
typename container::const_iterator const_iterator
Definition: QuadTree.h:57
typename container::iterator iterator
Definition: QuadTree.h:143
const_iterator end() const
Definition: QuadTree.h:63
concurrency::concurrent_vector< ColorPoint > container
Definition: QuadTree.h:142
Definition: QuadTree.h:42
void setBBox(Geom::Bnd_Box b)
Definition: QuadTree.h:187
float z() const
Definition: QuadTree.h:22
Definition: QuadTree.h:139