A3DGraphCameraData
Fields
Detailed Description
-
struct A3DGraphCameraData
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
See also
See also
See also
- 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 tom_dYFovy
.m_dAspectRatio
: The ratiom_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 axism_dYFovy
: The view extent along the Y axism_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.