AlphaShape

class AlphaShape(val points: List<Vector2>)(source)

Class for creating alpha shapes. See the createContour and createShape methods to create an alpha shape.

Parameters

points

The points for which an alpha shape is calculated.

Constructors

Link copied to clipboard
constructor(points: List<Vector2>)

Properties

Link copied to clipboard
Link copied to clipboard
val points: List<Vector2>

Functions

Link copied to clipboard
fun createContour(): ShapeContour

Returns a closed ShapeContour representing an alpha shape without holes; the smallest alpha is chosen such that the corresponding alpha shape contains all input points and can be represented by a closed ShapeContour.

fun createContour(alpha: Double): ShapeContour

Creates an alpha shape without holes

Link copied to clipboard
fun createSegments(alpha: Double): List<LineSegment>

Creates an alpha shape

Link copied to clipboard
fun createShape(): Shape

Returns a Shape representing an alpha shape; the smallest alpha is chosen such that the corresponding alpha shape contains all input points and can be represented by a Shape (in particular, it consists of one component).

fun createShape(alpha: Double): Shape

Creates an alpha shape, possibly with holes

Link copied to clipboard
Link copied to clipboard