Hugintrunk
0.1
|
A MeshManager handles the graphics system representation of a remapping, by creating OpenGL display lists that draw a remapped image. More...
#include <MeshManager.h>
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 MeshInfo * | ObtainMeshInfo (HuginBase::SrcPanoImage *, bool layout_mode_on)=0 |
Protected Attributes | |
HuginBase::Panorama * | m_pano |
VisualizationState * | visualization_state |
std::vector< MeshInfo * > | meshes |
bool | layout_mode_on |
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.
MeshManager::MeshManager | ( | HuginBase::Panorama * | pano, |
VisualizationState * | visualization_state | ||
) |
Definition at line 56 of file MeshManager.cpp.
|
virtual |
Definition at line 63 of file MeshManager.cpp.
References meshes.
void MeshManager::CheckUpdate | ( | ) |
Definition at line 71 of file MeshManager.cpp.
References DEBUG_DEBUG, DEBUG_INFO, HuginBase::Panorama::getNrOfImages(), VisualizationState::GetSrcImage(), layout_mode_on, m_pano, meshes, ObtainMeshInfo(), VisualizationState::RequireRecalculateMesh(), and visualization_state.
Referenced by VisualizationState::DoUpdates().
void MeshManager::CleanMeshes | ( | ) |
Remove meshes for images that have been deleted.
|
pure virtual |
Implemented in PreviewMeshManager, PlaneOverviewMeshManager, and PanosphereOverviewMeshManager.
Referenced by GreatCircleArc::LineSegment::doGL(), GreatCircleArc::LineSegment::doGLcross(), and OverviewOutlinesTool::DrawRect().
unsigned int MeshManager::GetDisplayList | ( | unsigned int | image_number | ) | const |
Definition at line 104 of file MeshManager.cpp.
References meshes.
Referenced by VisualizationState::GetMeshDisplayList(), GLPreviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPlaneOverviewRenderer::Redraw().
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().
|
pure virtual |
Implemented in PreviewMeshManager, PlaneOverviewMeshManager, and PanosphereOverviewMeshManager.
|
pure virtual |
Implemented in PreviewMeshManager, PlaneOverviewMeshManager, and PanosphereOverviewMeshManager.
Referenced by CheckUpdate().
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.
state | true 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().
|
protected |
Definition at line 227 of file MeshManager.h.
Referenced by CheckUpdate(), GetLayoutMode(), SetLayoutMode(), and MeshManager::MeshInfo::Update().
|
protected |
Definition at line 222 of file MeshManager.h.
Referenced by CheckUpdate(), PanosphereOverviewMeshManager::ObtainMeshInfo(), PlaneOverviewMeshManager::ObtainMeshInfo(), PreviewMeshManager::ObtainMeshInfo(), and MeshManager::MeshInfo::Update().
|
protected |
Definition at line 226 of file MeshManager.h.
Referenced by CheckUpdate(), GetDisplayList(), RenderMesh(), SetLayoutMode(), SetLayoutScale(), and ~MeshManager().
|
protected |
Definition at line 223 of file MeshManager.h.
Referenced by CheckUpdate(), PanosphereOverviewMeshManager::GetCoord3D(), PlaneOverviewMeshManager::GetCoord3D(), PreviewMeshManager::GetCoord3D(), PanosphereOverviewMeshManager::GetMeshCoords3D(), PlaneOverviewMeshManager::GetMeshCoords3D(), PreviewMeshManager::GetMeshCoords3D(), PanosphereOverviewMeshManager::ObtainMeshInfo(), PlaneOverviewMeshManager::ObtainMeshInfo(), and PreviewMeshManager::ObtainMeshInfo().