开发者

textureMappingu/v in common Vertex structures?

Looking through some directx examples, I'm often seeing the structure for a vertex to be defined as such:

struct Vertex
{
    vector position;
    ve开发者_如何学运维ctor normal;
    int textureMappingu;
    int textureMappingv;
}

Under this type of vertex, what are textureMappingu/v for?


Used for texture mapping. Vector [u,v] is coordinate of vertex in texture space (2D texture obviously). One picture is worth more than thousand words in this case - see how each vertex is mapped onto texture and how is texture face "warped" so triangle areas has same texture resolution.

alt text http://www.cheetah3d.com/img/about/uv_pic3.png

If you need to know more - look for UV mapping.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜