Sign in to follow this  

what is the RHW of D3DFVF_XYZRHW?

This topic is 4778 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

Below is an example: typedef struct _tagSimpleVertex { float x,y,z; float rhw; } SIMPLEVERTEX; #define FVF_SIMPLEVERTEX (D3DFVF_XYZRHW) What is the RHW value? i know it stands for Reciprocal of Homogeneous W (RHW) and that it is the reciprocal of the w coordinate in the homogeneous point (x,y,z,w) can you tell me what homogeneous means in this context and also how to find the reciprocal of any value, what does that mean? From what i read the W value indicated that a 1 by 4 vector was a point, or an actual vector. So w=1 is a point in 3D space on the 4D place 1, and w=0 is a vector If anyone can help can you use simpleton words, I have been racking my brains over this one so your help will come as great relief

Share this post


Link to post
Share on other sites
Homogeneous coordinates are coordinate systems that allow for concatenation of all transformations into a single operation. Using NxN matrices for transformations in an N-dimensional vector space, it is impossible to effect linear translation of the coordinates. Consequently, by using N+1-dimensional homogenous coordinates and (N+1)x(N+1) matrices, rotation, scaling and transformation can be concatenated into a single matrix.

For DirectX, the RHW field of your flexible vertex format serves to indicate that the vertex is a transformed vertex, and is also a normalizing coefficient for the other coordinates (since most people using 1 for RHW, it has no effect).

Share this post


Link to post
Share on other sites

This topic is 4778 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this