What is an OpenGL® camera?

"OpenGL® Camera" is the name of the viewer's virtual position in the Open Graphics Library® (OpenGL®) scene. It is defined by the position of the viewer in the scene and then by placing or direction in which the viewer is looking for. The position of the camera in the OpenGL® scene determines what part of the scene will be drawn to the display device and at what angle. To describe the OpenGL® camera, two matrixs are used: Matrix ModelView and projection nuts that describe the position of the camera and the way in which the objects are searched for. The camera is able to move to the scene to show different areas or simulate movement, although in many cases it is easier or more efficient to move objects in the scene instead of a camera. This is largely BecAuse some transformations and other functions do not work in the same way on the camera as on the standard OpenGL® object. In addition, comprehensive OpenGL® camera operations usually require professional competence with mathematics Matrix and understanding OpenGL® transformation pipes. OpenGL® library support exist nWell, although it can be difficult to rely solely on the tool support sets in interactive applications.

OpenGL® camera is defined using ModelView matrix. The camera can be placed anywhere on the scene and translate or turn along any axis. In many applications, especially applications that contain only a handful of objects, it may be easier to apply inverse transformations to objects in the scene to appear movement. Basically, the whole scene moves around the status camera in this case. For larger scenes, it may be easier to deal with the complexity of the pipe and mathematics of the matrix to move the camera freely and leave the static scene.

The OpenGL® camera attributes are controlled by a projection nut. To use the camera analogy, the matrix can be projected as a type of lens used. The projection matrix is ​​often modified to create orthographic projections that have no modificationsFor perspective, and perspective projections that correspond to the distance when determining the size of objects. Other effects, such as lens of fish eyes, focal length or different aspect ratios, can be adjusted using a projection nut.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?