MeshGeometry3D的Normals属性和TextureCoordinates属性用于指定纹理如何贴到3D模型的表面去。
<MeshGeometry3D Positions="1,1,0 -1,1,0 -1,-1,01,-1,0"
上面的代码建立了一个简单的平面模型。

MSDN:Normal vectors are vectorsperpendicular to the face of each triangle that defines a mesh.Normals determine whether a given triangle face islit.(Normals决定了一个给定的三角面是否被照亮)
MSDN:Texture coordinates determine how aMaterial is mapped to the vertices of the triangles that make up amesh.
(TextureCoordinates决定了材质如何被映射到构成网格的三角形的顶点)
对于一个材质来说,它的顶点定义如下:

上面的代码: TextureCoordinates="1 0, 0 0, 0 1, 11"也就是说,将M1映射到P0,M0映射到P1,M3映射到P2,M2映射到P3,即:
本文介绍了MeshGeometry3D中Normals和TextureCoordinates属性的作用。Normals属性确定了三角形表面是否被照亮,而TextureCoordinates属性则定义了材质如何映射到3D模型的顶点上。
641

被折叠的 条评论
为什么被折叠?



