testLineSegmentSphere

Test whether the line segment with the end points <code>(p0X, p0Y, p0Z)</code> and <code>(p1X, p1Y, p1Z)</code> intersects the given sphere with center <code>(centerX, centerY, centerZ)</code> and square radius <code>radiusSquared</code>. <p> Reference: <a href="http://paulbourke.net/geometry/circlesphere/index.html#linesphere">http://paulbourke.net/</a>

@param p0X the x coordinate of the line segment's first end point @param p0Y the y coordinate of the line segment's first end point @param p0Z the z coordinate of the line segment's first end point @param p1X the x coordinate of the line segment's second end point @param p1Y the y coordinate of the line segment's second end point @param p1Z the z coordinate of the line segment's second end point @param centerX the x coordinate of the sphere's center @param centerY the y coordinate of the sphere's center @param centerZ the z coordinate of the sphere's center @param radiusSquared the sphere radius squared @return <code>true</code> if the line segment intersects the sphere; <code>false</code> otherwise

  1. bool testLineSegmentSphere(double p0X, double p0Y, double p0Z, double p1X, double p1Y, double p1Z, double centerX, double centerY, double centerZ, double radiusSquared)
    static
    bool
    testLineSegmentSphere
    (
    double p0X
    ,
    double p0Y
    ,
    double p0Z
    ,
    double p1X
    ,
    double p1Y
    ,
    double p1Z
    ,
    double centerX
    ,
    double centerY
    ,
    double centerZ
    ,)
  2. bool testLineSegmentSphere(Vector3d p0, Vector3d p1, Vector3d center, double radiusSquared)

Meta