testRayAar

Test whether the given ray with the origin <code>(originX, originY)</code> and direction <code>(dirX, dirY)</code> intersects the given axis-aligned rectangle given as its minimum corner <code>(minX, minY)</code> and maximum corner <code>(maxX, maxY)</code>. <p> This method returns <code>true</code> for a ray whose origin lies inside the axis-aligned rectangle. <p> Reference: <a href="https://dl.acm.org/citation.cfm?id=1198748">An Efficient and Robust Ray–Box Intersection</a>

@see #testRayAar(Vector2d, Vector2d, Vector2d, Vector2d)

@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 minX the x coordinate of the minimum corner of the axis-aligned rectangle @param minY the y coordinate of the minimum corner of the axis-aligned rectangle @param maxX the x coordinate of the maximum corner of the axis-aligned rectangle @param maxY the y coordinate of the maximum corner of the axis-aligned rectangle @return <code>true</code> if the given ray intersects the axis-aligned rectangle; <code>false</code> otherwise

  1. bool testRayAar(double originX, double originY, double dirX, double dirY, double minX, double minY, double maxX, double maxY)
    static
    bool
    testRayAar
    (
    double originX
    ,
    double originY
    ,
    double dirX
    ,
    double dirY
    ,
    double minX
    ,
    double minY
    ,
    double maxX
    ,
    double maxY
    )
  2. bool testRayAar(Vector2d origin, Vector2d dir, Vector2d min, Vector2d max)

Meta