VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RE: ?huh? PyroBoy (3 replies, 0 views) (2000-Apr-24) I don't claim to understand it... But I think that a face normal can be computed using a mathematical process called the cross product.
The cross product of 2 vectors returns a vector that is perpendicular to both of them. So you create a couple of D3DVECTOR types that represent 2 sides of any given poly, and pass them to the DirectX7 object's VectorCrossProduct method, which should then return a face normal for the poly, which you can apply to each of the vertex normals in the poly. Of course, the afformentioned problem with polys that share vertices comes up.
I'm having trouble getting the whole process running right now. If I get something that works right I'll post it.
|