Sign in to follow this  

D3DXMatrixOrthoLH width and height

This topic is 3312 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
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

This topic is 3312 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this