OPAL (Object Oriented Parallel Accelerator Library) 2024.2
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 <list>
7#include <memory>
8#include <ostream>
9#include <vector>
10
11namespace mslang {
12 struct QuadTree {
14 std::list<std::shared_ptr<Base> > objects_m;
16 std::vector<std::shared_ptr<QuadTree> > nodes_m;
17
19 level_m(0),
20 bb_m(),
21 nodes_m()
22 { }
23
24 QuadTree(int l, const BoundingBox2D &b):
25 level_m(l),
26 bb_m(b),
27 nodes_m()
28 { }
29
30 QuadTree(const QuadTree &right);
31
32 ~QuadTree();
33
34 void reset();
35
36 void operator=(const QuadTree &right);
37
38 void transferIfInside(std::list<std::shared_ptr<Base> > &objs);
39 void buildUp();
40
41 void writeGnuplot(std::ostream &out) const;
42
43 bool isInside(const Vector_t &R) const;
44
45 void getDepth(unsigned int &d) const;
46 };
47}
48
49#endif
void getDepth(unsigned int &d) const
Definition QuadTree.cpp:129
std::vector< std::shared_ptr< QuadTree > > nodes_m
Definition QuadTree.h:16
void writeGnuplot(std::ostream &out) const
Definition QuadTree.cpp:96
void transferIfInside(std::list< std::shared_ptr< Base > > &objs)
Definition QuadTree.cpp:53
void operator=(const QuadTree &right)
Definition QuadTree.cpp:37
bool isInside(const Vector_t &R) const
Definition QuadTree.cpp:109
BoundingBox2D bb_m
Definition QuadTree.h:15
QuadTree(int l, const BoundingBox2D &b)
Definition QuadTree.h:24
std::list< std::shared_ptr< Base > > objects_m
Definition QuadTree.h:14