I have a three-dimensional scene with a perspective projection.
I want to put the scene into the screen based on the bounding box ( minand max).
min
max
I focused my scene like this:
glm::vec3 center = (min + max) / 2.0f; rootNode->translate(-center.x, -center.y, -center.z);
Now I need a scale factor to scale my rootNode to fit the screen. How to do it?
(this: 8.070 How can I automatically calculate the view displaying my entire model? (I know the border of the frame and up.) does not help, because it is based on orthogonal projection)
, , , , min max, .
.
, theta, "", v. d ( v) , v. , , :
theta
v
d
2 * d * tan(theta / 2).
z, d z.
z
, . "fovy" ( / ), - .
Source: https://habr.com/ru/post/1588896/More articles:Удаление атрибутов элемента при нажатии на него с помощью Vanilla JS - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1588892/pandas-tosql-fails-on-duplicate-primary-key&usg=ALkJrhije5DLFIVmT5C1jc_WD3-ji5_0RQangular prepend `TypeError: Не удается прочитать свойство "childNodes" из undefined` - javascriptTypeError: Cannot read the 'childNodes' property from undefined in AngularJS directive - angularjsResize GUI? - javaUpdate WebSocket Scope service in Angular (using ngWebSocket)? - javascriptDuck prints trouble. Duck typing test for "i-am-like-a-list" - pythonXcode 6.3 - Автоматический синтез свойств не будет синтезировать свойство - iosLogin via HTTP AsyncTask - androidUsing time duration format plugin inside Angular controller - javascriptAll Articles