# CSLCamera Class Reference

`#include <Camera.h>`

Inheritance diagram for CSLCamera:

List of all members.

## Public Member Functions
| CSLCamera (CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate)
virtual | ~CSLCamera ()
SI_Float | GetFarPlane ()
SI_Void | SetFarPlane (SI_Float in_fValue)
SI_Float | GetFieldOfView ()
SI_Void | SetFieldOfView (SI_Float in_fValue)
CSIBCVector3D | GetInterestPosition ()
SI_Void | SetInterestPosition (CSIBCVector3D &in_rValue)
CSIBCVector3D | GetPosition ()
SI_Void | SetPosition (CSIBCVector3D &in_rValue)
SI_Float | GetNearPlane ()
SI_Void | SetNearPlane (SI_Float in_fValue)
virtual SI_Float | GetRoll ()
virtual SI_Void | SetRoll (SI_Float in_fValue)
CSLConstraint * | AddConstraint (CSLConstraint::EConstraintType in_ConstraintType)
virtual ETemplateType | Type ()
virtual CSLAnimatableType * | ParameterFromName (SI_Char *in_szName)
virtual CSLAnimatableType * | ParameterFromType (EFCurveType in_Type, SI_Char *in_szParameterName)

## Detailed Description

Describes a camera and its interest (see the SI_Camera template reference).

## Constructor & Destructor Documentation

CSLCamera | ( | CSLScene * | in_pScene,
|  | CSLModel * | in_pModel,
|  | CdotXSITemplate * | in_pTemplate |
| ) |  |  |

Constructor

Parameters:

  | in_pScene | Pointer to the scene containing the Camera
  | in_pModel | Pointer to the model containing the Camera
  | in_pTemplate | Pointer to the CdotXSITemplate containing the Camera

virtual ~CSLCamera | ( |  | ) | `[virtual]`

Destructor

## Member Function Documentation

SI_Float GetFarPlane | ( |  | ) |

Return the far plane of the camera.

Returns:
  SI_Float Far plane.

SI_Void SetFarPlane | ( | SI_Float | in_fValue | ) |

Change the far plane of the camera.

Parameters:

  | SI_Float | New far plane. value

SI_Float GetFieldOfView | ( |  | ) |

Return the field of view of the camera.

Returns:
  SI_Float Field of view.

SI_Void SetFieldOfView | ( | SI_Float | in_fValue | ) |

Change the field of view of the camera.

Parameters:

  | SI_Float | New field of view value.

CSIBCVector3D GetInterestPosition | ( |  | ) |

Return the position of the camera's interest.

Returns:
  CSIBCVector3D Interest position.

SI_Void SetInterestPosition | ( | CSIBCVector3D & | in_rValue | ) |

Change the position of the camera's interest.

Parameters:

  | CSIBCVector3D& | New interest position.

CSIBCVector3D GetPosition | ( |  | ) |

Return the position of the camera.

Returns:
  CSIBCVector3D Position.

SI_Void SetPosition | ( | CSIBCVector3D & | in_rValue | ) |

Change the position of the camera.

Parameters:

  | CSIBCVector3D& | New position.

SI_Float GetNearPlane | ( |  | ) |

Return the near plane of the camera.

Returns:
  SI_Float Near plane value.

SI_Void SetNearPlane | ( | SI_Float | in_fValue | ) |

Change the near plane of the camera.

Parameters:

  | SI_Float | New near plane value.

virtual SI_Float GetRoll | ( |  | ) | `[virtual]`

Return the roll of the camera.

Returns:
  SI_Float Roll.

Reimplemented in CSLCOLLADACamera.

virtual SI_Void SetRoll | ( | SI_Float | in_fValue | ) | `[virtual]`

Change the roll of the camera.

Parameters:

  | SI_Float | New roll value.

Reimplemented in CSLCOLLADACamera.

CSLConstraint* AddConstraint | ( | CSLConstraint::EConstraintType | in_ConstraintType | ) | `[virtual]`

Add a new constraint to the camera.

Parameters:

  | EConstraintType | Type of constraint to create.

Returns:
  CSLConstraint* Pointer to the newly created constraint object.

Implements CSLConstrainableType.

virtual ETemplateType Type | ( |  | ) | `[virtual]`

Indicate which dotXSI template this object describes.

Returns:
  ETemplateType Type of template

Implements CSLTemplate.

virtual CSLAnimatableType* ParameterFromName | ( | SI_Char * | in_szName | ) | `[virtual]`

Return a proxy to the specified parameter.

Parameters:

  | in_szName | Name of the parameter

Returns:
  CSLAnimatableType* Pointer to a parameter proxy.

Reimplemented from CSLTemplate.

virtual CSLAnimatableType* ParameterFromType | ( | EFCurveType | in_Type,
|  | SI_Char * | in_szParameterName |
| ) |  |  | `[virtual]`

Returns an AnimatableParameter from a EFCurveType.

Parameters:

  | EFCurveType | FCurve Type
  | SI_Char* | The name of the parameter if this FCurve this is unknown.

Returns:
  SI_Error Error code.

Note:
  The Camera supports the following FCurve types:
  - SI_POSITION_X
  - SI_POSITION_Y
  - SI_POSITION_Z
  - SI_INTEREST_X
  - SI_INTEREST_Y
  - SI_INTEREST_Z
  - SI_ROLL
  - SI_FOV
  - SI_NEAR
  - SI_FAR

Example - Adding FCurves on a Camera

            CSLFCurve* l_pFCurveX = l_pCamera->CreateFCurve( CSLTemplate::SI_POSITION_X, CSLTemplate::SI_CUBIC );
            CSLFCurve* l_pFCurveY = l_pCamera->CreateFCurve( CSLTemplate::SI_POSITION_Y, CSLTemplate::SI_CUBIC );
            CSLFCurve* l_pFCurveZ = l_pCamera->CreateFCurve( CSLTemplate::SI_POSITION_Z, CSLTemplate::SI_CUBIC );

            CSLFCurve* l_pFCurveRoll = l_pCamera->CreateFCurve( CSLTemplate::SI_ROLL, CSLTemplate::SI_CUBIC );

            // Add the keys etc...

Reimplemented from CSLTemplate.

The documentation for this class was generated from the following file:

- Camera.h