Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
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

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

Public Member Functions

 MeshInfo (HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state, bool layout_mode_on)
 Constructor: Creates the mesh for a given image of a panorama. More...
 
 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. More...
 
virtual ~MeshInfo ()
 
void CallList () const
 Draw the mesh. More...
 
void Update ()
 Recreate the mesh when the image or panorama it represents changes. More...
 
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. More...
 

Protected Attributes

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

Detailed Description

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

Definition at line 64 of file MeshManager.h.

Constructor & Destructor Documentation

MeshManager::MeshInfo::MeshInfo ( HuginBase::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_panoThe panorama that has the image we would like to remap
image_numberThe number of the image in that panorama
view_stateThe ViewState object for the particular view this mesh will be used in.
layout_mode_onTrue if we should generate a mesh for layout mode, false for a normally remapped mesh.

Definition at line 134 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 149 of file MeshManager.cpp.

MeshManager::MeshInfo::~MeshInfo ( )
virtual

Definition at line 164 of file MeshManager.cpp.

Member Function Documentation

virtual void MeshManager::MeshInfo::AfterCompile ( )
inlineprotectedvirtual

Reimplemented in MeshManager::PanosphereOverviewMeshInfo.

Definition at line 117 of file MeshManager.h.

virtual void MeshManager::MeshInfo::BeforeCompile ( )
inlineprotectedvirtual

Reimplemented in MeshManager::PanosphereOverviewMeshInfo.

Definition at line 115 of file MeshManager.h.

void MeshManager::MeshInfo::CallList ( ) const

Draw the mesh.

Definition at line 205 of file MeshManager.cpp.

Referenced by PreviewProjectionGridTool::AfterDrawImagesEvent().

void MeshManager::MeshInfo::CompileList ( )
protected

Use the remapper to create the display list.

Definition at line 210 of file MeshManager.cpp.

References DEBUG_ASSERT, DEBUG_DEBUG, DEBUG_INFO, MeshManager::MeshInfo::MeshCoords3D::tex_coords, and MeshManager::MeshInfo::MeshCoords3D::vertex_coords.

void MeshManager::MeshInfo::SetScaleFactor ( double  scale)

Definition at line 199 of file MeshManager.cpp.

void MeshManager::MeshInfo::SetSrcImage ( HuginBase::SrcPanoImage image)
inline

Definition at line 88 of file MeshManager.h.

References image.

virtual void MeshManager::MeshInfo::Transform ( )
inlineprotectedvirtual

Reimplemented in MeshManager::PanosphereOverviewMeshInfo.

Definition at line 116 of file MeshManager.h.

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 170 of file MeshManager.cpp.

References HuginBase::Panorama::getNrOfImages(), MeshManager::layout_mode_on, MeshManager::m_pano, and LayoutRemapper::setScale().

Referenced by PreviewProjectionGridTool::AfterDrawImagesEvent(), MeshManager::PanosphereOverviewMeshInfo::PanosphereOverviewMeshInfo(), MeshManager::PlaneOverviewMeshInfo::PlaneOverviewMeshInfo(), and MeshManager::PreviewMeshInfo::PreviewMeshInfo().

Member Data Documentation

unsigned int MeshManager::MeshInfo::display_list_number

Definition at line 86 of file MeshManager.h.

HuginBase::SrcPanoImage MeshManager::MeshInfo::image
protected

Definition at line 119 of file MeshManager.h.

Referenced by SetSrcImage().

bool MeshManager::MeshInfo::layout_mode_on
protected

Definition at line 127 of file MeshManager.h.

HuginBase::Panorama* MeshManager::MeshInfo::m_pano
protected

Definition at line 120 of file MeshManager.h.

VisualizationState* MeshManager::MeshInfo::m_visualization_state
protected

Definition at line 122 of file MeshManager.h.

MeshRemapper* MeshManager::MeshInfo::remap
protected

The ramapper we should use.

Definition at line 124 of file MeshManager.h.

double MeshManager::MeshInfo::scale_factor
protected

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