Following http://www.gamedev.net/topic/106765-determining-if-a-point-is-in-front-of-or-behind-a-plane/ doesn't work
I have a plane with normal and distance along normal to plane from origin and a point I'm testing.
bool PointBehindPlane(Vec3f p, Vec3f normal, float dist)
{
float result = p.x*normal.x + p.y*normal.y + p.z*normal.z + dist;
// 1*286.852 + 0*2 + 0*423.175 + 289.256 = 286.852
//if(result < 0)
if(result < EPSILON)
return true;
return false;
}
As in the comment, it says the point (286.852, 2, 423.175) isn't behind the plane (1,0,0)d=289.256.