#include <FCDCamera.h>
Inheritance diagram for FCDCamera:
Public Types | |
enum | ProjectionType { PERSPECTIVE, ORTHOGRAPHIC } |
The types of projection supported. More... | |
Public Member Functions | |
DeclareFlag (HasHorizontalView, 0) | |
DeclareFlag (HasVerticalView, 1) | |
DeclareFlagCount (2) | |
5 flags are locally declared. | |
FCDCamera (FCDocument *document) | |
Constructor: do not use directly. | |
virtual | ~FCDCamera () |
Destructor. | |
virtual Type | GetType () const |
Retrieves the entity type for this class. | |
ProjectionType | GetProjectionType () const |
Retrieves the type of projection of this camera. | |
void | SetProjectionType (ProjectionType type) |
Sets the type of projections for this camera. | |
DEPRECATED (3.05A, GetProjectionType()==FCDCamera::PERSPECTIVE) inline bool IsPerspective() const | |
Retrieves whether this camera is a perspective camera. | |
DEPRECATED (3.05A, SetProjectionType(FCDCamera::PERSPECTIVE)) inline void SetPerspective() | |
Sets the type of this camera to perspective. | |
bool | HasHorizontalFov () const |
Retrieves whether the perspective camera defines an horizontal field of view. | |
bool | HasVerticalFov () const |
Retrieves whether the perspective camera defines a vertical field of view. | |
FCDParameterAnimatableFloat & | GetFovX () |
Retrieves the horizontal field of view. | |
const FCDParameterAnimatableFloat & | GetFovX () const |
See above. | |
FCDParameterAnimatableFloat & | GetFovY () |
Retrieves the vertical field of view. | |
const FCDParameterAnimatableFloat & | GetFovY () const |
See above. | |
void | SetFovX (float fovX) |
Sets the horizontal field of view value for this camera. | |
void | SetFovY (float fovY) |
Sets the vertical field of view value for this camera. | |
DEPRECATED (3.05A, GetProjectionType()==FCDCamera::ORTHOGRAPHIC) inline bool IsOrthographic() const | |
Retrieves whether this camera is an orthographic camera. | |
DEPRECATED (3.05A, SetProjectionType(FCDCamera::ORTHOGRAPHIC)) inline void SetOrthographic() | |
Sets the type of this camera to orthographic. | |
bool | HasHorizontalMag () const |
Retrieves whether the orthographic camera defines an horizontal magnification. | |
bool | HasVerticalMag () const |
Retrieves whether the perspective camera defines a vertical magnification. | |
FCDParameterAnimatableFloat & | GetMagX () |
Retrieves the horizontal magnification. | |
const FCDParameterAnimatableFloat & | GetMagX () const |
See above. | |
FCDParameterAnimatableFloat & | GetMagY () |
Retrieves the vertical magnification. | |
const FCDParameterAnimatableFloat & | GetMagY () const |
See above. | |
void | SetMagX (float magX) |
Sets the horizontal magnification for this camera. | |
void | SetMagY (float magY) |
Sets the vertical magnification value for this camera. | |
FCDParameterAnimatableFloat & | GetNearZ () |
Retrieves the near-z value for this camera. | |
const FCDParameterAnimatableFloat & | GetNearZ () const |
See above. | |
FCDParameterAnimatableFloat & | GetFarZ () |
Retrieves the far-z value for this camera. | |
const FCDParameterAnimatableFloat & | GetFarZ () const |
See above. | |
bool | HasAspectRatio () const |
Retrieves whether the camera defines an aspect ratio. | |
FCDParameterAnimatableFloat & | GetAspectRatio () |
Retrieves the aspect ratio for the view of this camera. | |
const FCDParameterAnimatableFloat & | GetAspectRatio () const |
See above. | |
void | SetNearZ (float _nearZ) |
Sets the near-z value for this camera. | |
void | SetFarZ (float _farZ) |
Sets the far-z value for this camera. | |
void | SetAspectRatio (float aspectRatio) |
Sets the aspect ratio for the view of this camera. |
Based on the FCDTargetedEntity class to support aimed cameras. COLLADA defines two types of cameras: perspective and orthographic. Both types are fully handled by this class.
A COLLADA perspective camera defines two of the three following parameters: horizontal field of view, vertical field of view and aspect ratio. The missing parameter can be calculated using the following formulae: aspect ratio = vertical field of view / horizontal field of view. The vertical and horizontal field of view are in degrees.
A COLLADA orthographic camera defines two of the three following parameters: horizontal magnification, vertical magnification and aspect ratio. The missing parameter can be calculated using the following formulae: aspect ratio = vertical magnification / horizontal magnification. You can calculate the viewport width and height using the following formulas: viewport width = horizontal magnification * 2, viewport height = vertical magnification * 2.
|
The types of projection supported.
|
|
Constructor: do not use directly. Create new cameras using the FCDLibrary::AddEntity function.
|
|
Retrieves whether this camera is an orthographic camera.
|
|
Retrieves whether this camera is a perspective camera. This is the default type of camera.
|
|
Retrieves the aspect ratio for the view of this camera. Before using this value, check if there are only one of the horizontal and vertical view ratios. If there are both of the view ratios provided for the camera, you will need to calculate the aspect ratio using the following formula: aspect ratio = vertical field of view / horizontal field of view.
|
|
Retrieves the far-z value for this camera. The far-z value represent how close the far-clip plane of the view frustum is. For orthographic cameras, this value is solely used for depth-buffering.
|
|
Retrieves the horizontal field of view. Before retrieving this value, check whether the camera defines the horizontal field of view using the HasHorizontalFov function.
|
|
Retrieves the vertical field of view. Before retrieving this value, check whether the camera defines the vertical field of view using the HasVerticalFov function.
|
|
Retrieves the horizontal magnification. Before retrieving this value, check whether the camera defines the horizontal magnification using the HasHorizontalMag function.
|
|
Retrieves the vertical magnification. Before retrieving this value, check whether the camera defines the vertical magnification using the HasVerticalMag function.
|
|
Retrieves the near-z value for this camera. The near-z value represent how close the near-clip plane of the view frustum is. For orthographic cameras, this value is solely used for depth-buffering.
|
|
Retrieves the type of projection of this camera.
|
|
Retrieves the entity type for this class. This function is part of the FCDEntity interface.
Reimplemented from FCDEntity. |
|
Retrieves whether the camera defines an aspect ratio.
|
|
Retrieves whether the perspective camera defines an horizontal field of view. If the camera does not define the horizontal field of view, you can calculate it using the following formula: horizontal field of view = vertical field of view / aspect ratio.
|
|
Retrieves whether the orthographic camera defines an horizontal magnification. If the camera does not define the horizontal magnification, you can calculate it using the following formula: horizontal magnification = vertical magnification / aspect ratio.
|
|
Retrieves whether the perspective camera defines a vertical field of view. If the camera does not define the vertical field of view, you can calculate it using the following formula: vertical field of view = aspect ratio * horizontal field of view.
|
|
Retrieves whether the perspective camera defines a vertical magnification. If the camera does not define the vertical magnification, you can calculate it using the following formula: vertical magnification = aspect ratio * horizontal magnification.
|
|
Sets the aspect ratio for the view of this camera.
|
|
Sets the far-z value for this camera. The far-z value represent how close the far-clip plane of the view frustum is. For orthographic cameras, this value is solely used for depth-buffering.
|
|
Sets the horizontal field of view value for this camera.
|
|
Sets the vertical field of view value for this camera.
|
|
Sets the horizontal magnification for this camera.
|
|
Sets the vertical magnification value for this camera.
|
|
Sets the near-z value for this camera. The near-z value represent how close the near-clip plane of the view frustum is. For orthographic cameras, this value is solely used for depth-buffering.
|
|
Sets the type of projections for this camera.
|