Defines the Node class for quadtree spatial partitioning in 2D space.
Represents a 2D axis-aligned bounding box.
Represents a node in a quadtree structure for spatial partitioning.
Represents a quadtree for spatial partitioning of 2D entities.
~QuadTree()
Destructor for the QuadTree class.
Node root
Root node of the quadtree.
BoundingBox2D bbox
Bounding box representing the spatial extent of the quadtree.
Node * Intersect(Node *node, const Vector2D &p)
Recursively finds the node intersecting with a given point.
bool Insert(Triangle2D *triangle)
Inserts a triangle entity into the quadtree.
uint16_t count
Current count of entities in the quadtree.
void Rebuild()
Rebuilds the quadtree, recalculating all spatial partitions.
Represents a 2D triangle with support for UV mapping, depth, and intersection testing.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.