A3DGraphCameraData Struct Reference
A complete description of a view point within a three-dimensional space (A3DGraphCamera
).
More...
Data Fields | |
A3DBool | m_bOrthographic |
If true, the projection is orthographic. If false it is perspective. | |
A3DDouble | m_dAspectRatio |
The X/_Y_ ratio in a perspective projection. | |
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_dZFar |
The distance from the viewer to the far clipping plane. | |
A3DDouble | m_dZNear |
The distance from the viewer to the near clipping plane. | |
A3DDouble | m_dZoomFactor |
A zoom factor which can be applied to the projection. | |
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. | |
Detailed Description
A complete description of a view point within a three-dimensional space (A3DGraphCamera
).
- Version
- 2.0
A camera can be descriped 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 spaces before submitting it to the next steps of its rendering pipeline.
- 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 view 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.m_dXFovy
: The field of view angle in the y direction. Usually equal equal tom_dYFovy
.m_dAspectRatio
: The ratiom_dXFovy / m_dYXFovy
isually 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_FALSE
) the objects are rendered the same size regardless of their distance from the point of view. An orthographic projection is described using the follow properties:m_dXFovy
: The view size along the X axism_dYFovy
: The view size 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 informations, some implementation provide a zoom factor (
m_dZoomFactor
) which can be applied. This field is usually ignored as both perspective and orthographic projections contain this information.