Original Post
🔒 Locked
RHW?
Advertisement
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
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
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?
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?
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.
---
Make it work.
Make it fast.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement