24 #ifndef __SHAPE_SIMPLE_H
25 #define __SHAPE_SIMPLE_H
29 #include <geometry/shape.h>
30 #include <geometry/seg.h>
31 #include <geometry/shape_line_chain.h>
56 SHAPE( SH_SIMPLE ), m_points( aOther.m_points )
74 const BOX2I BBox(
int aClearance = 0 )
const override
76 return m_points.
BBox( aClearance );
101 return m_points.
Point( aIndex );
115 return m_points.
CPoint( aIndex );
169 bool Collide(
const SEG& aSeg,
int aClearance = 0 )
const override
171 return m_points.
Collide( aSeg, aClearance );
174 void Move(
const VECTOR2I& aVector )
override
176 m_points.Move( aVector );
179 bool IsSolid()
const override
189 #endif // __SHAPE_SIMPLE_H
void Append(const VECTOR2I &aP)
Function Append()
Definition: shape_simple.h:163
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
Definition: shape_line_chain.h:346
void Clear()
Function Clear() Removes all points from the line chain.
Definition: shape_line_chain.h:137
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
Definition: shape_simple.h:113
Class SHAPE_SIMPLE.
Definition: shape_simple.h:42
VECTOR2I & Point(int aIndex)
Function Point()
Definition: shape_line_chain.h:238
int PointCount() const
Function PointCount()
Definition: shape_simple.h:85
void SetClosed(bool aClosed)
Function SetClosed()
Definition: shape_line_chain.h:150
const BOX2I BBox(int aClearance=0) const override
Function BBox()
Definition: shape_simple.h:74
const BOX2I BBox(int aClearance=0) const override
Function BBox()
Definition: shape_line_chain.h:280
const SHAPE_LINE_CHAIN & Vertices() const
Function Vertices()
Definition: shape_simple.h:139
void Clear()
Function Clear() Removes all points from the polygon.
Definition: shape_simple.h:68
VECTOR2I & Point(int aIndex)
Function Point()
Definition: shape_simple.h:99
const VECTOR2D CDPoint(int aIndex) const
Function CDPoint()
Definition: shape_simple.h:126
int PointCount() const
Function PointCount()
Definition: shape_line_chain.h:186
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
Definition: shape_line_chain.h:253
void Append(int aX, int aY)
Function Append()
Definition: shape_simple.h:151
SHAPE * Clone() const override
Function Clone()
Definition: shape_simple.h:59
bool Collide(const SEG &aSeg, int aClearance=0) const override
Function Collide()
Definition: shape_simple.h:169
Class SHAPE_LINE_CHAIN.
Definition: shape_line_chain.h:47
Class SHAPE.
Definition: shape.h:58
bool Collide(const VECTOR2I &aP, int aClearance=0) const override
Function Collide()
Definition: shape_line_chain.cpp:31
SHAPE_SIMPLE()
Constructor Creates an empty polygon.
Definition: shape_simple.h:49