28 #include <geometry/shape.h>
29 #include <geometry/seg.h>
37 SHAPE( SH_ARC ), m_centralAngle( 0.0 ), m_width( 0 ) {};
40 double aCenterAngle,
int aWidth = 0 ) :
41 SHAPE( SH_ARC ), m_p0( aArcStartPoint ), m_pc( aArcCenter ), m_centralAngle( aCenterAngle ),
51 m_centralAngle = aOther.m_centralAngle;
52 m_width = aOther.m_width;
62 const VECTOR2I& GetP0()
const {
return m_p0; }
64 const VECTOR2I& GetCenter()
const {
return m_pc; }
66 const BOX2I BBox(
int aClearance = 0 )
const override;
68 bool Collide(
const SEG& aSeg,
int aClearance = 0 )
const override;
71 void SetWidth(
int aWidth )
81 bool IsSolid()
const override
86 void Move(
const VECTOR2I& aVector )
override
92 int GetRadius()
const;
96 return SEG( m_p0, GetP1() );
99 double GetCentralAngle()
const;
100 double GetStartAngle()
const;
101 double GetEndAngle()
const;
131 return (ecoord) ( aC.y - aA.y ) * ( aB.x - aA.x ) >
132 (ecoord) ( aB.y - aA.y ) * ( aC.x - aA.x );
137 double m_centralAngle;
Definition: shape_arc.h:34
const BOX2I BBox(int aClearance=0) const override
Function BBox()
Definition: shape_arc.cpp:154
SHAPE * Clone() const override
Function Clone()
Definition: shape_arc.h:57
bool Collide(const SEG &aSeg, int aClearance=0) const override
Function Collide()
Definition: shape_arc.cpp:32
const SHAPE_LINE_CHAIN ConvertToPolyline(double aAccuracy=500.0) const
Constructs a SHAPE_LINE_CHAIN of segments from a given arc.
Definition: shape_arc.cpp:240
Class SHAPE_LINE_CHAIN.
Definition: shape_line_chain.h:50
Class SHAPE.
Definition: shape.h:59
SHAPE(SHAPE_TYPE aType)
Constructor.
Definition: shape.h:70