const collision line_aabb(const line &a, const aabb &b) { collision r; r.result = false; for (int i = 0; i < 4; ++i) { r.result = r.result || line_line(a, b.edge(i)).result; } return r; }
void draw_aabb(const mat4 &m, const aabb &a, const vec4 &color) { for (int i = 0; i < 4; ++i) draw_line(m, a.edge(i), color); }