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;
146 #endif // _CONTAINER_2D_H_ CONST_LIST_OBJECT2D m_LeafList
Store the list of objects if that node is a Leaf.
std::list< const OBJECT_2D * > CONST_LIST_OBJECT2D
bool IntersectAny(const RAYSEG2D &aSegRay) const override
Intersect and check if a segment ray hits a object or is inside it.
bool IntersectAny(const RAYSEG2D &aSegRay) const override
Intersect and check if a segment ray hits a object or is inside it.
void recursiveBuild_MIDDLE_SPLIT(BVH_CONTAINER_NODE_2D *aNodeParent)
CONTAINER_2D_BASE(OBJECT_2D_TYPE aObjType)
std::list< BVH_CONTAINER_NODE_2D * > m_elementsToDelete
bool recursiveIntersectAny(const BVH_CONTAINER_NODE_2D *aNode, const RAYSEG2D &aSegRay) const
const LIST_OBJECT2D & GetList() const
void Add(OBJECT_2D *aObject)
BVH_CONTAINER_NODE_2D * m_Children[2]
void GetListObjectsIntersects(const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const override
Get a list of objects that intersects a bounding box.
const BBOX_2D & GetBBox() const
Manage a bounding box defined by two SFVEC2F min max points.
BVH_CONTAINER_NODE_2D * m_tree
virtual bool IntersectAny(const RAYSEG2D &aSegRay) const =0
Intersect and check if a segment ray hits a object or is inside it.
void Union(const SFVEC2F &aPoint)
Recalculate the bounding box adding a point.
const BBOX_2D & GetBBox() const
void GetListObjectsIntersects(const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const override
Get a list of objects that intersects a bounding box.
std::list< OBJECT_2D * > LIST_OBJECT2D
virtual ~CONTAINER_2D_BASE()
void recursiveGetListObjectsIntersects(const BVH_CONTAINER_NODE_2D *aNode, const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const
virtual void GetListObjectsIntersects(const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const =0
Get a list of objects that intersects a bounding box.