MeshManager Class Reference

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
[legend]
List of all members.

Public Member Functions

 MeshManager (PT::Panorama *pano, VisualizationState *visualization_state)
 ~MeshManager ()
void CheckUpdate ()
void CleanMeshes ()
 Remove meshes for images that have been deleted.
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.
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

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

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...

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 ( PT::Panorama pano,
VisualizationState visualization_state 
)

Definition at line 54 of file MeshManager.cpp.

MeshManager::~MeshManager (  ) 

Definition at line 61 of file MeshManager.cpp.

References meshes.


Member Function Documentation

void MeshManager::CheckUpdate (  ) 

Definition at line 69 of file MeshManager.cpp.

References DEBUG_DEBUG, DEBUG_INFO, HuginBase::Panorama::getNrOfImages(), VisualizationState::GetSrcImage(), layout_mode_on, m_pano, meshes, VisualizationState::RequireRecalculateMesh(), and visualization_state.

Referenced by VisualizationState::DoUpdates().

void MeshManager::CleanMeshes (  ) 

Remove meshes for images that have been deleted.

virtual MeshInfo::Coord3D MeshManager::GetCoord3D ( hugin_utils::FDiff2D  )  [pure virtual]

Implemented in PanosphereOverviewMeshManager, PlaneOverviewMeshManager, and PreviewMeshManager.

Referenced by GreatCircleArc::LineSegment::doGL(), GreatCircleArc::LineSegment::doGLcross(), and OverviewOutlinesTool::DrawRect().

unsigned int MeshManager::GetDisplayList ( unsigned int  image_number  )  const

Definition at line 102 of file MeshManager.cpp.

References meshes.

Referenced by VisualizationState::GetMeshDisplayList(), GLPlaneOverviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPreviewRenderer::Redraw().

virtual MeshInfo::MeshCoords3D MeshManager::GetMeshCoords3D ( MeshRemapper::Coords coords  )  [pure virtual]

Implemented in PanosphereOverviewMeshManager, PlaneOverviewMeshManager, and PreviewMeshManager.

Referenced by MeshManager::MeshInfo::CompileList().

virtual MeshInfo* MeshManager::ObtainMeshInfo ( HuginBase::SrcPanoImage ,
bool  layout_mode_on 
) [pure virtual]

Implemented in PanosphereOverviewMeshManager, PlaneOverviewMeshManager, and PreviewMeshManager.

void MeshManager::RenderMesh ( unsigned int  image_number  )  const

Definition at line 97 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:
state true to turn on layout mode, false to turn it off.

Definition at line 107 of file MeshManager.cpp.

References layout_mode_on, and meshes.

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

void MeshManager::SetLayoutScale ( double  scale  ) 

Definition at line 120 of file MeshManager.cpp.

References meshes.

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


Member Data Documentation

bool MeshManager::layout_mode_on [protected]

Definition at line 225 of file MeshManager.h.

Referenced by CheckUpdate(), and SetLayoutMode().

PT::Panorama* MeshManager::m_pano [protected]

Definition at line 220 of file MeshManager.h.

Referenced by CheckUpdate(), PreviewMeshManager::ObtainMeshInfo(), PlaneOverviewMeshManager::ObtainMeshInfo(), and PanosphereOverviewMeshManager::ObtainMeshInfo().

std::vector<MeshInfo*> MeshManager::meshes [protected]

Definition at line 224 of file MeshManager.h.

Referenced by CheckUpdate(), GetDisplayList(), RenderMesh(), SetLayoutMode(), SetLayoutScale(), and ~MeshManager().

VisualizationState* MeshManager::visualization_state [protected]

Definition at line 221 of file MeshManager.h.

Referenced by CheckUpdate(), PreviewMeshManager::GetCoord3D(), PlaneOverviewMeshManager::GetCoord3D(), PanosphereOverviewMeshManager::GetCoord3D(), PreviewMeshManager::GetMeshCoords3D(), PlaneOverviewMeshManager::GetMeshCoords3D(), PanosphereOverviewMeshManager::GetMeshCoords3D(), PreviewMeshManager::ObtainMeshInfo(), PlaneOverviewMeshManager::ObtainMeshInfo(), and PanosphereOverviewMeshManager::ObtainMeshInfo().


The documentation for this class was generated from the following files:
Generated on 31 Oct 2014 for Hugintrunk by  doxygen 1.4.7