MeshManager::MeshInfo Class Reference

Handles the remapper and a display list for a specific image. More...

#include <MeshManager.h>

Inheritance diagram for MeshManager::MeshInfo:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 MeshInfo (PT::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state, bool layout_mode_on)
 Constructor: Creates the mesh for a given image of a panorama.
 MeshInfo (const MeshInfo &source)
 copy constructor: makes a MeshInfo representing the same object but using a differrent display list, allowing the first one to be freed.
 ~MeshInfo ()
void CallList () const
 Draw the mesh.
void Update ()
 Recreate the mesh when the image or panorama it represents changes.
void SetScaleFactor (double scale)
void SetSrcImage (HuginBase::SrcPanoImage *image)

Public Attributes

unsigned int display_list_number

Protected Member Functions

virtual void BeforeCompile ()
virtual void Transform ()
virtual void AfterCompile ()
void CompileList ()
 Use the remapper to create the display list.

Protected Attributes

HuginBase::SrcPanoImage image
PT::Panoramam_pano
double scale_factor
VisualizationStatem_visualization_state
MeshRemapperremap
 The ramapper we should use.
bool layout_mode_on

Detailed Description

Handles the remapper and a display list for a specific image.

Definition at line 62 of file MeshManager.h.


Constructor & Destructor Documentation

MeshManager::MeshInfo::MeshInfo PT::Panorama m_pano,
HuginBase::SrcPanoImage image,
VisualizationState visualization_state,
bool  layout_mode_on
 

Constructor: Creates the mesh for a given image of a panorama.

Parameters:
m_pano The panorama that has the image we would like to remap
image_number The number of the image in that panorama
view_state The ViewState object for the particular view this mesh will be used in.
layout_mode_on True if we should generate a mesh for layout mode, false for a normally remapped mesh.

Definition at line 127 of file MeshManager.cpp.

MeshManager::MeshInfo::MeshInfo const MeshInfo source  ) 
 

copy constructor: makes a MeshInfo representing the same object but using a differrent display list, allowing the first one to be freed.

Definition at line 142 of file MeshManager.cpp.

References MeshManager::layout_mode_on, and MeshManager::m_pano.

MeshManager::MeshInfo::~MeshInfo  ) 
 

Definition at line 157 of file MeshManager.cpp.

References display_list_number.


Member Function Documentation

virtual void MeshManager::MeshInfo::AfterCompile  )  [inline, protected, virtual]
 

Reimplemented in MeshManager::PanosphereOverviewMeshInfo.

Definition at line 115 of file MeshManager.h.

Referenced by CompileList().

virtual void MeshManager::MeshInfo::BeforeCompile  )  [inline, protected, virtual]
 

Reimplemented in MeshManager::PanosphereOverviewMeshInfo.

Definition at line 113 of file MeshManager.h.

Referenced by CompileList().

void MeshManager::MeshInfo::CallList  )  const
 

Draw the mesh.

Definition at line 198 of file MeshManager.cpp.

References display_list_number.

Referenced by PreviewProjectionGridTool::AfterDrawImagesEvent().

void MeshManager::MeshInfo::CompileList  )  [protected]
 

Use the remapper to create the display list.

Definition at line 203 of file MeshManager.cpp.

References AfterCompile(), BeforeCompile(), DEBUG_ASSERT, DEBUG_DEBUG, DEBUG_INFO, display_list_number, MeshManager::GetMeshCoords3D(), VisualizationState::GetMeshManager(), MeshRemapper::GetNextFaceCoordinates(), ViewState::GetSupportMultiTexture(), VisualizationState::getViewState(), m_visualization_state, remap, MeshManager::MeshInfo::MeshCoords3D::tex_coords, Transform(), MeshRemapper::UpdateAndResetIndex(), and MeshManager::MeshInfo::MeshCoords3D::vertex_coords.

Referenced by Update().

void MeshManager::MeshInfo::SetScaleFactor double  scale  ) 
 

Definition at line 192 of file MeshManager.cpp.

References scale_factor, and Update().

void MeshManager::MeshInfo::SetSrcImage HuginBase::SrcPanoImage image  )  [inline]
 

Definition at line 86 of file MeshManager.h.

virtual void MeshManager::MeshInfo::Transform  )  [inline, protected, virtual]
 

Reimplemented in MeshManager::PanosphereOverviewMeshInfo.

Definition at line 114 of file MeshManager.h.

Referenced by CompileList().

void MeshManager::MeshInfo::Update  ) 
 

Recreate the mesh when the image or panorama it represents changes.

Todo:
Maybe we should find the scale once, instead of for each image, and find a more asthetic way to calculate it.

Definition at line 163 of file MeshManager.cpp.

References CompileList(), HuginBase::Panorama::getNrOfImages(), VisualizationState::GetVisibleArea(), m_pano, m_visualization_state, and LayoutRemapper::setScale().

Referenced by PreviewProjectionGridTool::AfterDrawImagesEvent(), and SetScaleFactor().


Member Data Documentation

unsigned int MeshManager::MeshInfo::display_list_number
 

Definition at line 84 of file MeshManager.h.

Referenced by CallList(), CompileList(), and ~MeshInfo().

HuginBase::SrcPanoImage MeshManager::MeshInfo::image [protected]
 

Definition at line 117 of file MeshManager.h.

bool MeshManager::MeshInfo::layout_mode_on [protected]
 

Definition at line 125 of file MeshManager.h.

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

Definition at line 118 of file MeshManager.h.

Referenced by Update().

VisualizationState* MeshManager::MeshInfo::m_visualization_state [protected]
 

Definition at line 120 of file MeshManager.h.

Referenced by CompileList(), and Update().

MeshRemapper* MeshManager::MeshInfo::remap [protected]
 

The ramapper we should use.

Definition at line 122 of file MeshManager.h.

Referenced by CompileList().

double MeshManager::MeshInfo::scale_factor [protected]
 

Definition at line 119 of file MeshManager.h.

Referenced by SetScaleFactor().


The documentation for this class was generated from the following files:
Generated on Thu Jul 31 01:25:49 2014 for Hugintrunk by  doxygen 1.3.9.1