Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Orthogonal view exactly like winows..how?!

This topic is 6158 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, I''m coding a litle GUI, and use for this the Orthogonal view. But the Orthogonal origin lays in the left bottom edge of my window, but i would have origin in the top left edge. Please can someone tell me how to setup the matrix for these translation?! Thanks alot... Mfg Impz0r

Share this post

Link to post
Share on other sites
Orthogonal View? Orthogonal view doesn''t mean anything... related to a specific location in space.

But to translate the camera to given position''s do this.

/// provided the camera is initially set to
/// View (0,0,0)
/// Pos(1,0,-5) //5 units behind z-axis
/// Top (0,1,0)


Device->GetTransform(D3DTS_VIEW, &mMatView);

/// See reference for exact definitions
//top view mMatView._4 (1-3) has the positions of the camera
mMatView._42 = -5.0f; // make camera be 5 above x axis (5.0f on the y axis)
mMatView._43 = mMatView - 5.0f; //provided camera was initially 5 behind positive x-axis

// once you edit them make sure to Device->SetTransform(...,mMatView);

This is a simple way to do it but, in a complex environment it might become bad to keep track of all the translations. I suggest doing similar things to the world matrix.

Share this post

Link to post
Share on other sites

  • 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!