TextureManager Class Reference

#include <TextureManager.h>

List of all members.

Public Member Functions

 TextureManager (HuginBase::Panorama *pano, ViewState *view)
virtual ~TextureManager ()
void DrawImage (unsigned int image_number, unsigned int display_list)
void CheckUpdate ()
void Begin ()
void End ()
void SetPhotometricCorrect (bool state)
bool GetPhotometricCorrect ()
unsigned int GetTextureName (unsigned int image_number)
void BindTexture (unsigned int image_number)
void DisableTexture (bool maskOnly=false)
void LoadingImageFinished (int min, int max, bool texture_photometric_correct, const HuginBase::PanoramaOptions &dest_img, const HuginBase::SrcPanoImage &state)

Protected Types

typedef std::map< TextureKey,
sharedPtrNamespace::shared_ptr<
TextureInfo > > 
TexturesMap

Protected Member Functions

void CleanTextures ()
unsigned int GetMaxTotalTexels ()
unsigned int GetMaxTextureSizePower ()

Protected Attributes

HuginBase::Panoramam_pano
ViewStateview_state
float viewer_exposure
TexturesMap textures
float texel_density
bool photometric_correct

Classes

class  TextureInfo
class  TextureKey


Detailed Description

Definition at line 50 of file TextureManager.h.


Member Typedef Documentation

typedef std::map<TextureKey, sharedPtrNamespace::shared_ptr<TextureInfo> > TextureManager::TexturesMap [protected]

Definition at line 167 of file TextureManager.h.


Constructor & Destructor Documentation

TextureManager::TextureManager ( HuginBase::Panorama pano,
ViewState view 
)

Definition at line 71 of file TextureManager.cpp.

References m_pano, photometric_correct, and view_state.

TextureManager::~TextureManager (  )  [virtual]

Definition at line 78 of file TextureManager.cpp.

References textures.


Member Function Documentation

void TextureManager::Begin (  ) 

Definition at line 204 of file TextureManager.cpp.

References HuginBase::Panorama::getOptions(), m_pano, photometric_correct, vigra_ext::pow(), and viewer_exposure.

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

void TextureManager::BindTexture ( unsigned int  image_number  ) 

Definition at line 176 of file TextureManager.cpp.

References DEBUG_ASSERT, ViewState::GetSrcImage(), photometric_correct, textures, and view_state.

Referenced by PreviewIdentifyTool::AfterDrawImagesEvent(), and PreviewDifferenceTool::AfterDrawImagesEvent().

void TextureManager::CheckUpdate (  ) 

Definition at line 218 of file TextureManager.cpp.

References cout, DEBUG_INFO, TextureManager::TextureInfo::DefineLevels(), TextureManager::TextureInfo::DefineMaskTexture(), GetMaxTextureSizePower(), GetMaxTotalTexels(), HuginBase::Panorama::getNrOfImages(), ViewState::GetOptions(), ViewState::GetSrcImage(), TextureManager::TextureInfo::height, TextureManager::TextureInfo::height_p, log2(), m_pano, TextureManager::TextureInfo::min_lod, photometric_correct, ViewState::RequireRecalculateMasks(), ViewState::RequireRecalculatePhotometric(), TextureManager::TextureInfo::SetMaxLevel(), texel_density, textures, view_state, TextureManager::TextureInfo::width, and TextureManager::TextureInfo::width_p.

Referenced by ViewState::DoUpdates().

void TextureManager::CleanTextures (  )  [protected]

Definition at line 514 of file TextureManager.cpp.

References DEBUG_INFO, HuginBase::Panorama::getNrOfImages(), ViewState::GetSrcImage(), m_pano, photometric_correct, textures, and view_state.

void TextureManager::DisableTexture ( bool  maskOnly = false  ) 

Definition at line 187 of file TextureManager.cpp.

References ViewState::GetSupportMultiTexture(), and view_state.

Referenced by PreviewLayoutLinesTool::AfterDrawImagesEvent(), PreviewDifferenceTool::AfterDrawImagesEvent(), PreviewControlPointTool::AfterDrawImagesEvent(), PanosphereSphereTool::BeforeDrawImagesBackEvent(), PreviewLayoutLinesTool::BeforeDrawImagesEvent(), DrawImage(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), PreviewCropTool::ReallyAfterDrawImagesEvent(), PreviewDragTool::ReallyAfterDrawImagesEvent(), GLPlaneOverviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPreviewRenderer::Redraw().

void TextureManager::DrawImage ( unsigned int  image_number,
unsigned int  display_list 
)

Definition at line 84 of file TextureManager.cpp.

References DEBUG_ASSERT, DisableTexture(), HuginBase::SrcPanoImage::getExposure(), ViewState::GetSrcImage(), ViewState::GetTextureManager(), photometric_correct, textures, view_state, and viewer_exposure.

Referenced by PreviewLayoutLinesTool::AfterDrawImagesEvent(), PreviewDifferenceTool::BeforeDrawImagesEvent(), GLPlaneOverviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPreviewRenderer::Redraw().

void TextureManager::End (  ) 

Definition at line 214 of file TextureManager.cpp.

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

unsigned int TextureManager::GetMaxTextureSizePower (  )  [protected]

Definition at line 492 of file TextureManager.cpp.

References DEBUG_ERROR, DEBUG_INFO, and log2().

Referenced by CheckUpdate().

unsigned int TextureManager::GetMaxTotalTexels (  )  [protected]

Definition at line 478 of file TextureManager.cpp.

Referenced by CheckUpdate().

bool TextureManager::GetPhotometricCorrect (  )  [inline]

Definition at line 66 of file TextureManager.h.

References photometric_correct.

Referenced by PreviewDifferenceTool::AfterDrawImagesEvent().

unsigned int TextureManager::GetTextureName ( unsigned int  image_number  ) 

Definition at line 165 of file TextureManager.cpp.

References DEBUG_ASSERT, ViewState::GetSrcImage(), photometric_correct, textures, and view_state.

void TextureManager::LoadingImageFinished ( int  min,
int  max,
bool  texture_photometric_correct,
const HuginBase::PanoramaOptions dest_img,
const HuginBase::SrcPanoImage state 
)

Definition at line 553 of file TextureManager.cpp.

References textures.

Referenced by TextureManager::TextureInfo::DefineLevels().

void TextureManager::SetPhotometricCorrect ( bool  state  ) 

Definition at line 462 of file TextureManager.cpp.

References photometric_correct, and textures.

Referenced by GLViewer::SetPhotometricCorrect().


Member Data Documentation

HuginBase::Panorama* TextureManager::m_pano [protected]

Definition at line 80 of file TextureManager.h.

Referenced by Begin(), CheckUpdate(), CleanTextures(), and TextureManager().

bool TextureManager::photometric_correct [protected]

Definition at line 174 of file TextureManager.h.

Referenced by Begin(), BindTexture(), CheckUpdate(), CleanTextures(), DrawImage(), GetPhotometricCorrect(), GetTextureName(), SetPhotometricCorrect(), and TextureManager().

float TextureManager::texel_density [protected]

Definition at line 173 of file TextureManager.h.

Referenced by CheckUpdate().

TexturesMap TextureManager::textures [protected]

Definition at line 168 of file TextureManager.h.

Referenced by BindTexture(), CheckUpdate(), CleanTextures(), DrawImage(), GetTextureName(), LoadingImageFinished(), SetPhotometricCorrect(), and ~TextureManager().

ViewState* TextureManager::view_state [protected]

Definition at line 81 of file TextureManager.h.

Referenced by BindTexture(), CheckUpdate(), CleanTextures(), DisableTexture(), DrawImage(), GetTextureName(), and TextureManager().

float TextureManager::viewer_exposure [protected]

Definition at line 82 of file TextureManager.h.

Referenced by Begin(), and DrawImage().


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