struct 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.
Plane p The internal, wrapped System.Numerics type. This can be nice to have around so you can pass its fields as ‘ref’, which you can’t do with properties. You won’t often need this, as implicit conversions to System.Numerics types are also provided.

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!

Static Methods

   
FromPoint Creates a plane from a normal, and any point on the plane!
FromPoints Creates a plane from 3 points that are directly on that plane.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!