15 QuadTree(
const double x0,
const double y0,
const double hx,
const double hy);
28 const double y)
const;
49 std::vector<std::tuple<float, float, int> >
nodes;
QuadTree(const double x0, const double y0, const double hx, const double hy)
Constructor.
bool DoesBoxOverlap(const double bb[4]) const
static std::vector< int > emptyBlock
void InsertMeshElement(const double bb[4], const int index)
Insert a mesh element with given bounding box and index to the tree.
int GetQuadrant(const double x, const double y) const
void InsertMeshNode(const double x, const double y, const int index)
Insert a mesh node (a vertex/point) to the tree.
const QuadTree * GetBlockFromPointHelper(const double x, const double y) const
std::vector< std::tuple< float, float, int > > nodes
static const size_t BlockCapacity
std::vector< int > elements
const QuadTree * GetBlockFromPoint(const double x, const double y) const
const std::vector< int > & GetElementsInBlock(const double x, const double y) const
Get all elements linked to a block corresponding to the given point.