#### Archived

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

# RHW?

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

## Recommended Posts

I have seen it in a lot of the tutorials but have never seen an explanation for it. I think taking it out of my user-type is what screwed my work up, so I would like to know more about it... Thanks for any help!

##### Share on other sites
Has to deal with "homogenous coordinate spaces". In homogenouse coordinate spaces, several different coordinates can point to the same point in space. This is because each component of the coordinate is multiplied by a constant (the same constant).

i.e. (1.0,1.0,1.0,1.0) = (2.0,2.0,2.0,2.0)
the general form of this could be (ax,ay,az,aw)

where "a" is the constant, and x,y,z,w are the components.

When you do transformations the w coordinate my not come out as 1.0 (which is required by DirectX and OpenGL), if this happens you have to multiply all the components by 1/w or the reciprocol of the homgenous w to fix it to the proper coordinate space.

Sorry if that was a bit technical, but it''s the only way I know how to explain it.

-Omalacon

##### Share on other sites
Not sure this is what you are looking for:

D3DFVF_XYZRHW tells the system that your game has already transformed the verticies and Direct3D does not have to do it. Therefore, you will typically see the coordinates defines in terms of the screen. Where x is 0 to screen width. Also I believe the z coordinate is almays parrellel with the screen.

D3DFVF_XYZ is pretransformed. Therefore, you will typically see verties defines from -1 to 1. Where 0 is normally the center of the image.

Hope that helped?

##### Share on other sites
sdoherty55 is correct. Plus this allows you to use the z coordinate as a z-buffer. This way, you can have items with the lower z coordinate drawn last, so they appear to be on top.

---
Make it work.
Make it fast.

1. 1
2. 2
Rutin
19
3. 3
khawk
15
4. 4
5. 5
A4L
13

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633744
• Total Posts
3013652
×