## Detailed Description

A complete description of a view point within a three-dimensional space (`A3DGraphCamera`).

A camera can be described as a virtual device within a three-dimensional space where properties allow a viewing application to generate a view point. A graphics application can use camera information to translate a graphics scene from world space to view, then projection space before submitting it to the next steps of its rendering pipeline.

Version

2.0

Camera position and orientation

The position and orientation of any camera is expressed using three vectors:

• `m_sLocation`: the location of the camera in the world space, which defines where the viewer looks from.

• `m_sLookAt`: the “look at” position of the camera, which is a point in world space the viewer is looking at.

• `m_sUp`: the “up” vector which sets the general direction of “up” for the camera. These three vectors are used to compute the transform needed for translating from world space to view space.

Perspective projection

With perspective projection (`m_bOrthographic == A3D_FALSE`) the objects in the scene appear smaller the further they are from the point of view. A perspective projection is described using the following properties:

• `m_dYFovy`: The field of view angle in the y direction, in radians.

• `m_dXFovy`: The field of view angle in the x direction, in radians. Usually equal to `m_dYFovy`.

• `m_dAspectRatio`: The ratio `m_dXFovy / m_dYFovy`. Usually 1.0 if both angles are equal.

• `m_dZNear`: The distance from the viewer to the near clipping plane.

• `m_dZFar`: The distance from the viewer to the far clipping plane.

Orthographic projection

With orthographic projection (`m_bOrthographic == A3D_TRUE`) the objects are rendered the same size regardless of their distance from the point of view. An orthographic projection is described using the following properties:

• `m_dXFovy`: The view extent along the X axis

• `m_dYFovy`: The view extent along the Y axis

• `m_dZNear`: The distance from the viewer to the near clipping plane.

• `m_dZFar`: The distance from the viewer to the far clipping plane.

Zoom Factor

Along with the projection information, some implementations provide a zoom factor (`m_dZoomFactor`) which can be applied. This field is usually ignored as both perspective and orthographic projections contain this information.

Public Members

A3DBool m_bOrthographic

If A3D_TRUE, the projection is orthographic. If A3D_FALSE it is perspective.

A3DVector3dData m_sLocation

The position of the camera in world space coordinates.

A3DVector3dData m_sLookAt

The “look at” camera position, in world space coodinates.

A3DVector3dData m_sUp

The camera “up” vector.

A3DDouble m_dXFovy

The view angle in radians (perspective) of the view size (orthographic) along the X axis.

A3DDouble m_dYFovy

The view angle in radians (perspective) of the view size (orthographic) along the Y axis.

A3DDouble m_dAspectRatio

The X/_Y_ ratio in a perspective projection.

A3DDouble m_dZNear

The distance from the viewer to the near clipping plane.

A3DDouble m_dZFar

The distance from the viewer to the far clipping plane.

A3DDouble m_dZoomFactor

A zoom factor which can be applied to the projection.