# D3DXMatrixOrthoLH width and height

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

## Recommended Posts

Hi guys. Whanted to know, when we use D3DXMatrixOrthoLH, what does the function mean by width and height. For example, when it says height, does it mean my max y-axis value = height or does it mean the height from one end to the other?

##### Share on other sites
Quote:
 Original post by FirecoreHi guys.Whanted to know, when we use D3DXMatrixOrthoLH, what does the function mean by width and height.For example, when it says height, does it mean my max y-axis value = height or does it mean the height from one end to the other?
From the docs for D3DXMatrixOrthoOffCenterLH:
Quote:
 The D3DXMatrixOrthoLH function is a special case of the D3DXMatrixOrthoOffCenterLH function. To create the same projection using D3DXMatrixOrthoOffCenterLH, use the following values: l = -w/2, r = w/2, b = -h/2, and t = h/2.

So width and height are the length of the X and Y axes, and the coordinate range is from (-x/2, -y/2) to (x/2, y/2).

##### Share on other sites
Thanks Evil Steve.
Something like this was exactly what I was looking for.

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5

• 9
• 12
• 16
• 26
• 10
• ### Forum Statistics

• Total Topics
633769
• Total Posts
3013759
×