Sphere.Intersect
bool Intersect(Ray ray, Vec3& at)
Intersects a ray with this sphere, and finds if they intersect, and if so, where that intersection is! This only finds the closest intersection point to the origin of the ray.
| Ray ray | A ray to intersect with. |
| Vec3& at | An out parameter that will hold the closest intersection point to the ray’s origin. If there’s not intersection, this will be (0,0,0). |
| RETURNS: bool | True if intersection occurs, false if it doesn’t. Refer to the ‘at’ parameter for intersection information! |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!