Shape

Properties

Link copied to clipboard
abstract val centroid: S

The geometric center.

Link copied to clipboard
abstract val diameter: Double

The largest distance between any pair of vertices.

Link copied to clipboard
open val radius: Double

Half the diameter.

Functions

Link copied to clipboard
abstract fun contains(vector: S): Boolean

Check if the shape contains a vector.

Link copied to clipboard
abstract fun intersects(other: Shape<S, A>): Boolean

A shape intersects another if any of its points is contained in the other one.

Link copied to clipboard
abstract fun transformed(transformation: A.() -> Unit): Shape<S, A>

Transforms the shape.