Package-level declarations

Types

Link copied to clipboard
open class Circle : Primitive

A circle in the plane, oriented by which side counts as its interior — the 2D circle.

Link copied to clipboard
open class Dipole : Primitive

Two points of the plane joined into a single oriented object — the 2D dipole.

Link copied to clipboard
class Direction(dx: Double, dy: Double) : FlatPoint

A free vector — magnitude and orientation with no position; the FlatPoint refinement guaranteed to lie at infinity.

Link copied to clipboard
open class FlatPoint : Primitive

A weighted position in the plane, or a free vector when at infinity — the 2D flat point.

Link copied to clipboard
open class Line : Primitive

An oriented infinite line in the plane, or a weighted line at infinity — the 2D line.

Link copied to clipboard
sealed interface Primitive : Shape

Marker for a shape that is itself a CGA element.

Link copied to clipboard
class RoundDirection(dx: Double, dy: Double, aw: Double = 0.0) : RoundPoint

A direction with magnitude — the RoundPoint refinement guaranteed to lie at infinity; the round-point counterpart of Direction.

Link copied to clipboard
open class RoundPoint : Primitive

A point in the plane, optionally carrying a size — the 2D round point.

Functions

Link copied to clipboard
operator fun Direction.minus(other: Direction): Direction

Direction - Direction => Direction
Returns the vector difference of the two free vectors: this displacement with other undone.

operator fun FlatPoint.minus(other: FlatPoint): Direction

FlatPoint - FlatPoint => Direction
Returns the free vector from other to this point: the displacement that carries other onto this point.

operator fun RoundPoint.minus(other: RoundPoint): Direction

RoundPoint - RoundPoint => Direction
Returns the free vector from other's position to this point's position: the displacement that carries other onto this point.

Link copied to clipboard
operator fun Direction.plus(other: Direction): Direction

Direction + Direction => Direction
Returns the vector sum of the two free vectors: both displacements applied together.

Link copied to clipboard
operator fun <T : Circle> T.unaryMinus(): T

-Circle => Circle
Returns this circle turned inside out — the same point set with the interior swapped.

operator fun <T : Dipole> T.unaryMinus(): T

-Dipole => Dipole
Returns this dipole with its endpoints exchanged — the same point pair, opposite orientation.

operator fun <T : Line> T.unaryMinus(): T

-Line => Line
Returns this line with the opposite orientation — the same cut through the plane, positive side swapped.

-Direction => Direction
Returns the opposite free vector: the same length, reversed heading.

-RoundDirection => RoundDirection
Returns the opposite direction: the same magnitude, reversed heading.