Component2D

interface Component2D

2D Geometry object that supports spatial relationships with bounding boxes, triangles and points.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Used by withinTriangle to check the within relationship between a triangle and the query shape (e.g. if the query shape is within the triangle).

Properties

Link copied to clipboard
abstract val maxX: Double

max X value for the component *

Link copied to clipboard
abstract val maxY: Double

max Y value for the component *

Link copied to clipboard
abstract val minX: Double

min X value for the component *

Link copied to clipboard
abstract val minY: Double

min Y value for the component *

Functions

Link copied to clipboard
abstract fun contains(x: Double, y: Double): Boolean

relates this component2D with a point *

Link copied to clipboard
open fun containsLine(aX: Double, aY: Double, bX: Double, bY: Double): Boolean
abstract fun containsLine(minX: Double, maxX: Double, minY: Double, maxY: Double, aX: Double, aY: Double, bX: Double, bY: Double): Boolean

return true if this component2D contains the provided line *

Link copied to clipboard
open fun containsTriangle(aX: Double, aY: Double, bX: Double, bY: Double, cX: Double, cY: Double): Boolean
abstract fun containsTriangle(minX: Double, maxX: Double, minY: Double, maxY: Double, aX: Double, aY: Double, bX: Double, bY: Double, cX: Double, cY: Double): Boolean

return true if this component2D contains the provided triangle *

Link copied to clipboard
open fun intersectsLine(aX: Double, aY: Double, bX: Double, bY: Double): Boolean
abstract fun intersectsLine(minX: Double, maxX: Double, minY: Double, maxY: Double, aX: Double, aY: Double, bX: Double, bY: Double): Boolean

return true if this component2D intersects the provided line *

Link copied to clipboard
open fun intersectsTriangle(aX: Double, aY: Double, bX: Double, bY: Double, cX: Double, cY: Double): Boolean
abstract fun intersectsTriangle(minX: Double, maxX: Double, minY: Double, maxY: Double, aX: Double, aY: Double, bX: Double, bY: Double, cX: Double, cY: Double): Boolean

return true if this component2D intersects the provided triangle *

Link copied to clipboard
abstract fun relate(minX: Double, maxX: Double, minY: Double, maxY: Double): PointValues.Relation

relates this component2D with a bounding box *

Link copied to clipboard

Compute the within relation of this component2D with a triangle *

abstract fun withinLine(minX: Double, maxX: Double, minY: Double, maxY: Double, aX: Double, aY: Double, ab: Boolean, bX: Double, bY: Double): Component2D.WithinRelation

Compute the within relation of this component2D with a line *

Link copied to clipboard

Compute the within relation of this component2D with a point *

Link copied to clipboard
open fun withinTriangle(aX: Double, aY: Double, ab: Boolean, bX: Double, bY: Double, bc: Boolean, cX: Double, cY: Double, ca: Boolean): Component2D.WithinRelation
abstract fun withinTriangle(minX: Double, maxX: Double, minY: Double, maxY: Double, aX: Double, aY: Double, ab: Boolean, bX: Double, bY: Double, bc: Boolean, cX: Double, cY: Double, ca: Boolean): Component2D.WithinRelation

Compute the within relation of this component2D with a triangle *