Method | Description | |
---|---|---|
GetWindingNumber ( this |
Counts the number of times the polygon winds around a test point, using a rightward raycasting test. The test point is considered to be within the polygon if it lies on a top or left edge, but not on a bottom or right edge (within the precision limits of 'double' arithmetic). The test point will never be considered inside a degenerate (zero-width) area. |
|
IsPointInPolygon ( IEnumerable |
Finds out if a point is inside the polygon using a winding test.
|
|
IsPointInPolygon ( IEnumerator |
||
Orientation ( IEnumerable |
Returns Math.Sign(PolygonArea(poly)): positive when clockwise and increasing Y goes upward. A common approach to this problem is to look at the topmost point and the two points on either side. However, if one is not careful, this technique may be unable to detect the orientation in case the polygon has duplicate points, horizontal lines on top, or a degenerate top in which the top part of the polygon is zero-width (these problems can occur even if the polygon's lines do not cross one another.) That's why I chose to compute orientation based on area instead. |
|
Orientation ( IEnumerator |
||
PolygonArea ( IEnumerable |
Computes the area of a polygon. http://www.codeproject.com/Tips/601272/Calculating-the-area-of-a-polygon |
|
PolygonArea ( IEnumerator |
||
PolygonArea ( IEnumerable |
Computes the area of a polygon. http://www.codeproject.com/Tips/601272/Calculating-the-area-of-a-polygon |
|
PolygonArea ( IEnumerator |
||
PolygonArea ( IEnumerable |
Computes the area of a polygon. http://www.codeproject.com/Tips/601272/Calculating-the-area-of-a-polygon |
|
PolygonArea ( IEnumerator |
||
PolygonArea ( IEnumerable |
Computes the area of a polygon. http://www.codeproject.com/Tips/601272/Calculating-the-area-of-a-polygon |
|
PolygonArea ( IEnumerator |
||
PolygonArea ( IEnumerable |
Computes the area of a polygon. http://www.codeproject.com/Tips/601272/Calculating-the-area-of-a-polygon |
|
PolygonArea ( IEnumerator |
Method | Description | |
---|---|---|
GWN_NextLine ( System.Point p, System.Point p1, System.Point p2 ) : int |
public static GetWindingNumber ( this |
||
poly | this |
|
p | System.Point | |
return | int |
public static IsPointInPolygon ( IEnumerable |
||
poly | IEnumerable |
|
p | System.Point | |
return | bool |
public static IsPointInPolygon ( IEnumerator |
||
e | IEnumerator |
|
p | System.Point | |
return | bool |
public static Orientation ( IEnumerable |
||
poly | IEnumerable |
|
return | int |
public static Orientation ( IEnumerator |
||
poly | IEnumerator |
|
return | int |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
return | FPL16 |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
return | FPL16 |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
return | FPL32 |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
return | FPL32 |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
return | double |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
return | double |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
return | float |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
return | float |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
return | long |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
return | long |