data class Polygon3D: AbstractSurface3D

Planar polygon consisting of a list of vertices.

Fields

Name Description
val vertices: List<Vector3D>

vertices of the polygon must be located in a plane

val tolerance: Double

tolerable threshold value

val affineSequence: AffineSequence3D

List of affine transformation matrices to move and rotate the geometric object.

Constructors

<init>

constructor(vertices: List<Vector3D>, tolerance: Double, affineSequence: AffineSequence3D)

Planar polygon consisting of a list of vertices.

Parameters

Name Description
vertices: List<Vector3D>

vertices of the polygon must be located in a plane

tolerance: Double
affineSequence: AffineSequence3D

Methods

getNormal

fun getNormal(): Result<Vector3D, IllegalStateException>

Returns the normal of the polygon.

ReturnValue

Name Description
Result<Vector3D, IllegalStateException>

reversed

fun reversed(): Polygon3D

Returns a new polygon with an opposite facing by reversing the vertices order

ReturnValue

Name Description
Polygon3D

calculatePolygonsLocalCS

fun calculatePolygonsLocalCS(): Result, NoException><List<Polygon3D>, NoException>

Calculates the polygons for the respective surface geometry within the local coordinate system of the surface.

ReturnValue

Name Description
Result, NoException><List<Polygon3D>, NoException>

toVertexPositionElementList

fun toVertexPositionElementList(): ()

Returns the coordinates of all vertices as a flattened list

ReturnValue

Name Description
()

CompanionObject

Polygon3D

data class Polygon3D: AbstractSurface3D

Planar polygon consisting of a list of vertices.

Fields

Name Description
val TETRAGON: Polygon3D

Methods

of

fun of(vararg vectors: Vector3D, tolerance: Double): Polygon3D

Constructs a polygon based on the vectors.

Parameters

Name Description
vararg vectors: Vector3D
tolerance: Double

ReturnValue

Name Description
Polygon3D

of

fun of(vectors: Triple<Vector3D, Vector3D, Vector3D>, tolerance: Double): Polygon3D

Constructs a polygon based on a Triple of vectors.

Parameters

Name Description
vectors: Triple<Vector3D, Vector3D, Vector3D>
tolerance: Double

ReturnValue

Name Description
Polygon3D