Microsoft DirectX 8.1 (Visual Basic) |
Computes normals for each vertex in a mesh.
object.ComputeNormals( _ Mesh As D3DXBaseMesh)
If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
Note The input mesh must have the D3DFVF_NORMAL flag specified in its FVF.
A normal for a vertex is generated by averaging the normals of all faces that share that vertex.