GPU-Accelerated Coverage  0.1.0
Compute coverage tours for known environment with articulated objects on GPU
Public Member Functions | Protected Attributes | List of all members
gpu_coverage::AbstractCamera Class Referenceabstract

Abstract superclass for all cameras. More...

#include <AbstractCamera.h>

Inheritance diagram for gpu_coverage::AbstractCamera:
Inheritance graph
[legend]

Public Member Functions

 AbstractCamera (const size_t id, const std::string &name, Node *const node)
 Constructor. More...
 
virtual ~AbstractCamera ()
 Destructor.
 
virtual void setViewProjection (const LocationsMVP &locationsMVP, std::vector< glm::mat4 > &view) const
 Forward the view and projection matrices to the given locations of a GLSL shader and additionally return the view matrices. More...
 
virtual void toDot (FILE *dot) const =0
 Write Graphviz Dot node representing this camera to file for debugging. More...
 
const glm::mat4x4 & getProjectionMatrix () const
 Returns the 4x4 projection matrix of the camera. More...
 
const size_t & getId () const
 Returns the unique ID of this camera. More...
 
const std::string & getName () const
 Returns the name of this camera for logging. More...
 
NodegetNode () const
 Returns the scene graph node that this camera is attached to. More...
 

Protected Attributes

const size_t id
 Unique ID of the camera, see getId().
 
const std::string name
 Name of the camera for logging, see getName().
 
Node *const node
 Scene graph node assigned to this camera, see getNode().
 
glm::mat4 projectionMatrix
 

Detailed Description

Abstract superclass for all cameras.

See CameraOrtho, CameraPerspective, and PanoramaCamera subclasses.

Constructor & Destructor Documentation

gpu_coverage::AbstractCamera::AbstractCamera ( const size_t  id,
const std::string &  name,
Node *const  node 
)

Constructor.

Parameters
[in]idThe unique ID of this camera.
[in]nameThe name of this camera for logging.
[in]nodeThe scene graph node to attach this camera to.

Member Function Documentation

const size_t& gpu_coverage::AbstractCamera::getId ( ) const
inline

Returns the unique ID of this camera.

Returns
ID.
const std::string& gpu_coverage::AbstractCamera::getName ( ) const
inline

Returns the name of this camera for logging.

Returns
Name of this camera.

If available, the name included in the input file read by Assimp is used, otherwise a generic string is constructed.

Node* gpu_coverage::AbstractCamera::getNode ( ) const
inline

Returns the scene graph node that this camera is attached to.

Returns
The scene graph node.

The node has to be passed to the constructor.

const glm::mat4x4& gpu_coverage::AbstractCamera::getProjectionMatrix ( ) const
inline

Returns the 4x4 projection matrix of the camera.

Returns
Projection matrix.
virtual void gpu_coverage::AbstractCamera::setViewProjection ( const LocationsMVP locationsMVP,
std::vector< glm::mat4 > &  view 
) const
virtual

Forward the view and projection matrices to the given locations of a GLSL shader and additionally return the view matrices.

Parameters
[in]locationsMVPStruct with variable locations of a GLSL shader.
[out]viewWill be set to the view matrices.

The view output vector will be resized and filled by the method.

This method assumes that there is only one view matrix.

Reimplemented in gpu_coverage::CameraPanorama.

virtual void gpu_coverage::AbstractCamera::toDot ( FILE *  dot) const
pure virtual

Write Graphviz Dot node representing this camera to file for debugging.

Parameters
[in]dotOutput Dot file.

Implemented in gpu_coverage::CameraPerspective, and gpu_coverage::CameraOrtho.


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