Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Attributes | List of all members
MeshManager Class Referenceabstract

A MeshManager handles the graphics system representation of a remapping, by creating OpenGL display lists that draw a remapped image. More...

#include <MeshManager.h>

Inheritance diagram for MeshManager:
Inheritance graph

Classes

class  MeshInfo
 Handles the remapper and a display list for a specific image. More...
 
class  PanosphereOverviewMeshInfo
 a subclass for the panosphere it converts coordinates obtained from an equirectangular projection to 3D coordinates on the sphere More...
 
class  PlaneOverviewMeshInfo
 subclass for the plane overview mode. More...
 
class  PreviewMeshInfo
 subclass of MeshInfo for the preview It actually does nothing in addition to the base class More...
 

Public Member Functions

 MeshManager (HuginBase::Panorama *pano, VisualizationState *visualization_state)
 
virtual ~MeshManager ()
 
void CheckUpdate ()
 
void CleanMeshes ()
 Remove meshes for images that have been deleted. More...
 
void RenderMesh (unsigned int image_number) const
 
unsigned int GetDisplayList (unsigned int image_number) const
 
void SetLayoutMode (bool state)
 Turn layout mode on or off. More...
 
bool GetLayoutMode () const
 return if layout mode is active More...
 
void SetLayoutScale (double scale)
 
virtual MeshInfo::MeshCoords3D GetMeshCoords3D (MeshRemapper::Coords &coords)=0
 
virtual MeshInfo::Coord3D GetCoord3D (hugin_utils::FDiff2D &)=0
 
virtual MeshInfoObtainMeshInfo (HuginBase::SrcPanoImage *, bool layout_mode_on)=0
 

Protected Attributes

HuginBase::Panoramam_pano
 
VisualizationStatevisualization_state
 
std::vector< MeshInfo * > meshes
 
bool layout_mode_on
 

Detailed Description

A MeshManager handles the graphics system representation of a remapping, by creating OpenGL display lists that draw a remapped image.

The coordinates used in the display list are calculated by a MeshRemapper

Definition at line 37 of file MeshManager.h.

Constructor & Destructor Documentation

MeshManager::MeshManager ( HuginBase::Panorama pano,
VisualizationState visualization_state 
)

Definition at line 56 of file MeshManager.cpp.

MeshManager::~MeshManager ( )
virtual

Definition at line 63 of file MeshManager.cpp.

References meshes.

Member Function Documentation

void MeshManager::CheckUpdate ( )
void MeshManager::CleanMeshes ( )

Remove meshes for images that have been deleted.

virtual MeshInfo::Coord3D MeshManager::GetCoord3D ( hugin_utils::FDiff2D )
pure virtual
unsigned int MeshManager::GetDisplayList ( unsigned int  image_number) const
bool MeshManager::GetLayoutMode ( ) const

return if layout mode is active

Definition at line 122 of file MeshManager.cpp.

References layout_mode_on.

Referenced by GLPreviewRenderer::Redraw(), and GLPreviewRenderer::Resize().

virtual MeshInfo::MeshCoords3D MeshManager::GetMeshCoords3D ( MeshRemapper::Coords coords)
pure virtual
virtual MeshInfo* MeshManager::ObtainMeshInfo ( HuginBase::SrcPanoImage ,
bool  layout_mode_on 
)
pure virtual
void MeshManager::RenderMesh ( unsigned int  image_number) const

Definition at line 99 of file MeshManager.cpp.

References meshes.

void MeshManager::SetLayoutMode ( bool  state)

Turn layout mode on or off.

When in layout mode, the images appear with their centre in the remapped position, but the rest of the image is drawn undistorted around that.

Parameters
statetrue to turn on layout mode, false to turn it off.

Definition at line 109 of file MeshManager.cpp.

References layout_mode_on, and meshes.

Referenced by GLViewer::SetLayoutMode(), and GLOverview::SetLayoutMode().

void MeshManager::SetLayoutScale ( double  scale)

Definition at line 127 of file MeshManager.cpp.

References meshes.

Referenced by GLViewer::SetLayoutScale(), and GLOverview::SetLayoutScale().

Member Data Documentation

bool MeshManager::layout_mode_on
protected
HuginBase::Panorama* MeshManager::m_pano
protected
std::vector<MeshInfo*> MeshManager::meshes
protected
VisualizationState* MeshManager::visualization_state
protected

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