Molecule Visualizer
 All Classes Namespaces Files Functions Enumerations Enumerator Macros Groups Pages
Public Member Functions | List of all members
Camera Class Reference

Public Member Functions

 Camera ()
 Default constructor. More...
 
 Camera (glm::vec3 &pos)
 
 ~Camera (void)
 Destructor.
 
void reset ()
 
void buildViewMatrix (void)
 A member function to build the view matrix. More...
 
void buildProjectionMatrix (void)
 A member function to build the projection matrix. More...
 
void zoom (float t)
 A member function to zoom. More...
 
void rotateAzimuth (float t)
 A member function to rotate the camera(Azimuth). More...
 
void rotatePolar (float t)
 A member function to rotate the camera(Polar). More...
 
void moveLeft (float t)
 A member function to move the camera left. More...
 
void moveRight (float t)
 A member function to move the camera right. More...
 
void moveForwards (float t)
 A member function to move the camera forwards. More...
 
void moveBackwards (float t)
 A member function to move the camera backwards. More...
 
void moveUp (float t)
 A member function to move the camera up. More...
 
void moveDown (float t)
 A member function to move the camera down. More...
 
void rotateUp (float t)
 A member function to rotate the camera up. More...
 
void rotateDown (float t)
 A member function to rotate the camera down. More...
 
void rotateLeft (float t)
 A member function to rotate the camera left. More...
 
void rotateRight (float t)
 A member function to rotate the camera right. More...
 
void setOrthogonalBorders (float left, float right, float top, float bottom)
 A member function to set the orthogonal borders of the camera. More...
 
glm::vec3 getUp ()
 An inline member function to get the up vector of the camera. More...
 
glm::vec3 getTarget ()
 An inline member function to get the target vector of the camera. More...
 
bool isOrthogonal ()
 An inline member function to check if it is orthogonal. More...
 
float getFieldOfView ()
 An inline member function to get the field of view. More...
 
void setOrthogonal (bool orthogonal)
 An inline member function to set orthogonal. More...
 
void setUp (glm::vec3 &up)
 An inline member function to set the up vector of the camera. More...
 
void setTarget (glm::vec3 &target)
 An inline member function to set the target vector of the camera. More...
 
void setFieldOfView (float fieldOfView)
 An inline member function to set the field of view of the camera. More...
 
void setNearPlane (float nearPlane)
 An inline member function to set the near plane of the camera. More...
 
void setFarPlane (float farPlane)
 An inline member function to set the far plane of the camera. More...
 
float getNearPlane ()
 An inline member function to get the near plane of the camera. More...
 
float getFarPlane ()
 An inline member function to get the far plane of the camera. More...
 
void setAspect (float aspect)
 An inline member function to set the aspect ratio of the camera. More...
 
const glm::mat4 & getViewMatrix ()
 An inline member function to get the view matrix. More...
 
const glm::mat4 & getProjectionMatrix ()
 An inline member function to get the projection matrix. More...
 

Constructor & Destructor Documentation

Camera::Camera ( )

Default constructor.

Constructor.

Parameters
areference to pos a glm::vec3

Member Function Documentation

void Camera::buildProjectionMatrix ( void  )

A member function to build the projection matrix.

Returns
void.
void Camera::buildViewMatrix ( void  )

A member function to build the view matrix.

Returns
void.
float Camera::getFarPlane ( )
inline

An inline member function to get the far plane of the camera.

Returns
a float.
float Camera::getFieldOfView ( )
inline

An inline member function to get the field of view.

Returns
the field of view as float.
float Camera::getNearPlane ( )
inline

An inline member function to get the near plane of the camera.

Returns
afloat.
const glm::mat4 & Camera::getProjectionMatrix ( )
inline

An inline member function to get the projection matrix.

Returns
a reference of the projection matrix.
glm::vec3 Camera::getTarget ( )
inline

An inline member function to get the target vector of the camera.

Returns
the target vector as glm::vec3
glm::vec3 Camera::getUp ( )
inline

An inline member function to get the up vector of the camera.

Returns
the up vector as glm::vec3
const glm::mat4 & Camera::getViewMatrix ( )
inline

An inline member function to get the view matrix.

Returns
a reference of the view matrix.
bool Camera::isOrthogonal ( )
inline

An inline member function to check if it is orthogonal.

Returns
TRUE if orthogonal. FALSE if not.
void Camera::moveBackwards ( float  t)

A member function to move the camera backwards.

Parameters
ta float.
Returns
void.
void Camera::moveDown ( float  t)

A member function to move the camera down.

Parameters
ta float.
Returns
void.
void Camera::moveForwards ( float  t)

A member function to move the camera forwards.

Parameters
ta float.
Returns
void.
void Camera::moveLeft ( float  t)

A member function to move the camera left.

Parameters
ta float.
Returns
void.
void Camera::moveRight ( float  t)

A member function to move the camera right.

Parameters
ta float.
Returns
void.
void Camera::moveUp ( float  t)

A member function to move the camera up.

Parameters
ta float.
Returns
void.
void Camera::rotateAzimuth ( float  t)

A member function to rotate the camera(Azimuth).

Parameters
ta float.
Returns
void.
void Camera::rotateDown ( float  t)

A member function to rotate the camera down.

Parameters
ta float.
Returns
void.
void Camera::rotateLeft ( float  t)

A member function to rotate the camera left.

Parameters
ta float.
Returns
void.
void Camera::rotatePolar ( float  t)

A member function to rotate the camera(Polar).

Parameters
ta float.
Returns
void.
void Camera::rotateRight ( float  t)

A member function to rotate the camera right.

Parameters
ta float.
Returns
void.
void Camera::rotateUp ( float  t)

A member function to rotate the camera up.

Parameters
ta float.
Returns
void.
void Camera::setAspect ( float  aspect)
inline

An inline member function to set the aspect ratio of the camera.

Parameters
aspecta float.
Returns
void.
void Camera::setFarPlane ( float  farPlane)
inline

An inline member function to set the far plane of the camera.

Parameters
farPlanea float.
Returns
void.
void Camera::setFieldOfView ( float  fieldOfView)
inline

An inline member function to set the field of view of the camera.

Parameters
fieldOfViewa float.
Returns
void.
void Camera::setNearPlane ( float  nearPlane)
inline

An inline member function to set the near plane of the camera.

Parameters
nearPlanea float.
Returns
void.
void Camera::setOrthogonal ( bool  orthogonal)
inline

An inline member function to set orthogonal.

Parameters
orthogonala boolean.
Returns
void.
void Camera::setOrthogonalBorders ( float  left,
float  right,
float  top,
float  bottom 
)

A member function to set the orthogonal borders of the camera.

Parameters
lefta float.
righta float.
topa float.
bottoma float.
Returns
void.
void Camera::setTarget ( glm::vec3 &  target)
inline

An inline member function to set the target vector of the camera.

Parameters
areference to target a glm::vec3
Returns
void.
void Camera::setUp ( glm::vec3 &  up)
inline

An inline member function to set the up vector of the camera.

Parameters
areference to up a glm::vec3
Returns
void.
void Camera::zoom ( float  t)

A member function to zoom.

Parameters
ta float.
Returns
void.

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