24 #ifndef __SHAPE_SIMPLE_H 25 #define __SHAPE_SIMPLE_H 82 const BOX2I BBox(
int aClearance = 0 )
const override 163 bool Collide(
const SEG& aSeg,
int aClearance = 0,
int* aActual =
nullptr,
164 VECTOR2I* aLocation =
nullptr )
const override 199 #endif // __SHAPE_SIMPLE_H virtual const SEG GetSegment(int aIndex) const override
bool IsClosed() const override
bool Collide(const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the point aP than aClearance,...
const VECTOR2I & CPoint(int aIndex) const
Function Point()
virtual const VECTOR2I GetPoint(int aIndex) const override
void Move(const VECTOR2I &aVector) override
virtual size_t GetPointCount() const override
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
int PointCount() const
Function PointCount()
void Append(const VECTOR2I &aP)
Function Append()
SHAPE * Clone() const override
Return a dynamically allocated copy of the shape.
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
virtual bool Collide(const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if point aP lies closer to us than aClearance.
const VECTOR2I & CPoint(int aIndex) const
Function Point()
void SetClosed(bool aClosed)
Function SetClosed()
const VECTOR2D CDPoint(int aIndex) const
Function CDPoint()
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
VECTOR2< double > VECTOR2D
SHAPE_SIMPLE(const SHAPE_SIMPLE &aOther)
void Rotate(double aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
const SHAPE_LINE_CHAIN & Vertices() const
Function Vertices()
SHAPE_SIMPLE()
Constructor Creates an empty polygon.
An abstract shape on 2D plane.
int SegmentCount() const
Function SegmentCount()
bool IsSolid() const override
void Clear()
Function Clear() Removes all points from the polygon.
void Rotate(double aAngle, const VECTOR2I &aCenter=VECTOR2I(0, 0)) override
Function Rotate rotates all vertices by a given angle.
virtual size_t GetSegmentCount() const override
SHAPE_LINE_CHAIN m_points
const SEG CSegment(int aIndex) const
Function CSegment()
int PointCount() const
Function PointCount()
void Clear()
Function Clear() Removes all points from the line chain.
SHAPE_SIMPLE(const SHAPE_LINE_CHAIN &aPoly)
void Append(int aX, int aY)
Function Append()
void Move(const VECTOR2I &aVector) override