0

I'm working on a project C++, and I want to render a 3D object (a character ) to screen.

I can get the height of this object with APIs, it equals to 1.6666 , and I don't know what it's mean.

I know the viewport which is set by directX ( SCR_W, SCR_H), the Orthographic projection matrix (was created by directX API with parameters : view width, view height, near & far ).

Could I get the correct height of this object when it 's rendered to screen ?

Thank for your help.

Floris
  • 45,857
  • 6
  • 70
  • 122
Ki3nTT
  • 11
  • 1

1 Answers1

0

The coordinate [0, 1.6666] will be multiplied by the Orthographic projection matrix to give the homogenous coordinate ([-1, -1] is the bottom left of the screen and [1, 1] is the top right). This is then multiplied by the viewport dimensions / 2 to give the final screen coordinate.

It sounds like your orthographic projection has been created to match the screen resolution. This means that 1.6666 will correspond to 1.6666 pixels after it has been transformed.

gareththegeek
  • 2,362
  • 22
  • 34