GPU-Accelerated Coverage
0.1.0
Compute coverage tours for known environment with articulated objects on GPU
|
Abstract superclass for all cameras. More...
#include <AbstractCamera.h>
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... | |
Node * | getNode () 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 |
Abstract superclass for all cameras.
See CameraOrtho, CameraPerspective, and PanoramaCamera subclasses.
gpu_coverage::AbstractCamera::AbstractCamera | ( | const size_t | id, |
const std::string & | name, | ||
Node *const | node | ||
) |
Constructor.
[in] | id | The unique ID of this camera. |
[in] | name | The name of this camera for logging. |
[in] | node | The scene graph node to attach this camera to. |
|
inline |
Returns the unique ID of this camera.
|
inline |
Returns the name of this camera for logging.
If available, the name included in the input file read by Assimp is used, otherwise a generic string is constructed.
|
inline |
Returns the scene graph node that this camera is attached to.
The node has to be passed to the constructor.
|
inline |
Returns the 4x4 projection matrix of the camera.
|
virtual |
Forward the view and projection matrices to the given locations of a GLSL shader and additionally return the view matrices.
[in] | locationsMVP | Struct with variable locations of a GLSL shader. |
[out] | view | Will 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.
|
pure virtual |
Write Graphviz Dot node representing this camera to file for debugging.
[in] | dot | Output Dot file. |
Implemented in gpu_coverage::CameraPerspective, and gpu_coverage::CameraOrtho.