Intersections2D
Contains functions for operating on 2D triangles.
See also
Functions
Link copied to clipboard
fun clipTriangleAtAxisAlignedThreshold( threshold: Double, keepAbove: Boolean, u0: Double, u1: Double, u2: Double, result: <Error class: unknown class><Double>? = definedExternally): <Error class: unknown class><Double>
Splits a 2D triangle at given axis-aligned threshold value and returns the resulting polygon on a given side of the threshold. The resulting polygon may have 0, 1, 2, 3, or 4 vertices.
Link copied to clipboard
fun computeBarycentricCoordinates( x: Double, y: Double, x1: Double, y1: Double, x2: Double, y2: Double, x3: Double, y3: Double, result: Cartesian3? = definedExternally): Cartesian3
Compute the barycentric coordinates of a 2D position within a 2D triangle.
Link copied to clipboard
fun computeLineSegmentLineSegmentIntersection( x00: Double, y00: Double, x01: Double, y01: Double, x10: Double, y10: Double, x11: Double, y11: Double, result: Cartesian2? = definedExternally): Cartesian2
Compute the intersection between 2 line segments