25 #ifndef __SHAPE_CIRCLE_H
26 #define __SHAPE_CIRCLE_H
34 SHAPE( SH_CIRCLE ), m_radius( 0 )
38 SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter )
43 m_radius( aOther.m_radius ),
44 m_center( aOther.m_center )
55 const BOX2I BBox(
int aClearance = 0 )
const override
57 const VECTOR2I rc( m_radius + aClearance, m_radius + aClearance );
59 return BOX2I( m_center - rc, rc * 2 );
62 bool Collide(
const SEG& aSeg,
int aClearance = 0 )
const override
64 int rc = aClearance + m_radius;
66 return aSeg.
Distance( m_center ) < rc;
69 void SetRadius(
int aRadius )
74 void SetCenter(
const VECTOR2I& aCenter )
89 void Move(
const VECTOR2I& aVector )
override
94 bool IsSolid()
const override