Function intrSphereVsPlane

Checks sphere and plane for intersection

Intersection intrSphereVsPlane (
  ref Sphere sphere,
  ref Plane plane
);

Example

Sphere sphere = Sphere(Vector3f(0, 0.9f, 0), 1.0f);
Plane plane = Plane(Vector3f(0, 1, 0), 0.0f);
Intersection isec = intrSphereVsPlane(sphere, plane);
assert(isec.fact);
assert(isConsiderZero(isec.penetrationDepth - 0.1f));
assert(isAlmostZero(isec.point - Vector3f(0.0f, -0.1f, 0.0f)));
assert(isAlmostZero(isec.normal - Vector3f(0.0f, 1.0f, 0.0f)));