intersectSphereSphere

Test whether the one sphere with center <code>(aX, aY, aZ)</code> and square radius <code>radiusSquaredA</code> intersects the other sphere with center <code>(bX, bY, bZ)</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 aX the x coordinate of the first sphere's center @param aY the y coordinate of the first sphere's center @param aZ the z coordinate of the first sphere's center @param radiusSquaredA the square of the first sphere's radius @param bX the x coordinate of the second sphere's center @param bY the y coordinate of the second sphere's center @param bZ the z coordinate of 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)
    static
    bool
    intersectSphereSphere
    (
    double aX
    ,
    double aY
    ,
    double aZ
    ,,
    double bX
    ,
    double bY
    ,
    double bZ
    ,,)
  2. bool intersectSphereSphere(Vector3d centerA, double radiusSquaredA, Vector3d centerB, double radiusSquaredB, Vector4d centerAndRadiusOfIntersectionCircle)

Meta