Метод | Описание | |
---|---|---|
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 |
Метод | Описание | |
---|---|---|
GWN_NextLine ( System.Point p, System.Point p1, System.Point p2 ) : int |
public static GetWindingNumber ( this |
||
poly | this |
|
p | System.Point | |
Результат | int |
public static IsPointInPolygon ( IEnumerable |
||
poly | IEnumerable |
|
p | System.Point | |
Результат | bool |
public static IsPointInPolygon ( IEnumerator |
||
e | IEnumerator |
|
p | System.Point | |
Результат | bool |
public static Orientation ( IEnumerable |
||
poly | IEnumerable |
|
Результат | int |
public static Orientation ( IEnumerator |
||
poly | IEnumerator |
|
Результат | int |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
Результат | FPL16 |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
Результат | FPL16 |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
Результат | FPL32 |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
Результат | FPL32 |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
Результат | double |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
Результат | double |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
Результат | float |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
Результат | float |
public static PolygonArea ( IEnumerable |
||
polygon | IEnumerable |
|
Результат | long |
public static PolygonArea ( IEnumerator |
||
e | IEnumerator |
|
Результат | long |