testRayCircle

Test whether the given ray with the origin <code>(originX, originY)</code> and direction <code>(dirX, dirY)</code> intersects the given circle with center <code>(centerX, centerY)</code> and square radius <code>radiusSquared</code>. <p> This method returns <code>true</code> for a ray whose origin lies inside the circle. <p> Reference: <a href="http://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-sphere-intersection">http://www.scratchapixel.com/</a>

@param originX the x coordinate of the ray's origin @param originY the y coordinate of the ray's origin @param dirX the x coordinate of the ray's direction @param dirY the y coordinate of the ray's direction @param centerX the x coordinate of the circle's center @param centerY the y coordinate of the circle's center @param radiusSquared the circle radius squared @return <code>true</code> if the ray intersects the circle; <code>false</code> otherwise

  1. bool testRayCircle(double originX, double originY, double dirX, double dirY, double centerX, double centerY, double radiusSquared)
    static
    bool
    testRayCircle
    (
    double originX
    ,
    double originY
    ,
    double dirX
    ,
    double dirY
    ,
    double centerX
    ,
    double centerY
    ,)
  2. bool testRayCircle(Vector2d origin, Vector2d dir, Vector2d center, double radiusSquared)

Meta