C# Class Vertesaur.PolygonOperation.PolygonIntersectionOperation

An operation that will find the geometric result of intersecting two polygons.
ファイルを表示 Open project: aarondandy/vertesaur Class Usage Examples

Public Methods

Method Description
FindPointCrossings ( Polygon2 a, Polygon2 b ) : List

Determines the points that would need to be inserted into the resulting intersection geometry between the two given polygons, at the location where their boundaries cross.

Intersect ( Polygon2 a, Polygon2 b ) : IPlanarGeometry

Calculates the intersection between two polygons.

PolygonIntersectionOperation ( ) : System

Constructs a default polygon intersection operation.

Private Methods

Method Description
AddPointsBetweenForward ( List results, Ring2 ring, PolygonBoundaryLocation from, PolygonBoundaryLocation to ) : void
CodeContractInvariant ( ) : void
CreateIntersectionKernel ( Polygon2 a, Polygon2 b ) : PolygonCrossingsAlgorithmKernel
CreateIntersectionKernelFromCrossings ( List crossings, Polygon2 a, Polygon2 b ) : PolygonCrossingsAlgorithmKernel

Builds required crossing data.

DetermineFillWinding ( IEnumerable rings ) : PointWinding

Returns the first known point winding associated with ring which has an explicit hole value, failing that the first known ring winding encountered.

FindNextCrossingNotEqual ( PolygonCrossing currentCrossing, PolygonCrossing crossingsOnRing, IComparer crossingComparer ) : PolygonCrossing
FindNextRingPoint ( PolygonCrossing currentCrossing, PolygonCrossing crossingsOnRing, Ring2 ring, PolygonBoundaryLocation>.Func getLocation, IComparer crossingComparer ) : Point2
FindPreviousCrossingNotEqual ( PolygonCrossing currentCrossing, PolygonCrossing crossingsOnRing, IComparer crossingComparer ) : PolygonCrossing
FindPreviousRingPoint ( PolygonCrossing currentCrossing, PolygonCrossing crossingsOnRing, Ring2 ring, PolygonBoundaryLocation>.Func getLocation, IComparer crossingComparer ) : Point2
GetLocationA ( PolygonCrossing crossing ) : PolygonBoundaryLocation
GetLocationB ( PolygonCrossing crossing ) : PolygonBoundaryLocation
GetRingIndexA ( PolygonCrossing crossing ) : int
GetRingIndexB ( PolygonCrossing crossing ) : int
PolygonIntersectionOperation ( PolygonBinaryOperationOptions options ) : System

Constructs a new polygon intersection operation using the given options.

Using this constructor can help optimize other operators that rely on intersection operations, such as union or difference.

QualifyRings ( Polygon2 untouchedRings, Polygon2 polygon, bool qualifyEqual ) : List
TraverseCrossings ( PolygonCrossing fromCrossing, PolygonCrossing ringCrossings, int fromCrossingIndex ) : IEnumerable

Method Details

FindPointCrossings() public method

Determines the points that would need to be inserted into the resulting intersection geometry between the two given polygons, at the location where their boundaries cross.
public FindPointCrossings ( Polygon2 a, Polygon2 b ) : List
a Polygon2 The first polygon to test.
b Polygon2 The second polygon to test.
return List

Intersect() public method

Calculates the intersection between two polygons.
public Intersect ( Polygon2 a, Polygon2 b ) : IPlanarGeometry
a Polygon2 A polygon.
b Polygon2 A polygon.
return IPlanarGeometry

PolygonIntersectionOperation() public method

Constructs a default polygon intersection operation.
public PolygonIntersectionOperation ( ) : System
return System