Moved to use a ray type instead of the origins and normals directly