OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
QuadTree.h
Go to the documentation of this file.
1#ifndef MSLANG_QUADTREE_H
2#define MSLANG_QUADTREE_H
3
4#include "Utilities/MSLang.h"
5
6#include <memory>
7
8namespace mslang {
9 struct QuadTree {
11 std::list<std::shared_ptr<Base> > objects_m;
13 std::vector<std::shared_ptr<QuadTree> > nodes_m;
14
16 level_m(0),
17 bb_m(),
18 nodes_m()
19 { }
20
21 QuadTree(int l, const BoundingBox2D &b):
22 level_m(l),
23 bb_m(b),
24 nodes_m()
25 { }
26
27 QuadTree(const QuadTree &right);
28
29 ~QuadTree();
30
31 void reset();
32
33 void operator=(const QuadTree &right);
34
35 void transferIfInside(std::list<std::shared_ptr<Base> > &objs);
36 void buildUp();
37
38 void writeGnuplot(std::ostream &out) const;
39
40 bool isInside(const Vector_t &R) const;
41
42 void getDepth(unsigned int &d) const;
43 };
44}
45
46#endif
void getDepth(unsigned int &d) const
Definition: QuadTree.cpp:124
std::vector< std::shared_ptr< QuadTree > > nodes_m
Definition: QuadTree.h:13
void writeGnuplot(std::ostream &out) const
Definition: QuadTree.cpp:91
void transferIfInside(std::list< std::shared_ptr< Base > > &objs)
Definition: QuadTree.cpp:48
void operator=(const QuadTree &right)
Definition: QuadTree.cpp:32
bool isInside(const Vector_t &R) const
Definition: QuadTree.cpp:104
BoundingBox2D bb_m
Definition: QuadTree.h:12
QuadTree(int l, const BoundingBox2D &b)
Definition: QuadTree.h:21
std::list< std::shared_ptr< Base > > objects_m
Definition: QuadTree.h:11