Region2

class Region2(val rings: Array<Ring2>)(source)

Represents a 2D region composed of multiple rings, where each ring defines a contour of the region. Multiple rings can be used to create complex shapes, including those with holes.

Constructors

Link copied to clipboard
constructor(rings: Array<Ring2>)

Creates a Region2 object with the specified rings.

constructor(rings: Iterable<Ring2>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The bounding box, represented by Box2, that encompasses all the rings in the region.

Link copied to clipboard

An array of Ring2 objects that represent the contours of the region.

Functions

Link copied to clipboard
operator fun contains(p: Vec2): Boolean
Link copied to clipboard
fun difference(region: Region2): Region2
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun union(region: Region2): Region2