testCircleTriangle

Test whether the circle with center <code>(centerX, centerY)</code> and square radius <code>radiusSquared</code> intersects the triangle with counter-clockwise vertices <code>(v0X, v0Y)</code>, <code>(v1X, v1Y)</code>, <code>(v2X, v2Y)</code>. <p> The vertices of the triangle must be specified in counter-clockwise order. <p> Reference: <a href="http://www.phatcode.net/articles.php?id=459">http://www.phatcode.net/</a>

@param centerX the x coordinate of the circle's center @param centerY the y coordinate of the circle's center @param radiusSquared the square radius of the circle @param v0X the x coordinate of the first vertex of the triangle @param v0Y the y coordinate of the first vertex of the triangle @param v1X the x coordinate of the second vertex of the triangle @param v1Y the y coordinate of the second vertex of the triangle @param v2X the x coordinate of the third vertex of the triangle @param v2Y the y coordinate of the third vertex of the triangle @return <code>true</code> iff the circle intersects the triangle; <code>false</code> otherwise

  1. bool testCircleTriangle(double centerX, double centerY, double radiusSquared, double v0X, double v0Y, double v1X, double v1Y, double v2X, double v2Y)
    static
    bool
    testCircleTriangle
    (
    double centerX
    ,
    double centerY
    ,,
    double v0X
    ,
    double v0Y
    ,
    double v1X
    ,
    double v1Y
    ,
    double v2X
    ,
    double v2Y
    )
  2. bool testCircleTriangle(Vector2d center, double radiusSquared, Vector2d v0, Vector2d v1, Vector2d v2)

Meta