Euclidean2DShapeFactory

Defines a factory of Shape for a bidimensional euclidean space.

Functions

Link copied to clipboard

A special shape which does not occupy space and does not intersect with any other, not even with itself.

Link copied to clipboard
abstract fun circle(radius: Double): Euclidean2DShape

A circle extends in the first and second axis by its diameter.

Link copied to clipboard
abstract fun circleSector(radius: Double, angle: Double, heading: Double): Euclidean2DShape

A circle sector is the portion of a disk enclosed by two radii and an arc and it extends in the first and second axis by its radius and angle.

Link copied to clipboard
abstract fun ellipse(width: Double, height: Double): Euclidean2DShape

An ellipse extends in the first and second axis by its width and height.

Link copied to clipboard
abstract fun rectangle(width: Double, height: Double): Euclidean2DShape

A rectangle extends in the first and second axis by its width and height.

Link copied to clipboard

Requires that the given shape is compatible with the ones provided by this factory, otherwise throws an exception.