Polygon

data class Polygon(val vertices: List<Vec2>, val radius: Float = 0.0f)

A solid convex polygon shape geometry.

Use the companion object helper functions to create common polygons.

Parameters

vertices

The polygon vertices (max 8 vertices)

radius

Optional external radius for rounded polygons

Constructors

Link copied to clipboard
constructor(vertices: List<Vec2>, radius: Float = 0.0f)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard