Class Polygon
- Assembly
- Alis.dll
The polygon class
internal class Polygon : TriangulatableInheritance
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
pointsIList<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
pointsIEnumerable<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> _holesField Value
_last
The last
protected PolygonPoint _lastField Value
_points
The triangulation point
protected List<TriangulationPoint> _pointsField Value
_steinerPoints
The steiner points
protected List<TriangulationPoint> _steinerPointsField Value
_triangles
The triangles
protected List<DelaunayTriangle> _trianglesField 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
polyPolygon-
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
pPolygonPoint-
The point to add
AddPoints(IEnumerable<PolygonPoint>)
Inserts list (after last point in polygon?)
public void AddPoints(IEnumerable<PolygonPoint> list)Parameters
listIEnumerable<PolygonPoint>
AddSteinerPoint(TriangulationPoint)
Adds the steiner point using the specified point
public void AddSteinerPoint(TriangulationPoint point)Parameters
pointTriangulationPoint-
The point
AddSteinerPoints(List<TriangulationPoint>)
Adds the steiner points using the specified points
public void AddSteinerPoints(List<TriangulationPoint> points)Parameters
pointsList<TriangulationPoint>-
The points
AddTriangle(DelaunayTriangle)
Adds the triangle using the specified t
public void AddTriangle(DelaunayTriangle t)Parameters
tDelaunayTriangle-
The
AddTriangles(IEnumerable<DelaunayTriangle>)
Adds the triangles using the specified list
public void AddTriangles(IEnumerable<DelaunayTriangle> list)Parameters
listIEnumerable<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
pointPolygonPoint-
The point to insert after in the polygon
newPointPolygonPoint-
The point to insert into the polygon
PrepareTriangulation(TriangulationContext)
Creates constraints and populates the context with points
public void PrepareTriangulation(TriangulationContext tcx)Parameters
tcxTriangulationContext-
The context
RemovePoint(PolygonPoint)
Removes a point from the polygon.
public void RemovePoint(PolygonPoint p)