Ray

A position and a direction indicating a ray through space! This is a great tool for intersection testing with geometrical shapes.

Instance Fields and Properties

   
Vec3 direction The direction the ray is facing, typically does not require being a unit vector, or normalized direction.
Vec3 position The position or origin point of the Ray.

Instance Methods

   
Ray Basic initialization constructor! Just copies the parameters into the fields.
Intersect Checks the intersection of this ray with a plane!

Static Methods

   
FromTo A convenience function that creates a ray from point a, towards point b. Resulting direction is not normalized.