Original Post
Hi,
i can classify a point to a plane this way:
float dist = DotProduct(myPoint, myPlane.normal) + myPlane.d;
if dist > EPSILON then point is in front of plane
if dist < EPSILON then point is behind plane
else point is on plane
the problem is, this method works on any code, but not for my triangle splitting / bsp trees!
to get my splitter / bsp working, i must use this code to classify a point to a plane:
Can someone tell me why i only works with the second method in some cases? In either case, i only test points to a plane-it has nothing to do with flipping the greater/less, that was verified already.
thanks
Gammastrahler
vector3 myPointOnPlane = myPlane.Normal; myPointOnPlane.Scale(-myPlane.d); vector3 myVec = myPointOnPlane - myPoint; float dist = DotProduct(myVec, myPlane.normal); if dist > EPSILON then point is in front of plane if dist > EPSILON then point is behind plane else point is on plane