D3DXMatrixOrthoLH width and height

Started by
1 comment, last by Firecore 15 years, 5 months ago
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?
Advertisement
Quote:Original post by Firecore
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?
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).
Thanks Evil Steve.
Something like this was exactly what I was looking for.

This topic is closed to new replies.

Advertisement