124 memset(
m_counter, 0,
sizeof(
unsigned int ) *
static_cast<int>( OBJECT_2D_TYPE::MAX ) );
129 return m_counter[
static_cast<int>( aObjType )];
134 m_counter[
static_cast<int>( aObjType )]++;
151 unsigned int m_counter[
static_cast<int>( OBJECT_2D_TYPE::MAX )];
2D bounding box class definition.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
void AddOne(OBJECT_2D_TYPE aObjType)
static OBJECT_2D_STATS * s_instance
unsigned int GetCountOf(OBJECT_2D_TYPE aObjType) const
unsigned int m_counter[static_cast< int >(OBJECT_2D_TYPE::MAX)]
static OBJECT_2D_STATS & Instance()
OBJECT_2D_STATS(const OBJECT_2D_STATS &old)
const OBJECT_2D_STATS & operator=(const OBJECT_2D_STATS &old)
virtual bool Intersects(const BBOX_2D &aBBox) const =0
a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅)
const SFVEC2F & GetCentroid() const
virtual INTERSECTION_RESULT IsBBoxInside(const BBOX_2D &aBBox) const =0
Test this object if it's completely outside, intersects, or is completely inside aBBox.
virtual bool Overlaps(const BBOX_2D &aBBox) const =0
Test if the box overlaps the object.
const BBOX_2D & GetBBox() const
virtual bool Intersect(const RAYSEG2D &aSegRay, float *aOutT, SFVEC2F *aNormalOut) const =0
OBJECT_2D_TYPE m_obj_type
const BOARD_ITEM & m_boardItem
const BOARD_ITEM & GetBoardItem() const
OBJECT_2D_TYPE GetObjectType() const
virtual bool IsPointInside(const SFVEC2F &aPoint) const =0
Manage a bounding box defined by two SFVEC2F min max points.