This topic is now archived and is closed to further replies.

how to calculate face normals?

This topic is 5794 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I now have a clue about BSP, but I need to calculate the face normals for all my polygons. I tried looking in the SKD docs, but they didn''t say. (it says normals are calculated by D3D when needed, so you don''t have to worry about them). Anyone know a formula to do this? Proceeding on a brutal rampage is the obvious choice.

Share this post

Link to post
Share on other sites
If you have three points of the triangle: A,B,C, then you do this:

vector Normal;
vector U;
vector V;

U = A - C;
V = A - B;

Normal = U cross V;

"Cross" is the cross-product. If A, B, and C are in counterclockwise order, this will return the correct normal... either that, or clockwise order, I forget.

~CGameProgrammer( );

Share this post

Link to post
Share on other sites