开发者

3D Vector transformations - when to use w = 1

I'm writing some code that transforms vectors with matrices in D3DX9. When is the correct time to use w=0 and w=1? The MSDN documentation is not terribly helpful in this reg开发者_如何学编程ard.


When the vector is representing a direction (e.g. a vertex normal) w should be zero, If the vector is representing a point in 3d space (e.g. location of a vertex) then w = 1.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜