-
Notifications
You must be signed in to change notification settings - Fork 19
concepts camera
For some application, the default navigation may not be applicable and you may want to have exact control over the camera. This is achievable through these optional camera callbacks.
From inside the Map::renderTickRender
a series of callbacks are always called, in the order in which they are listed here.
This callback allows the application to read the current camera eye position (based on the default navigation) or, optionally, to change the eye position.
This allows to read and/or change the focus point of the camera. When used in conjunction with the default navigation, this point corresponds to the (objective) position point.
Here you may read or write (normalized) vector that corresponds to the local up direction.
At this point, the entire view matrix is computed from the two points and up vector. This callback allows you to read the matrix or to change it. The matrix must be a valid view matrix in OpenGL conventions.
This callback allows to read and modify some of the most commonly used parameters for the projection matrix. The Fov is vertical field of view in degrees. The Aspect is ratio of viewport sides. And the Near and Far are distances in front of the camera at which the rendering will be clipped.
Finally, the projection matrix is computed and again provided to the application to change it. The matrix must be a valid projection matrix in OpenGL conventions.
All length units in these callbacks are in physical units (usually meters).
It is not needed to set all the callbacks if the default values are applicable.