|
| | Contour (IEnumerable< Vertex > points) |
| | Initializes a new instance of the Contour class.
|
| |
| | Contour (IEnumerable< Vertex > points, int marker) |
| | Initializes a new instance of the Contour class.
|
| |
| | Contour (IEnumerable< Vertex > points, int marker, bool convex) |
| | Initializes a new instance of the Contour class.
|
| |
|
List< ISegment > | GetSegments () |
| |
| Point | FindInteriorPoint (int limit=5, float eps=2e-5f) |
| | Try to find a point inside the contour.
|
| |
|
| static bool | IsPointInPolygon (Point point, List< Vertex > poly) |
| | Return true if the given point is inside the polygon, or false if it is not.
|
| |
|
|
List< Vertex > | Points [get, set] |
| | Gets or sets the list of points making up the contour.
|
| |
◆ Contour() [1/3]
| TriangleNet.Geometry.Contour.Contour |
( |
IEnumerable< Vertex > |
points | ) |
|
|
inline |
Initializes a new instance of the Contour class.
- Parameters
-
| points | The points that make up the contour. |
◆ Contour() [2/3]
| TriangleNet.Geometry.Contour.Contour |
( |
IEnumerable< Vertex > |
points, |
|
|
int |
marker |
|
) |
| |
|
inline |
Initializes a new instance of the Contour class.
- Parameters
-
| points | The points that make up the contour. |
| marker | Contour marker. |
◆ Contour() [3/3]
| TriangleNet.Geometry.Contour.Contour |
( |
IEnumerable< Vertex > |
points, |
|
|
int |
marker, |
|
|
bool |
convex |
|
) |
| |
|
inline |
Initializes a new instance of the Contour class.
- Parameters
-
| points | The points that make up the contour. |
| marker | Contour marker. |
| convex | The hole is convex. |
◆ FindInteriorPoint()
| Point TriangleNet.Geometry.Contour.FindInteriorPoint |
( |
int |
limit = 5, |
|
|
float |
eps = 2e-5f |
|
) |
| |
|
inline |
Try to find a point inside the contour.
- Parameters
-
| limit | The number of iterations on each segment (default = 5). |
| eps | Threshold for co-linear points (default = 2e-5). |
- Returns
- Point inside the contour
- Exceptions
-
| Exception | Throws if no point could be found. |
For each corner (index i) of the contour, the 3 points with indices i-1, i and i+1 are considered and a search on the line through the corner vertex is started (either on the bisecting line, or, if IPredicates.CounterClockwise is less than eps, on the perpendicular line. A given number of points will be tested (limit), while the distance to the contour boundary will be reduced in each iteration (with a factor 1 / 2^i, i = 1 ... limit).
◆ IsPointInPolygon()
| static bool TriangleNet.Geometry.Contour.IsPointInPolygon |
( |
Point |
point, |
|
|
List< Vertex > |
poly |
|
) |
| |
|
inlinestatic |
Return true if the given point is inside the polygon, or false if it is not.
- Parameters
-
| point | The point to check. |
| poly | The polygon (list of contour points). |
- Returns
WARNING: If the point is exactly on the edge of the polygon, then the function may return true or false.
See http://alienryderflex.com/polygon/
The documentation for this class was generated from the following file:
- C:/Transhuman/S2/Assets/Plugins/TriangleNet/Scripts/Source/Geometry/Contour.cs