collision v0.3.1 API Reference

Modules

Implements the separating axis theorem for collision detection

A general polygon is defined by its vertices; from these we can calculate the edges, centroid, rotation angles, and whether the polygon is concave or convex

An edge; the connection between two vertices

Helper functions useful for all polygons

A regular polygon is equiangular and equilateral — all angles and all sides be equal. With enough sides, a regular polygon tends toward a circle

A vertex is a point in the Cartesian space where a polygon’s edges meet

Wrapper around vector creation functions

Two-dimensional vectors used in detecting collisions

Three dimensional vectors

Protocols

Protocol defining an interface for checking whether objects are colliding