且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

计算网格的顶点法线

更新时间:2023-11-12 23:36:28

but how the heck do you find the adjacent faces for each vertex?

Think it otherway round: Iterate over the faces and add to the normal of the vertex. Once you processed all faces, normalize the vertex normal to unit length. I described it in detail here

Calculating normals in a triangle mesh

If you really want to find the faces for a vertex, the naive approach is to perform (linear) search for the vertex in the list of faces. A better approach is to maintain an adjancy list.

相关阅读

推荐文章