Jump to content
  • Advertisement
Sign in to follow this  
Firecore

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!