Table of Contents

Struct Polygon2D

Namespace
Pinwheel.Vista.Geometric
Assembly
Pinwheel.Vista.Runtime.dll

Represents a simple 2D polygon defined by an ordered vertex loop.

public struct Polygon2D
Inherited Members

Remarks

This type is used by Local Procedural Biome overlap tests. It stores vertices as supplied and does not enforce winding order or convexity.

Constructors

Polygon2D(Vector2[])

Creates a polygon from an ordered vertex array.

Properties

vertices

Gets or sets the polygon vertices in loop order.

Methods

Contains(Vector2)

Tests whether a point lies inside the polygon or on one of its vertices or edges.

GetSegments()

Gets the polygon edge segments in loop order.

IsOverlap(Polygon2D, Polygon2D)

Tests whether two polygons overlap.