KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CONTAINER_2D_BASE Class Referenceabstract

#include <container_2d.h>

Inheritance diagram for CONTAINER_2D_BASE:
BVH_CONTAINER_2D CONTAINER_2D

Public Member Functions

 CONTAINER_2D_BASE (OBJECT_2D_TYPE aObjType)
 
virtual ~CONTAINER_2D_BASE ()
 
void Add (OBJECT_2D *aObject)
 
const BBOX_2DGetBBox () const
 
virtual void Clear ()
 
const LIST_OBJECT2DGetList () const
 
virtual void GetIntersectingObjects (const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const =0
 Get a list of objects that intersects a bounding box.
 
virtual bool IntersectAny (const RAYSEG2D &aSegRay) const =0
 Intersect and check if a segment ray hits a object or is inside it.
 

Protected Attributes

BBOX_2D m_bbox
 
LIST_OBJECT2D m_objects
 

Private Attributes

std::mutex m_lock
 

Detailed Description

Definition at line 42 of file container_2d.h.

Constructor & Destructor Documentation

◆ CONTAINER_2D_BASE()

CONTAINER_2D_BASE::CONTAINER_2D_BASE ( OBJECT_2D_TYPE  aObjType)
explicit

Definition at line 36 of file container_2d.cpp.

References m_bbox, and BBOX_2D::Reset().

◆ ~CONTAINER_2D_BASE()

CONTAINER_2D_BASE::~CONTAINER_2D_BASE ( )
virtual

Definition at line 56 of file container_2d.cpp.

References Clear().

Member Function Documentation

◆ Add()

◆ Clear()

void CONTAINER_2D_BASE::Clear ( )
virtual

◆ GetBBox()

const BBOX_2D & CONTAINER_2D_BASE::GetBBox ( ) const
inline

Definition at line 59 of file container_2d.h.

References m_bbox.

◆ GetIntersectingObjects()

virtual void CONTAINER_2D_BASE::GetIntersectingObjects ( const BBOX_2D aBBox,
CONST_LIST_OBJECT2D aOutList 
) const
pure virtual

Get a list of objects that intersects a bounding box.

Parameters
aBBoxThe bounding box to test.
aOutListThe list of objects that intersects the bounding box.

Implemented in CONTAINER_2D, and BVH_CONTAINER_2D.

◆ GetList()

◆ IntersectAny()

virtual bool CONTAINER_2D_BASE::IntersectAny ( const RAYSEG2D aSegRay) const
pure virtual

Intersect and check if a segment ray hits a object or is inside it.

Parameters
aSegRayThe segment to intersect with objects.
Returns
true if it hits any of the objects or is inside any object.

Implemented in CONTAINER_2D, and BVH_CONTAINER_2D.

Member Data Documentation

◆ m_bbox

BBOX_2D CONTAINER_2D_BASE::m_bbox
protected

◆ m_lock

std::mutex CONTAINER_2D_BASE::m_lock
private

Definition at line 90 of file container_2d.h.

Referenced by Add(), and Clear().

◆ m_objects

LIST_OBJECT2D CONTAINER_2D_BASE::m_objects
protected

Definition at line 87 of file container_2d.h.

Referenced by Add(), BVH_CONTAINER_2D::BuildBVH(), Clear(), and GetList().


The documentation for this class was generated from the following files: