Class Polygon
- Assembly
- Alis.dll
The polygon class
internal class Polygon : Triangulatable
Inheritance
Implements
Inherited Members
Constructors
Polygon(IList<PolygonPoint>)
Create a polygon from a list of at least 3 points with no duplicates.
public Polygon(IList<PolygonPoint> points)
Parameters
points
IList<PolygonPoint>-
A list of unique points
Polygon(IEnumerable<PolygonPoint>)
Create a polygon from a list of at least 3 points with no duplicates.
public Polygon(IEnumerable<PolygonPoint> points)
Parameters
points
IEnumerable<PolygonPoint>-
A list of unique points.
Polygon()
Initializes a new instance of the Alis.Core.Physic.Common.Decomposition.CDT.Polygon.Polygon class
public Polygon()
Fields
_holes
The holes
protected List<Polygon> _holes
Field Value
_last
The last
protected PolygonPoint _last
Field Value
_points
The triangulation point
protected List<TriangulationPoint> _points
Field Value
_steinerPoints
The steiner points
protected List<TriangulationPoint> _steinerPoints
Field Value
_triangles
The triangles
protected List<DelaunayTriangle> _triangles
Field Value
Properties
Holes
Gets the value of the holes
public IList<Polygon> Holes { get; }
Property Value
Points
Gets the value of the points
public IList<TriangulationPoint> Points { get; }
Property Value
Triangles
Gets the value of the triangles
public IList<DelaunayTriangle> Triangles { get; }
Property Value
TriangulationMode
Gets the value of the triangulation mode
public TriangulationMode TriangulationMode { get; }
Property Value
Methods
AddHole(Polygon)
Add a hole to the polygon.
public void AddHole(Polygon poly)
Parameters
poly
Polygon-
A subtraction polygon fully contained inside this polygon.
AddPoint(PolygonPoint)
Adds a point after the last in the polygon.
public void AddPoint(PolygonPoint p)
Parameters
p
PolygonPoint-
The point to add
AddPoints(IEnumerable<PolygonPoint>)
Inserts list (after last point in polygon?)
public void AddPoints(IEnumerable<PolygonPoint> list)
Parameters
list
IEnumerable<PolygonPoint>
AddSteinerPoint(TriangulationPoint)
Adds the steiner point using the specified point
public void AddSteinerPoint(TriangulationPoint point)
Parameters
point
TriangulationPoint-
The point
AddSteinerPoints(List<TriangulationPoint>)
Adds the steiner points using the specified points
public void AddSteinerPoints(List<TriangulationPoint> points)
Parameters
points
List<TriangulationPoint>-
The points
AddTriangle(DelaunayTriangle)
Adds the triangle using the specified t
public void AddTriangle(DelaunayTriangle t)
Parameters
t
DelaunayTriangle-
The
AddTriangles(IEnumerable<DelaunayTriangle>)
Adds the triangles using the specified list
public void AddTriangles(IEnumerable<DelaunayTriangle> list)
Parameters
list
IEnumerable<DelaunayTriangle>-
The list
ClearSteinerPoints()
Clears the steiner points
public void ClearSteinerPoints()
ClearTriangles()
Clears the triangles
public void ClearTriangles()
InsertPointAfter(PolygonPoint, PolygonPoint)
Inserts newPoint after point.
public void InsertPointAfter(PolygonPoint point, PolygonPoint newPoint)
Parameters
point
PolygonPoint-
The point to insert after in the polygon
newPoint
PolygonPoint-
The point to insert into the polygon
PrepareTriangulation(TriangulationContext)
Creates constraints and populates the context with points
public void PrepareTriangulation(TriangulationContext tcx)
Parameters
tcx
TriangulationContext-
The context
RemovePoint(PolygonPoint)
Removes a point from the polygon.
public void RemovePoint(PolygonPoint p)