sat

Undocumented in source.

Members

Functions

intersects
bool intersects(Polygon a, Polygon b)

Checks for an intersection between two polygons

intersects
bool intersects(Polygon a, Circle b)
bool intersects(Circle b, Polygon a)

Checks for an intersection between a polygon and a circle

project
Tuple!(float, "min", float, "max") project(Polygon poly, vec2 axis)

Projects a polygon onto an axis.

project
Tuple!(float, "min", float, "max") project(Circle circle, vec2 axis)

Projects a polygon onto an axis.

rectangleAABB
Polygon rectangleAABB(vec2 center, vec2 halfDimensions)

Creates an axis aligned rectangle as polygon.

Structs

Circle
struct Circle

Represents a circle in 2D space with origin at (0|0). +X = right, +Y = up

Polygon
struct Polygon

Represents a convex polygon with n vertices in 2D space with origin at (0|0). +X = right, +Y = up

Meta