29#ifndef _CONTAINER_2D_H_
30#define _CONTAINER_2D_H_
32#include "../shapes2D/object_2d.h"
53 std::lock_guard<std::mutex> lock(
m_lock );
124 void Clear()
override;
void GetIntersectingObjects(const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const override
Get a list of objects that intersects a bounding box.
BVH_CONTAINER_NODE_2D * m_tree
void recursiveGetListObjectsIntersects(const BVH_CONTAINER_NODE_2D *aNode, const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const
void recursiveBuild_MIDDLE_SPLIT(BVH_CONTAINER_NODE_2D *aNodeParent)
bool recursiveIntersectAny(const BVH_CONTAINER_NODE_2D *aNode, const RAYSEG2D &aSegRay) const
bool IntersectAny(const RAYSEG2D &aSegRay) const override
Intersect and check if a segment ray hits a object or is inside it.
std::list< BVH_CONTAINER_NODE_2D * > m_elementsToDelete
virtual void GetIntersectingObjects(const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const =0
Get a list of objects that intersects a bounding box.
const BBOX_2D & GetBBox() const
virtual ~CONTAINER_2D_BASE()
void Add(OBJECT_2D *aObject)
const LIST_OBJECT2D & GetList() const
virtual bool IntersectAny(const RAYSEG2D &aSegRay) const =0
Intersect and check if a segment ray hits a object or is inside it.
void GetIntersectingObjects(const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const override
Get a list of objects that intersects a bounding box.
bool IntersectAny(const RAYSEG2D &aSegRay) const override
Intersect and check if a segment ray hits a object or is inside it.
const BBOX_2D & GetBBox() const
std::list< OBJECT_2D * > LIST_OBJECT2D
std::list< const OBJECT_2D * > CONST_LIST_OBJECT2D
Manage a bounding box defined by two SFVEC2F min max points.
void Union(const SFVEC2F &aPoint)
Recalculate the bounding box adding a point.
CONST_LIST_OBJECT2D m_LeafList
Store the list of objects if that node is a Leaf.
BVH_CONTAINER_NODE_2D * m_Children[2]