findClosestPointOnRectangle

Find the point on a given rectangle, specified via three of its corners, which is closest to the specified point <code>(pX, pY, pZ)</code> and store the result into <code>res</code>. <p> Reference: Book "Real-Time Collision Detection" chapter 5.1.4.2 "Closest Point on 3D Rectangle to Point"

@param aX the x coordinate of the first corner point of the rectangle @param aY the y coordinate of the first corner point of the rectangle @param aZ the z coordinate of the first corner point of the rectangle @param bX the x coordinate of the second corner point of the rectangle @param bY the y coordinate of the second corner point of the rectangle @param bZ the z coordinate of the second corner point of the rectangle @param cX the x coordinate of the third corner point of the rectangle @param cY the y coordinate of the third corner point of the rectangle @param cZ the z coordinate of the third corner point of the rectangle @param pX the x coordinate of the point @param pY the y coordinate of the point @param pZ the z coordinate of the point @param res will hold the result @return res

public static
findClosestPointOnRectangle
(
double aX
,
double aY
,
double aZ
,
double bX
,
double bY
,
double bZ
,
double cX
,
double cY
,
double cZ
,
double pX
,
double pY
,
double pZ
,)

Meta