Aardvark.Base


Polygon3d

A polygon internally represented by an array of points. Implemented as a structure, the validity of the polygon can be checked via its PointCount, which must be bigger than 0 for a polygon to hold any points, and bigger than 2 for a polygon to be geometrically valid.

Constructors

ConstructorDescription
new(pointArray, pointCount)
Signature: (pointArray:V3d [] * pointCount:int) -> unit

Creates a polygon from given points.

new(pointArray)
Signature: (pointArray:V3d []) -> unit

Creates a polygon from given points.

new(pointArray, startIndex, count)
Signature: (pointArray:V3d [] * startIndex:int * count:int) -> unit

Creates a polygon from given points.

new(pointCount, index_pointCreator)
Signature: (pointCount:int * index_pointCreator:Func<int,V3d>) -> unit

Creates a polygon from point count and point creator function.

new(points)
Signature: points:IEnumerable<V3d> -> unit

Creates a polygon from a sequence of points.

new(indexArray, pointArray)
Signature: (indexArray:int [] * pointArray:V3d []) -> unit

Creates a polygon from the points of a pointArray that are selected by an index array.

new(triangle)
Signature: triangle:Triangle3d -> unit

Creates a polygon from a triangle.

new(quad)
Signature: quad:Quad3d -> unit

Creates a polygon from a quad.

new(original)
Signature: original:Polygon3d -> unit

Copy constructor. Performs deep copy of original.

Instance members

Instance memberDescription
BoundingBox3d
Signature: Box3d
Modifiers: abstract

Bounding box of polygon.

Copy()
Signature: unit -> Polygon3d

Returns copy of polygon. Same as Map(p => p).

Copy(point_fun)
Signature: point_fun:Func<V3d,V3d> -> Polygon3d

Obsolete. Use 'Map' instead (same functionality and parameters).

Edge(index)
Signature: index:int -> V3d

Index-th edge as vector (edgeEndPos - edgeBeginPos).

EdgeLine(index)
Signature: index:int -> Line3d

Index-th edge as line segment (edgeBeginPos, edgeEndPos).

EdgeLines
Signature: IEnumerable<Line3d>

Edges as line segments (edgeBeginPos, edgeEndPos).

Edges
Signature: IEnumerable<V3d>

Edges as vectors (edgeEndPos - edgeBeginPos).

Equals(other)
Signature: other:obj -> bool
Modifiers: abstract
GetEdgeArray()
Signature: unit -> V3d []

Edges as vectors (edgeEndPos - edgeBeginPos).

GetEdgeLineArray()
Signature: unit -> Line3d []

Edges as line segments (edgeBeginPos, edgeEndPos).

GetHashCode()
Signature: unit -> int
Modifiers: abstract
GetPointArray()
Signature: unit -> V3d []

Returns a copy of the polygons point array.

GetPointArray(point_copyFun)
Signature: point_copyFun:Func<V3d,'T> -> 'T []
Type parameters: 'T

Returns a transformed copy of the polygons point array.

GetPointArray(point_index_copyFun)
Signature: point_index_copyFun:Func<V3d,int,'T> -> 'T []
Type parameters: 'T

Returns a transformed copy of the polygons point array.

GetPointArrayWithRepeatedFirstPoint()
Signature: unit -> V3d []

[P0, P1, P2] -> [P0, P1, P2, P0].

IsInvalid
Signature: bool
Modifiers: abstract
IsValid
Signature: bool
Modifiers: abstract
[()]
Signature: unit -> int
Modifiers: abstract

Gets the index-th point of this polygon.

Map(point_fun)
Signature: point_fun:Func<V3d,V3d> -> Polygon3d

Returns transformed copy of this polygon.

PointCount
Signature: int
Modifiers: abstract

The number of points in the polygon. If this is 0, the polygon is invalid.

Points
Signature: IEnumerable<V3d>

Enumerates points.

Reverse()
Signature: unit -> unit

Reverses order of vertices in-place.

Reversed
Signature: Polygon3d

Gets copy with reversed order of vertices.

Revert()
Signature: unit -> unit

Obsolete. Use 'Reverse' instead..

ToString()
Signature: unit -> string
Modifiers: abstract

Static members

Static memberDescription
Parse(s)
Signature: s:string -> Polygon3d
Fork me on GitHub