Hey guys, I have been looking all over google and cannot find a consistent method for finding the signed distance between a point and a plane. My planes are defined by a point and a normal. Here is what I have.
JGCameraPlane p;
// Calculate D part of plane equation
float d = -dotProduct(p.normal, p.point);
What do I do from here? Did I calculate the "D" right? As I said I have googled this all day and I cannot find a straight forward answer.
EDIT
Here is my adaptation. Does everything look good?
float sb, sn, sd;
point3D b;
sn = -dotProduct( p.normal, (vectorSubtract(point,p.point)));
sd = dotProduct(p.normal, p.normal);
sb = sn / sd;
b = vectorAdd(point, vectorScale(p.normal, sb));
point3D dif = vectorSubtract(point, b);
float dist = sqrtf(dotProduct(dif,dif));
if (dist < 0)
return NO;