Function veloren_voxygen::scene::math::aabb_to_planes
source ยท pub fn aabb_to_planes<T: Float>(bounds: Aabb<T>) -> [Vec4<T>; 6]
Expand description
Each Vec4 <a, b, c, -d> should be interpreted as reprenting plane equation
a(x - x0) + b(y - y0) + c(z - z0) = 0, i.e. ax + by + cz - (a * x0 + b * y0 + c * z0) = 0, i.e. ax + by + cz = (a * x0 + b * y0 + c * z0), i.e. (letting d = a * x0 + b * y0 + c * z0) ax + by + cz = d
where d is the distance of the plane from the origin.