package io.rtron.math.processing

Classes

Name Description
object LinearRing3DFactory: Any

Factory for building LinearRing3D for which multiple preparation steps are required to overcome heterogeneous input.

object Polyhedron3DFactory: Any

Factory for building Polyhedron3D for which multiple preparation steps are required to overcome heterogeneous input.

Subpackages

Name Description
package io.rtron.math.processing.triangulation

Methods

isColinear

fun Triple<Vector3D, Vector3D, Vector3D>.isColinear(tolerance: Double): Boolean

Returns true, if all three Vector3D are located on a line with a given tolerance.

Receiver

Name Description
Triple<Vector3D, Vector3D, Vector3D>

Parameters

Name Description
tolerance: Double

tolerated distance between the line and Vector3D

ReturnValue

Name Description
Boolean

isColinear

fun List<Vector3D>.isColinear(tolerance: Double): Boolean

Returns true, if all Vector3D within the list are located on a line.

Receiver

Name Description
List<Vector3D>

Parameters

Name Description
tolerance: Double

tolerated distance between the line and the points

ReturnValue

Name Description
Boolean

removeRedundantVerticesOnLineSegmentsEnclosing

fun List<Vector3D>.removeRedundantVerticesOnLineSegmentsEnclosing(tolerance: Double): List<Vector3D>

Removes all vectors which are located on a line segment spanned by the previous and following one.

Receiver

Name Description
List<Vector3D>

list of vertices that are evaluated in an enclosing way

Parameters

Name Description
tolerance: Double

ReturnValue

Name Description
List<Vector3D>

calculateBestFittingPlane

fun List<Vector3D>.calculateBestFittingPlane(tolerance: Double): Plane3D

Calculates the best fitting plane that lies in a list of Vector3D. See StackExchange for more information.

Receiver

Name Description
List<Vector3D>

Parameters

Name Description
tolerance: Double

ReturnValue

Name Description
Plane3D

isPlanar

fun List<Vector3D>.isPlanar(tolerance: Double, dynamicToleranceAdjustment: Boolean): Boolean

Returns true, if all Vector3Ds are located within a plane.

Receiver

Name Description
List<Vector3D>

Parameters

Name Description
tolerance: Double

tolerated distance between points and the plane

dynamicToleranceAdjustment: Boolean

increases the tolerance when numbers are greater

ReturnValue

Name Description
Boolean

calculateNormal

fun List<Vector3D>.calculateNormal(): Vector3D

Calculates the normal of a vertex list by means of (Newell’s method)https://www.khronos.org/opengl/wiki/Calculating_a_Surface_Normal#Newell.27s_Method.

Receiver

Name Description
List<Vector3D>

ReturnValue

Name Description
Vector3D

calculateCentroid

fun List<Vector3D>.calculateCentroid(): Vector3D

Calculates the centroid of a list of Vector3D. See the wikipedia article of Centroid.

Receiver

Name Description
List<Vector3D>

ReturnValue

Name Description
Vector3D

toCoordinatesString

fun List<Vector3D>.toCoordinatesString(): String

Conversion to a string of coordinates.

Receiver

Name Description
List<Vector3D>

ReturnValue

Name Description
String

removeConsecutiveSideDuplicates

fun List<Vector3D>.removeConsecutiveSideDuplicates(): List<Vector3D>

Removes consecutively following side duplicates. For example, (A, B, C, B, D) will yield (A, B, C, D).

Receiver

Name Description
List<Vector3D>

list of sequentially following vectors

ReturnValue

Name Description
List<Vector3D>

list of vectors without consecutively following side duplicates