Package-level declarations

Types

Link copied to clipboard
sealed interface Composite : Shape

Marker for a shape built from blades by composition — not itself a CGA element.

Link copied to clipboard
open class Polygon(val vertices: List<FlatPoint>) : Composite

Closed loop of straight edges through a cycle of vertices.

Link copied to clipboard
open class Polyline(val vertices: List<FlatPoint>) : Composite

Open chain of straight edges through a sequence of vertices.

Link copied to clipboard

The four visually named sides of a rectangle.

Link copied to clipboard
open class Segment : Composite

Bounded line segment between its endpoints.

Functions

Link copied to clipboard
operator fun List<Segment>.get(side: RectSide): Segment

edges[RectSide] => Segment
Returns the edge that visually faces side's way, whatever the loop's pose or orientation.

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

-Polygon => Polygon
Returns this polygon turned inside out — the same loop walked in reverse.

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

-Polyline => Polyline
Returns this chain walked in reverse — the same edges traversed from the other end.

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

-Segment => Segment
Returns this segment with its endpoints exchanged — the same chord, opposite orientation.