intersectSphereSphere

Test whether the one sphere with center <code>centerA</code> and square radius <code>radiusSquaredA</code> intersects the other sphere with center <code>centerB</code> and square radius <code>radiusSquaredB</code>, and store the center of the circle of intersection in the <code>(x, y, z)</code> components of the supplied vector and the radius of that circle in the w component. <p> The normal vector of the circle of intersection can simply be obtained by subtracting the center of either sphere from the other. <p> Reference: <a href="http://gamedev.stackexchange.com/questions/75756/sphere-sphere-intersection-and-circle-sphere-intersection">http://gamedev.stackexchange.com</a>

@param centerA the first sphere's center @param radiusSquaredA the square of the first sphere's radius @param centerB the second sphere's center @param radiusSquaredB the square of the second sphere's radius @param centerAndRadiusOfIntersectionCircle will hold the center of the circle of intersection in the <code>(x, y, z)</code> components and the radius in the w component @return <code>true</code> iff both spheres intersect; <code>false</code> otherwise

  1. bool intersectSphereSphere(double aX, double aY, double aZ, double radiusSquaredA, double bX, double bY, double bZ, double radiusSquaredB, Vector4d centerAndRadiusOfIntersectionCircle)
  2. bool intersectSphereSphere(Vector3d centerA, double radiusSquaredA, Vector3d centerB, double radiusSquaredB, Vector4d centerAndRadiusOfIntersectionCircle)

Meta