KiCad PCB EDA Suite
CGENERICCONTAINER2D Class Referenceabstract

#include <ccontainer2d.h>

Inheritance diagram for CGENERICCONTAINER2D:
CBVHCONTAINER2D CCONTAINER2D

Public Member Functions

 CGENERICCONTAINER2D (OBJECT2D_TYPE aObjType)
 
virtual ~CGENERICCONTAINER2D ()
 
void Add (COBJECT2D *aObject)
 
void Clear ()
 
const LIST_OBJECT2DGetList () const
 
virtual void GetListObjectsIntersects (const CBBOX2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const =0
 GetListObjectsIntersects - Get a list of objects that intersects a bbox. More...
 

Protected Attributes

CBBOX2D m_bbox
 
LIST_OBJECT2D m_objects
 

Detailed Description

Definition at line 40 of file ccontainer2d.h.

Constructor & Destructor Documentation

CGENERICCONTAINER2D::CGENERICCONTAINER2D ( OBJECT2D_TYPE  aObjType)
explicit

Definition at line 41 of file ccontainer2d.cpp.

References m_bbox, and CBBOX2D::Reset().

42 {
43  m_bbox.Reset();
44 }
void Reset()
Function Reset reset the bounding box to zero and de-initialized it.
Definition: cbbox2d.cpp:88
CGENERICCONTAINER2D::~CGENERICCONTAINER2D ( )
virtual

Definition at line 63 of file ccontainer2d.cpp.

References Clear().

64 {
65  Clear();
66 }

Member Function Documentation

void CGENERICCONTAINER2D::Clear ( )

Definition at line 47 of file ccontainer2d.cpp.

References m_bbox, m_objects, and CBBOX2D::Reset().

Referenced by CINFO3D_VISU::CINFO3D_VISU(), CINFO3D_VISU::destroyLayers(), C3D_RENDER_RAYTRACING::reload(), and ~CGENERICCONTAINER2D().

48 {
49  m_bbox.Reset();
50 
51  for( LIST_OBJECT2D::iterator ii = m_objects.begin();
52  ii != m_objects.end();
53  ++ii )
54  {
55  delete *ii;
56  *ii = NULL;
57  }
58 
59  m_objects.clear();
60 }
void Reset()
Function Reset reset the bounding box to zero and de-initialized it.
Definition: cbbox2d.cpp:88
LIST_OBJECT2D m_objects
Definition: ccontainer2d.h:44
const LIST_OBJECT2D& CGENERICCONTAINER2D::GetList ( ) const
inline
virtual void CGENERICCONTAINER2D::GetListObjectsIntersects ( const CBBOX2D aBBox,
CONST_LIST_OBJECT2D aOutList 
) const
pure virtual

GetListObjectsIntersects - Get a list of objects that intersects a bbox.

Parameters
aBBox- a bbox to make the query
aOutList- A list of objects that intersects the bbox

Implemented in CBVHCONTAINER2D, and CCONTAINER2D.

Member Data Documentation

CBBOX2D CGENERICCONTAINER2D::m_bbox
protected
LIST_OBJECT2D CGENERICCONTAINER2D::m_objects
protected

Definition at line 44 of file ccontainer2d.h.

Referenced by CBVHCONTAINER2D::BuildBVH(), Clear(), and GetList().


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