24#ifndef __SHAPE_SIMPLE_H 
   25#define __SHAPE_SIMPLE_H 
   78    const BOX2I BBox( 
int aClearance = 0 )
 const override 
 
  152    bool Collide( 
const SEG& aSeg, 
int aClearance = 0, 
int* aActual = 
nullptr,
 
  153                  VECTOR2I* aLocation = 
nullptr )
 const override 
  155        return m_points.Collide( aSeg, aClearance, aActual, aLocation );
 
 
 
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
 
SHAPE_LINE_CHAIN_BASE(SHAPE_TYPE aType)
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
Rotate all vertices by a given angle.
 
Represent a set of closed polygons.
 
void Clear()
Remove all points from the polygon.
 
const SHAPE_LINE_CHAIN & Vertices() const
Return the list of vertices defining this simple polygon.
 
virtual const SEG GetSegment(int aIndex) const override
 
virtual const VECTOR2I GetPoint(int aIndex) const override
 
void Append(int aX, int aY)
Append a new point at the end of the polygon.
 
SHAPE * Clone() const override
Return a dynamically allocated copy of the shape.
 
SHAPE_LINE_CHAIN m_points
 
bool IsSolid() const override
 
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
 
void TransformToPolygon(SHAPE_POLY_SET &aBuffer, int aError, ERROR_LOC aErrorLoc) const override
Fills a SHAPE_POLY_SET with a polygon representation of this shape.
 
SHAPE_SIMPLE(const SHAPE_SIMPLE &aOther)
 
const VECTOR2I & CPoint(int aIndex) const
Return a const reference to a given point in the polygon.
 
int PointCount() const
Return the number of points (vertices) in this polygon.
 
void Move(const VECTOR2I &aVector) override
 
SHAPE_SIMPLE(const SHAPE_LINE_CHAIN &aPoly)
 
void Append(const VECTOR2I &aP)
Append a new point at the end of the polygon.
 
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,...
 
bool IsClosed() const override
 
virtual size_t GetSegmentCount() const override
 
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
 
virtual size_t GetPointCount() const override
 
const VECTOR2D CDPoint(int aIndex) const
Return a given point as a vector with elements of type double.
 
SHAPE_SIMPLE()
Create an empty polygon.
 
SHAPE(SHAPE_TYPE aType)
Create an empty shape of type aType.
 
@ SH_SIMPLE
simple polygon
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D