intersectLineCircle

Test whether the line defined by the two points <code>(x0, y0)</code> and <code>(x1, y1)</code> intersects the circle with center <code>(centerX, centerY)</code> and <code>radius</code>, and store the center of the line segment of intersection in the <code>(x, y)</code> components of the supplied vector and the half-length of that line segment in the z component. <p> Reference: <a href="http://math.stackexchange.com/questions/943383/determine-circle-of-intersection-of-plane-and-sphere">http://math.stackexchange.com</a>

@param x0 the x coordinate of the first point on the line @param y0 the y coordinate of the first point on the line @param x1 the x coordinate of the second point on the line @param y1 the y coordinate of the second point on the line @param centerX the x coordinate of the circle's center @param centerY the y coordinate of the circle's center @param radius the radius of the circle @param intersectionCenterAndHL will hold the center of the line segment of intersection in the <code>(x, y)</code> components and the half-length in the z component @return <code>true</code> iff the line intersects the circle; <code>false</code> otherwise

  1. bool intersectLineCircle(double a, double b, double c, double centerX, double centerY, double radius, Vector3d intersectionCenterAndHL)
  2. bool intersectLineCircle(double x0, double y0, double x1, double y1, double centerX, double centerY, double radius, Vector3d intersectionCenterAndHL)
    public static
    bool
    intersectLineCircle
    (
    double x0
    ,
    double y0
    ,
    double x1
    ,
    double y1
    ,
    double centerX
    ,
    double centerY
    ,
    double radius
    ,)

Meta