My Project
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
TriangleNet.Geometry.Polygon Class Reference

A polygon represented as a planar straight line graph. More...

Inheritance diagram for TriangleNet.Geometry.Polygon:
TriangleNet.Geometry.IPolygon

Public Member Functions

 Polygon ()
 Initializes a new instance of the Polygon class.
 
 Polygon (int capacity)
 Initializes a new instance of the Polygon class.
 
 Polygon (int capacity, bool markers)
 Initializes a new instance of the Polygon class.
 
void AddContour (IEnumerable< Vertex > points, int marker=0, bool hole=false, bool convex=false)
 
void AddContour (IEnumerable< Vertex > points, int marker, Point hole)
 
Rectangle Bounds ()
 Compute the bounds of the polygon.
Returns
Rectangle defining an axis-aligned bounding box.

 
void Add (Vertex vertex)
 Add a vertex to the polygon.
 
void Add (ISegment segment, bool insert=false)
 Add a segment to the polygon.
 
void Add (ISegment segment, int index)
 Add a segment to the polygon.
 
void Add (Contour contour, bool hole=false)
 Add a contour to the polygon.
 
void Add (Contour contour, Point hole)
 Add a contour to the polygon.
 
void AddContour (IEnumerable< Vertex > points, int marker, bool hole, bool convex)
 
void AddContour (IEnumerable< Vertex > points, int marker, Point hole)
 
Rectangle Bounds ()
 Compute the bounds of the polygon.
 
void Add (Vertex vertex)
 Add a vertex to the polygon.
 
void Add (ISegment segment, bool insert=false)
 Add a segment to the polygon.
 
void Add (ISegment segment, int index)
 Add a segment to the polygon.
 
void Add (Contour contour, bool hole=false)
 Add a contour to the polygon.
 
void Add (Contour contour, Point hole)
 Add a contour to the polygon.
 

Properties

List< VertexPoints [get]
 Gets the vertices of the polygon.
 
List< PointHoles [get]
 Gets a list of points defining the holes of the polygon.
 
List< RegionPointerRegions [get]
 Gets a list of pointers defining the regions of the polygon.
 
List< ISegmentSegments [get]
 Gets the segments of the polygon.
 
bool HasPointMarkers [get, set]
 Gets or sets a value indicating whether the vertices have marks or not.
 
bool HasSegmentMarkers [get, set]
 Gets or sets a value indicating whether the segments have marks or not.
 
int Count [get]
 
- Properties inherited from TriangleNet.Geometry.IPolygon
List< VertexPoints [get]
 Gets the vertices of the polygon.
 
List< ISegmentSegments [get]
 Gets the segments of the polygon.
 
List< PointHoles [get]
 Gets a list of points defining the holes of the polygon.
 
List< RegionPointerRegions [get]
 Gets a list of pointers defining the regions of the polygon.
 
bool HasPointMarkers [get, set]
 Gets or sets a value indicating whether the vertices have marks or not.
 
bool HasSegmentMarkers [get, set]
 Gets or sets a value indicating whether the segments have marks or not.
 

Detailed Description

A polygon represented as a planar straight line graph.

Constructor & Destructor Documentation

◆ Polygon() [1/2]

TriangleNet.Geometry.Polygon.Polygon ( int  capacity)
inline

Initializes a new instance of the Polygon class.

Parameters
capacityThe default capacity for the points list.

◆ Polygon() [2/2]

TriangleNet.Geometry.Polygon.Polygon ( int  capacity,
bool  markers 
)
inline

Initializes a new instance of the Polygon class.

Parameters
capacityThe default capacity for the points list.
markersUse point and segment markers.

Member Function Documentation

◆ Add() [1/5]

void TriangleNet.Geometry.Polygon.Add ( Contour  contour,
bool  hole = false 
)
inline

Add a contour to the polygon.

Parameters
contourThe contour to insert.
holeTreat contour as a hole.

Implements TriangleNet.Geometry.IPolygon.

◆ Add() [2/5]

void TriangleNet.Geometry.Polygon.Add ( Contour  contour,
Point  hole 
)
inline

Add a contour to the polygon.

Parameters
contourThe contour to insert.
holePoint inside the contour, making it a hole.

Implements TriangleNet.Geometry.IPolygon.

◆ Add() [3/5]

void TriangleNet.Geometry.Polygon.Add ( ISegment  segment,
bool  insert = false 
)
inline

Add a segment to the polygon.

Parameters
segmentThe segment to insert.
insertIf true, both endpoints will be added to the points list.

Implements TriangleNet.Geometry.IPolygon.

◆ Add() [4/5]

void TriangleNet.Geometry.Polygon.Add ( ISegment  segment,
int  index 
)
inline

Add a segment to the polygon.

Parameters
segmentThe segment to insert.
indexThe index of the segment endpoint to add to the points list (must be 0 or 1).

Implements TriangleNet.Geometry.IPolygon.

◆ Add() [5/5]

void TriangleNet.Geometry.Polygon.Add ( Vertex  vertex)
inline

Add a vertex to the polygon.

Parameters
vertexThe vertex to insert.

Implements TriangleNet.Geometry.IPolygon.

◆ AddContour() [1/2]

void TriangleNet.Geometry.Polygon.AddContour ( IEnumerable< Vertex points,
int  marker,
Point  hole 
)
inline

◆ AddContour() [2/2]

void TriangleNet.Geometry.Polygon.AddContour ( IEnumerable< Vertex points,
int  marker = 0,
bool  hole = false,
bool  convex = false 
)
inline

◆ Bounds()

Rectangle TriangleNet.Geometry.Polygon.Bounds ( )
inline

Compute the bounds of the polygon.

Returns
Rectangle defining an axis-aligned bounding box.

Implements TriangleNet.Geometry.IPolygon.

Property Documentation

◆ HasPointMarkers

bool TriangleNet.Geometry.Polygon.HasPointMarkers
getset

Gets or sets a value indicating whether the vertices have marks or not.

Implements TriangleNet.Geometry.IPolygon.

◆ HasSegmentMarkers

bool TriangleNet.Geometry.Polygon.HasSegmentMarkers
getset

Gets or sets a value indicating whether the segments have marks or not.

Implements TriangleNet.Geometry.IPolygon.

◆ Holes

List<Point> TriangleNet.Geometry.Polygon.Holes
get

Gets a list of points defining the holes of the polygon.

Implements TriangleNet.Geometry.IPolygon.

◆ Points

List<Vertex> TriangleNet.Geometry.Polygon.Points
get

Gets the vertices of the polygon.

Implements TriangleNet.Geometry.IPolygon.

◆ Regions

List<RegionPointer> TriangleNet.Geometry.Polygon.Regions
get

Gets a list of pointers defining the regions of the polygon.

Implements TriangleNet.Geometry.IPolygon.

◆ Segments

List<ISegment> TriangleNet.Geometry.Polygon.Segments
get

Gets the segments of the polygon.

Implements TriangleNet.Geometry.IPolygon.


The documentation for this class was generated from the following file: