#include <FCDCamera.h>
Inheritance diagram for FCDCamera:
Public Member Functions | |
FCDCamera (FCDocument *document) | |
Constructor: do not use directly. | |
virtual | ~FCDCamera () |
Destructor: do not release directly. | |
virtual Type | GetType () const |
Retrieves the entity type for this class. | |
bool | IsPerspective () const |
Retrieves whether this camera is a perspective camera. | |
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. | |
float & | GetFovX () |
Retrieves the horizontal field of view. | |
const float & | GetFovX () const |
See above. | |
float & | GetFovY () |
Retrieves the vertical field of view. | |
const float & | 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. | |
bool | IsOrthographic () const |
Retrieves whether this camera is an orthographic camera. | |
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. | |
float & | GetMagX () |
Retrieves the horizontal magnification. | |
const float & | GetMagX () const |
See above. | |
float & | GetMagY () |
Retrieves the vertical magnification. | |
const float & | 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. | |
float & | GetNearZ () |
Retrieves the near-z value for this camera. | |
const float & | GetNearZ () const |
See above. | |
float & | GetFarZ () |
Retrieves the far-z value for this camera. | |
const float & | GetFarZ () const |
See above. | |
float & | GetAspectRatio () |
Retrieves the aspect ratio for the view of this camera. | |
const float & | 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. | |
bool | HasAperture () const |
Retrieves whether the camera provides aperture information. | |
float & | GetVerticalAperture () |
Retrieves the vertical aperture of the camera. | |
const float & | GetVerticalAperture () const |
See above. | |
float & | GetHorizontalAperture () |
Retrieves the horizontal aperture of the camera. | |
const float & | GetHorizontalAperture () const |
See above. | |
float & | GetLensSqueeze () |
Retrieves the lens squeeze of the camera. | |
const float & | GetLensSqueeze () const |
See above. | |
void | SetVerticalAperture (float aperture) |
Sets the vertical aperture of the camera. | |
void | SetHorizontalAperture (float aperture) |
Sets the horizontal aperture of the camera. | |
void | SetLensSqueeze (float factor) |
Sets the lens squeeze of the camera. | |
FUStatus | LoadFromXML (xmlNode *cameraNode) |
[INTERNAL] Reads in the <camera> element from a given COLLADA XML tree node. | |
virtual xmlNode * | WriteToXML (xmlNode *parentNode) const |
[INTERNAL] Writes out the <camera> element to the given COLLADA XML tree node. |
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.
|
Constructor: do not use directly. Create new cameras using the FCDLibrary::AddEntity function.
|
|
Destructor: do not release directly. Release cameras using the FCDLibrary::ReleaseEntity function. All cameras are released with the document that they belong to. |
|
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 frustrum 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 aperture of the camera. This information is specific to COLLADA documents exported from ColladaMaya.
|
|
Retrieves the lens squeeze of the camera. This information is specific to COLLADA documents exported from ColladaMaya. The lens squeeze of the camera is a multiplier that acts directly on the horizontal aperture, following this formula: real horizontal aperture = given horizontal aperture * lens squeeze.
|
|
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 frustrum is. For orthographic cameras, this value is solely used for depth-buffering.
|
|
Retrieves the entity type for this class. This function is part of the FCDEntity interface.
Reimplemented from FCDEntity. |
|
Retrieves the vertical aperture of the camera. This information is specific to COLLADA documents exported from ColladaMaya.
|
|
Retrieves whether the camera provides aperture information. This information is specific to COLLADA documents exported from ColladaMaya.
|
|
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.
|
|
Retrieves whether this camera is an orthographic camera.
|
|
Retrieves whether this camera is a perspective camera. This is the default type of camera.
|
|
[INTERNAL] Reads in the <camera> element from a given COLLADA XML tree node.
Reimplemented from FCDEntity. |
|
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 frustrum 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 aperture of the camera.
|
|
Sets the lens squeeze of the 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 frustrum is. For orthographic cameras, this value is solely used for depth-buffering.
|
|
Sets the vertical aperture of the camera.
|
|
[INTERNAL] Writes out the <camera> element to the given COLLADA XML tree node.
Reimplemented from FCDEntity. |