|
| SHAPE_POLY_SET (const SHAPE_POLY_SET &aOther) |
| Copy constructor SHAPE_POLY_SET Performs a deep copy of aOther into this . More...
|
|
bool | GetRelativeIndices (int aGlobalIdx, VERTEX_INDEX *aRelativeIndices) const |
| Function GetRelativeIndices. More...
|
|
bool | GetGlobalIndex (VERTEX_INDEX aRelativeIndices, int &aGlobalIdx) |
| Function GetGlobalIndex computes the global index of a vertex from the relative indices of polygon, contour and vertex. More...
|
|
SHAPE * | Clone () const override |
| Function Clone() More...
|
|
int | NewOutline () |
|
Creates a new empty polygon in the set and returns its index
|
|
int | NewHole (int aOutline=-1) |
|
Creates a new hole in a given outline
|
|
int | AddOutline (const SHAPE_LINE_CHAIN &aOutline) |
|
Adds a new outline to the set and returns its index
|
|
int | AddHole (const SHAPE_LINE_CHAIN &aHole, int aOutline=-1) |
|
Adds a new hole to the given outline (default: last) and returns its index
|
|
int | Append (int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false) |
|
Appends a vertex at the end of the given outline/hole (default: the last outline)
More...
|
|
void | Append (const SHAPE_POLY_SET &aSet) |
|
Merges polygons from two sets.
|
|
void | Append (const VECTOR2I &aP, int aOutline=-1, int aHole=-1) |
|
Appends a vertex at the end of the given outline/hole (default: the last outline)
|
|
void | InsertVertex (int aGlobalIndex, VECTOR2I aNewVertex) |
| Function InsertVertex Adds a vertex in the globally indexed position aGlobalIndex. More...
|
|
VECTOR2I & | Vertex (int aIndex, int aOutline, int aHole) |
|
Returns the index-th vertex in a given hole outline within a given outline
|
|
const VECTOR2I & | CVertex (int aIndex, int aOutline, int aHole) const |
|
Returns the index-th vertex in a given hole outline within a given outline
|
|
VECTOR2I & | Vertex (int aGlobalIndex) |
|
Returns the aGlobalIndex-th vertex in the poly set
|
|
const VECTOR2I & | CVertex (int aGlobalIndex) const |
|
Returns the aGlobalIndex-th vertex in the poly set
|
|
VECTOR2I & | Vertex (VERTEX_INDEX aIndex) |
|
Returns the index-th vertex in a given hole outline within a given outline
|
|
const VECTOR2I & | CVertex (VERTEX_INDEX aIndex) const |
|
Returns the index-th vertex in a given hole outline within a given outline
|
|
bool | GetNeighbourIndexes (int aGlobalIndex, int *aPrevious, int *aNext) |
| Returns the global indexes of the previous and the next corner of the aGlobalIndex-th corner of a contour in the polygon set. More...
|
|
bool | IsPolygonSelfIntersecting (int aPolygonIndex) |
| Function IsPolygonSelfIntersecting. More...
|
|
bool | IsSelfIntersecting () |
| Function IsSelfIntersecting Checks whether any of the polygons in the set is self intersecting. More...
|
|
unsigned int | TriangulatedPolyCount () const |
|
Returns the number of triangulated polygons
|
|
int | OutlineCount () const |
|
Returns the number of outlines in the set
|
|
int | VertexCount (int aOutline=-1, int aHole=-1) const |
|
Returns the number of vertices in a given outline/hole
|
|
int | HoleCount (int aOutline) const |
|
Returns the number of holes in a given outline
|
|
SHAPE_LINE_CHAIN & | Outline (int aIndex) |
|
Returns the reference to aIndex-th outline in the set
|
|
SHAPE_POLY_SET | Subset (int aFirstPolygon, int aLastPolygon) |
| Function Subset returns a subset of the polygons in this set, the ones between aFirstPolygon and aLastPolygon. More...
|
|
SHAPE_POLY_SET | UnitSet (int aPolygonIndex) |
|
SHAPE_LINE_CHAIN & | Hole (int aOutline, int aHole) |
|
Returns the reference to aHole-th hole in the aIndex-th outline
|
|
POLYGON & | Polygon (int aIndex) |
|
Returns the aIndex-th subpolygon in the set
|
|
const POLYGON & | Polygon (int aIndex) const |
|
const TRIANGULATED_POLYGON * | TriangulatedPolygon (int aIndex) const |
|
const SHAPE_LINE_CHAIN & | COutline (int aIndex) const |
|
const SHAPE_LINE_CHAIN & | CHole (int aOutline, int aHole) const |
|
const POLYGON & | CPolygon (int aIndex) const |
|
ITERATOR | Iterate (int aFirst, int aLast, bool aIterateHoles=false) |
| Function Iterate returns an object to iterate through the points of the polygons between aFirst and aLast . More...
|
|
ITERATOR | Iterate (int aOutline) |
| Function Iterate. More...
|
|
ITERATOR | IterateWithHoles (int aOutline) |
| Function IterateWithHoles. More...
|
|
ITERATOR | Iterate () |
| Function Iterate. More...
|
|
ITERATOR | IterateWithHoles () |
| Function IterateWithHoles. More...
|
|
CONST_ITERATOR | CIterate (int aFirst, int aLast, bool aIterateHoles=false) const |
|
CONST_ITERATOR | CIterate (int aOutline) const |
|
CONST_ITERATOR | CIterateWithHoles (int aOutline) const |
|
CONST_ITERATOR | CIterate () const |
|
CONST_ITERATOR | CIterateWithHoles () const |
|
ITERATOR | IterateFromVertexWithHoles (int aGlobalIdx) |
|
SEGMENT_ITERATOR | IterateSegments (int aFirst, int aLast, bool aIterateHoles=false) |
|
Returns an iterator object, for iterating between aFirst and aLast outline, with or
without holes (default: without)
|
|
SEGMENT_ITERATOR | IterateSegments (int aPolygonIdx) |
|
Returns an iterator object, for iterating aPolygonIdx-th polygon edges
|
|
SEGMENT_ITERATOR | IterateSegments () |
|
Returns an iterator object, for all outlines in the set (no holes)
|
|
SEGMENT_ITERATOR | IterateSegmentsWithHoles () |
|
Returns an iterator object, for all outlines in the set (with holes)
|
|
SEGMENT_ITERATOR | IterateSegmentsWithHoles (int aOutline) |
|
Returns an iterator object, for the aOutline-th outline in the set (with holes)
|
|
void | BooleanAdd (const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
|
Performs boolean polyset union For aFastMode meaning, see function booleanOp
|
|
void | BooleanSubtract (const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
|
Performs boolean polyset difference For aFastMode meaning, see function booleanOp
|
|
void | BooleanIntersection (const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
|
Performs boolean polyset intersection For aFastMode meaning, see function booleanOp
|
|
void | BooleanAdd (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
|
Performs boolean polyset union between a and b, store the result in it self For aFastMode meaning, see function booleanOp
|
|
void | BooleanSubtract (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
|
Performs boolean polyset difference between a and b, store the result in it self For aFastMode meaning, see function booleanOp
|
|
void | BooleanIntersection (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode) |
|
Performs boolean polyset intersection between a and b, store the result in it self For aFastMode meaning, see function booleanOp
|
|
void | Inflate (int aFactor, int aCircleSegmentsCount) |
|
Performs outline inflation/deflation, using round corners.
|
|
void | Fracture (POLYGON_MODE aFastMode) |
|
Converts a set of polygons with holes to a singe outline with "slits"/"fractures" connecting the outer ring to the inner holes For aFastMode meaning, see function booleanOp
|
|
void | Unfracture (POLYGON_MODE aFastMode) |
|
Converts a single outline slitted ("fractured") polygon into a set ouf outlines with holes.
More...
|
|
bool | HasHoles () const |
|
Returns true if the polygon set has any holes.
|
|
bool | HasTouchingHoles () const |
|
Returns true if the polygon set has any holes tha share a vertex.
|
|
void | Simplify (POLYGON_MODE aFastMode) |
|
Simplifies the polyset (merges overlapping polys, eliminates degeneracy/self-intersections) For aFastMode meaning, see function booleanOp
|
|
int | NormalizeAreaOutlines () |
| Function NormalizeAreaOutlines Convert a self-intersecting polygon to one (or more) non self-intersecting polygon(s) Removes null segments. More...
|
|
const std::string | Format () const override |
|
bool | Parse (std::stringstream &aStream) override |
|
void | Move (const VECTOR2I &aVector) override |
|
void | Rotate (double aAngle, const VECTOR2I &aCenter) |
| Function Rotate rotates all vertices by a given angle. More...
|
|
bool | IsSolid () const override |
|
const BOX2I | BBox (int aClearance=0) const override |
| Function BBox() More...
|
|
bool | PointOnEdge (const VECTOR2I &aP) const |
| Function PointOnEdge() More...
|
|
bool | Collide (const VECTOR2I &aP, int aClearance=0) const override |
| Function Collide Checks whether the point aP collides with the inside of the polygon set; if the point lies on an edge or on a corner of any of the polygons, there is no collision: the edges does not belong to the polygon itself. More...
|
|
bool | Collide (const SEG &aSeg, int aClearance=0) const override |
| Function Collide Checks whether the segment aSeg collides with the inside of the polygon set; if the segment touches an edge or a corner of any of the polygons, there is no collision: the edges do not belong to the polygon itself. More...
|
|
bool | CollideVertex (const VECTOR2I &aPoint, VERTEX_INDEX &aClosestVertex, int aClearance=0) |
| Function CollideVertex Checks whether aPoint collides with any vertex of any of the contours of the polygon. More...
|
|
bool | CollideEdge (const VECTOR2I &aPoint, VERTEX_INDEX &aClosestVertex, int aClearance=0) |
| Function CollideEdge Checks whether aPoint collides with any edge of any of the contours of the polygon. More...
|
|
bool | Contains (const VECTOR2I &aP, int aSubpolyIndex=-1, bool aIgnoreHoles=false) const |
| Returns true if a given subpolygon contains the point aP. More...
|
|
bool | IsEmpty () const |
|
Returns true if the set is empty (no polygons at all)
|
|
void | RemoveVertex (int aGlobalIndex) |
| Function RemoveVertex deletes the aGlobalIndex-th vertex. More...
|
|
void | RemoveVertex (VERTEX_INDEX aRelativeIndices) |
| Function RemoveVertex deletes the vertex indexed by aIndex (index of polygon, contour and vertex). More...
|
|
void | RemoveAllContours () |
|
Removes all outlines & holes (clears) the polygon set.
|
|
void | RemoveContour (int aContourIdx, int aPolygonIdx=-1) |
| Function RemoveContour deletes the aContourIdx-th contour of the aPolygonIdx-th polygon in the set. More...
|
|
int | RemoveNullSegments () |
| Function RemoveNullSegments looks for null segments; ie, segments whose ends are exactly the same and deletes them. More...
|
|
int | TotalVertices () const |
|
Returns total number of vertices stored in the set.
|
|
void | DeletePolygon (int aIdx) |
|
Deletes aIdx-th polygon from the set
|
|
POLYGON | ChamferPolygon (unsigned int aDistance, int aIndex=0) |
| Function Chamfer returns a chamfered version of the aIndex-th polygon. More...
|
|
POLYGON | FilletPolygon (unsigned int aRadius, int aErrorMax, int aIndex=0) |
| Function Fillet returns a filleted version of the aIndex-th polygon. More...
|
|
SHAPE_POLY_SET | Chamfer (int aDistance) |
| Function Chamfer returns a chamfered version of the polygon set. More...
|
|
SHAPE_POLY_SET | Fillet (int aRadius, int aErrorMax) |
| Function Fillet returns a filleted version of the polygon set. More...
|
|
int | DistanceToPolygon (VECTOR2I aPoint, int aIndex) |
| Function DistanceToPolygon computes the minimum distance between the aIndex-th polygon and aPoint. More...
|
|
int | DistanceToPolygon (SEG aSegment, int aIndex, int aSegmentWidth=0) |
| Function DistanceToPolygon computes the minimum distance between the aIndex-th polygon and aSegment with a possible width. More...
|
|
int | Distance (VECTOR2I aPoint) |
| Function DistanceToPolygon computes the minimum distance between aPoint and all the polygons in the set. More...
|
|
int | Distance (const SEG &aSegment, int aSegmentWidth=0) |
| Function DistanceToPolygon computes the minimum distance between aSegment and all the polygons in the set. More...
|
|
bool | IsVertexInHole (int aGlobalIdx) |
| Function IsVertexInHole. More...
|
|
SHAPE_POLY_SET & | operator= (const SHAPE_POLY_SET &) |
|
void | CacheTriangulation () |
|
bool | IsTriangulationUpToDate () const |
|
MD5_HASH | GetHash () const |
|
| SHAPE (SHAPE_TYPE aType) |
| Constructor. More...
|
|
SHAPE_TYPE | Type () const |
| Function Type() More...
|
|
virtual bool | Collide (const SHAPE *aShape, int aClearance, VECTOR2I &aMTV) const |
| Function Collide() More...
|
|
virtual bool | Collide (const SHAPE *aShape, int aClearance=0) const |
|
virtual VECTOR2I | Centre () const |
| Function Centre() More...
|
|