Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MatthewB

More FVF questions

This topic is 5804 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Why would I want to use the D3DFVF_XYZRHW flag versus the D3DFVF_XYZ flag? The extra float (RHW) describes "the position of a transformed vertex." Huh?? I thought it took 3 values(X,Y,Z) to describe a position in 3D space. How can ONE float do that? I guess I either do not understand what the help file means by that exact phrase, or I am missing out on some basic concept. Thanks again.

Share this post


Link to post
Share on other sites
Advertisement
I actually don''t know this for a fact, I''m just starting out in directX, but it looks like that fourth component might be the quaternion W. A quaternion is a four-tuple that has applications to rotations. Just a guess, hope it helps.

Share this post


Link to post
Share on other sites
RHW stands for "reciprocal homogeneous w".

Long story short, homogeneous coordinates (x, y, z, w) are used so that all matrix operations can be done with matrix multiplcation. Basically, they allow translation to be done with multiplication instead of addition. The short answer is that the reciprocal of w is a byproduct of those operations, and you can usually get by with a value of 1.0 for 2D stuff.

For a better explanation, you might want to take a closer look at matrix transformations.

Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces"

Share this post


Link to post
Share on other sites
Thanks, I thought it stood for Right-Handed-W(something).
I came to the conclusion that for what I am doing, that I do not need that in my FVF.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!