Sign in to follow this  
schupf

Normalizing plane required?

Recommended Posts

schupf    221
Hi, I have written AABB <-> view frustum culling code, which uses this line:
[source lang="cpp"if(D3DXVec3Dot( &(frustumPlanes[i].normal), &vmin) + frustumPlanes[i].distance > 0 ) 
   return INTERSECT_RESULT_OUTSIDE; 
This is just the normal plane equation and I check for the sign. If I just want to know on which half space a point is placed relative to a plane, does the plane then have to be normalized? (normalizing plane: normal = normal / |normal|, d = d / |normal|)

Share this post


Link to post
Share on other sites
DraganO    160
If you are just checking the sign, you don't have to normalize your plane. Your code will return the distance from your plane to vmin times the length of your normal, the results sign isn't affected.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this