Plane

Planes are really useful for collisions, intersections, and visibility testing!

This plane is stored using the ax + by + cz + d = 0 formula, where the normal is a,b,c, and the d is, well, d.

Instance Fields and Properties

   
float d The distance/travel along the plane’s normal from the origin to the surface of the plane.
Vec3 normal The direction the plane is facing.

Instance Methods

   
Plane Creates a Plane directly from the ax + by + cz + d = 0 formula!
Closest Finds the closest point on this plane to the given point!
Intersect Checks the intersection of a ray with this plane!