Skip to content

coll.um

Marek Maskarinec edited this page Sep 14, 2022 · 1 revision

coll.um

 Builtin collision functions. The ic argument stores the collision position.

fn lineToLine*

fn lineToLine*(b1, e1, b2, e2: th.Vf2, ic: ^th.Vf2): bool {

Checks for a collision between 2 lines specified by their end points.

fn vf2ToQuad*

fn vf2ToQuad*(p: th.Vf2, q: th.Quad, ic: ^th.Vf2): bool {

Checks for a collision between a vf2 and a quad.

fn lineToQuad*

fn lineToQuad*(b, e: th.Vf2, q: th.Quad, ic: ^th.Vf2): bool {

Check for a collision between a line and quad edges.

fn quadToQuad*

fn quadToQuad*(q1, q2: th.Quad, ic: ^th.Vf2): bool {

Check for a collision between two quads.

Clone this wiki locally