GPU-Accelerated Coverage  0.1.0
Compute coverage tours for known environment with articulated objects on GPU
Public Types | Public Member Functions | List of all members
gpu_coverage::CameraPanorama Class Reference

Omnidirectional panorama camera. More...

#include <CameraPanorama.h>

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

Public Types

enum  Direction {
  RIGHT = 0, LEFT = 1, TOP = 2, BOTTOM = 3,
  BACK = 4, FRONT = 5
}
 Cube map side. More...
 

Public Member Functions

 CameraPanorama (const size_t &id, Node *const node)
 Constructor. More...
 
virtual ~CameraPanorama ()
 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...
 
- Public Member Functions inherited from gpu_coverage::CameraPerspective
 CameraPerspective (const aiCamera *const camera, size_t id, Node *const node)
 Constructor from Assimp aiCamera. More...
 
 CameraPerspective (size_t id, const std::string &name, Node *const node, const float horFOV, const float aspect, const float clipNear, const float clipFar)
 Constructor for manually creating a camera. More...
 
virtual ~CameraPerspective ()
 Destructor.
 
void toDot (FILE *dot) const
 Write Graphviz Dot node representing this camera to file for debugging. More...
 
- Public Member Functions inherited from gpu_coverage::AbstractCamera
 AbstractCamera (const size_t id, const std::string &name, Node *const node)
 Constructor. More...
 
virtual ~AbstractCamera ()
 Destructor.
 
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...
 

Additional Inherited Members

- Protected Attributes inherited from gpu_coverage::CameraPerspective
const float horFOV
 Horizontal field of view in radians.
 
const float aspect
 Aspect ratio of the camera image.
 
const float clipNear
 Distance of the near clipping plane.
 
const float clipFar
 Distance of the far clipping plane.
 
- Protected Attributes inherited from gpu_coverage::AbstractCamera
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

Omnidirectional panorama camera.

This class combines six perspective cameras to an omnidirectional camera in a cube map setup.

Member Enumeration Documentation

Cube map side.

The order of the sides must be the order that glTexStorage2D() expects.

Enumerator
RIGHT 

GL_TEXTURE_CUBE_MAP_POSITIVE_X.

LEFT 

GL_TEXTURE_CUBE_MAP_NEGATIVE_X.

TOP 

GL_TEXTURE_CUBE_MAP_POSITIVE_Y.

BOTTOM 

GL_TEXTURE_CUBE_MAP_NEGATIVE_Y.

BACK 

GL_TEXTURE_CUBE_MAP_POSITIVE_Z.

FRONT 

GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.

Constructor & Destructor Documentation

gpu_coverage::CameraPanorama::CameraPanorama ( const size_t &  id,
Node *const  node 
)

Constructor.

Parameters
[in]idUnique ID of the camera.
[in]nodeScene graph node where to attach this camera.

Member Function Documentation

virtual void gpu_coverage::CameraPanorama::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 uses 6 view matrices, one for each side of a cube map.

Reimplemented from gpu_coverage::AbstractCamera.


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