1#ifndef TETRAHEDRAL_TREE_H
2#define TETRAHEDRAL_TREE_H
12 float x = 0.,
y = 0.,
z = 0.;
15 Vec3(
float _x,
float _y,
float _z) :
x(_x),
y(_y),
z(_z) {}
93 std::vector<std::pair<Vec3, int> > nodes;
94 std::vector<int> elements;
96 static const size_t BlockCapacity = 10;
99 bool DoesBoxOverlap(
const double bb[6])
const;
101 int GetOctantContainingPoint(
const Vec3& point)
const;
104 bool IsLeafNode()
const;
Helper class for searches in field maps.
void InsertMeshElement(const double bb[6], const int index)
Insert a mesh element with given bounding box and index to the tree.
~TetrahedralTree()
Destructor.
std::vector< int > GetElementsInBlock(const Vec3 &point) const
Get all elements linked to a block corresponding to the given point.
void InsertMeshNode(Vec3 point, const int index)
Insert a mesh node (a vertex/point) to the tree.
Vec3(float _x, float _y, float _z)
Vec3 & operator+=(const Vec3 &r)
Vec3 & operator-=(const Vec3 &r)
Vec3 operator-(const Vec3 &r) const
Vec3 operator/(float r) const
Vec3 operator*(float r) const
Vec3 operator+(const Vec3 &r) const