-
Notifications
You must be signed in to change notification settings - Fork 5
coll.um
Marek Maskarinec edited this page Sep 14, 2022
·
1 revision
Builtin collision functions. The ic argument stores the collision position.
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*(p: th.Vf2, q: th.Quad, ic: ^th.Vf2): bool {
Checks for a collision between a vf2 and a quad.
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*(q1, q2: th.Quad, ic: ^th.Vf2): bool {
Check for a collision between two quads.