Click or drag to resize

SurfacePolygonTriangulatorCompute Method (CentralBody, IEnumerableCartesian, Double, Double, WindingOrder)

Computes the triangulation on the specified centralBody for a polygon whose boundary is defined by the specified positions.

Namespace:  AGI.Foundation.Geometry.Discrete
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.1.418.0 (24.1.418.0)
public static SurfaceTriangulatorResult Compute(
	CentralBody centralBody,
	IEnumerable<Cartesian> positions,
	double altitude,
	double granularity,
	WindingOrder positionsWindingOrder


Type: AGI.Foundation.CelestialCentralBody
The central body to compute the triangulation on.
Type: System.Collections.GenericIEnumerableCartesian
The positions defining the boundary of the polygon, in the centralBody's fixed reference frame, to triangulate.
Type: SystemDouble
The altitude of the triangulation. When 0, the mesh is computed to conform to the ellipsoid.
Type: SystemDouble
The angular separation, in radians, of positions in the triangulation. Lower granularities are more precise but create more triangles.
Type: AGI.Foundation.Geometry.DiscreteWindingOrder
The winding order of positions.

Return Value

Type: SurfaceTriangulatorResult
A SurfaceTriangulatorResult object representing the triangulation, in the centralBody's fixed reference frame.
ArgumentNullExceptioncentralBody or positions is null.
ArgumentExceptionpositions must contain at least three elements.
ArgumentExceptiongranularity must be greater than 0.
UnsupportedCaseExceptionpositionsWindingOrder must be a valid enumeration value in WindingOrder.
ArgumentException Could not triangulate. The polygon may cross over itself or it may be too large.
See Also