Types
Collider = object transform*: Mat4 = (data: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]) case theType*: ColliderType of Box: nil of Sphere: radius*: float32 of Points: points*: seq[Vec3f]
ColliderType = enum Box, Sphere, Points
Procs
func calculateCollider(points: openArray[Vec3f]; theType: ColliderType): Collider {. ...raises: [], tags: [], forbids: [].}
func intersects(a, b: Collider; as2D = false): bool {....raises: [Exception], tags: [], forbids: [].}
proc rayIntersectAABB(origin, dir, boxA, boxB: Vec3f): Option[(Vec3f, float32)] {. ...raises: [], tags: [], forbids: [].}