intersectPlaneSweptSphere

Test whether the plane with the general plane equation <i>a*x + b*y + c*z + d = 0</i> intersects the moving sphere with center <code>(cX, cY, cZ)</code>, <code>radius</code> and velocity <code>(vX, vY, vZ)</code>, and store the point of intersection in the <code>(x, y, z)</code> components of the supplied vector and the time of intersection in the w component. <p> The normal vector <code>(a, b, c)</code> of the plane equation needs to be normalized. <p> Reference: Book "Real-Time Collision Detection" chapter 5.5.3 "Intersecting Moving Sphere Against Plane"

@param a the x factor in the plane equation @param b the y factor in the plane equation @param c the z factor in the plane equation @param d the constant in the plane equation @param cX the x coordinate of the center position of the sphere at t=0 @param cY the y coordinate of the center position of the sphere at t=0 @param cZ the z coordinate of the center position of the sphere at t=0 @param radius the sphere's radius @param vX the x component of the velocity of the sphere @param vY the y component of the velocity of the sphere @param vZ the z component of the velocity of the sphere @param pointAndTime will hold the point and time of intersection (if any) @return <code>true</code> iff the sphere intersects the plane; <code>false</code> otherwise

public static
bool
intersectPlaneSweptSphere
(
double a
,
double b
,
double c
,
double d
,
double cX
,
double cY
,
double cZ
,
double radius
,
double vX
,
double vY
,
double vZ
,)

Meta