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

Classes

class  Coord3D
 a class to handle a 3D point More...
class  MeshCoords3D
 a class to keep data of a single rectangle with texture coordinates More...

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.

MeshManager::MeshInfo::~MeshInfo (  ) 

Definition at line 157 of file MeshManager.cpp.

References display_list_number, and remap.


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, Transform(), and MeshRemapper::UpdateAndResetIndex().

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.

References image.

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(), layout_mode_on, m_pano, m_visualization_state, remap, scale_factor, and LayoutRemapper::setScale().

Referenced by PreviewProjectionGridTool::AfterDrawImagesEvent(), MeshManager::PanosphereOverviewMeshInfo::PanosphereOverviewMeshInfo(), MeshManager::PlaneOverviewMeshInfo::PlaneOverviewMeshInfo(), MeshManager::PreviewMeshInfo::PreviewMeshInfo(), 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.

Referenced by MeshManager::PanosphereOverviewMeshInfo::AfterCompile(), MeshManager::PanosphereOverviewMeshInfo::BeforeCompile(), and SetSrcImage().

bool MeshManager::MeshInfo::layout_mode_on [protected]

Definition at line 125 of file MeshManager.h.

Referenced by Update().

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(), Update(), and ~MeshInfo().

double MeshManager::MeshInfo::scale_factor [protected]

Definition at line 119 of file MeshManager.h.

Referenced by MeshManager::PanosphereOverviewMeshInfo::PanosphereOverviewMeshInfo(), SetScaleFactor(), and Update().


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