TextureManager Class Reference

#include <TextureManager.h>

List of all members.

Public Member Functions

 TextureManager (PT::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)

Protected Member Functions

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

Protected Attributes

PT::Panoramam_pano
ViewStateview_state
float viewer_exposure
std::map< TextureKey, TextureInfotextures
float texel_density
bool photometric_correct

Classes

class  TextureInfo
class  TextureKey


Detailed Description

Definition at line 57 of file TextureManager.h.


Constructor & Destructor Documentation

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

Definition at line 60 of file TextureManager.cpp.

References m_pano, photometric_correct, and view_state.

TextureManager::~TextureManager (  )  [virtual]

Definition at line 67 of file TextureManager.cpp.

References textures.


Member Function Documentation

void TextureManager::Begin (  ) 

Definition at line 193 of file TextureManager.cpp.

References HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, 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 165 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 207 of file TextureManager.cpp.

References cout, DEBUG_INFO, TextureManager::TextureInfo::DefineLevels(), 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 506 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 176 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 73 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 203 of file TextureManager.cpp.

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

unsigned int TextureManager::GetMaxTextureSizePower (  )  [protected]

Definition at line 484 of file TextureManager.cpp.

References DEBUG_ERROR, DEBUG_INFO, and log2().

Referenced by CheckUpdate().

unsigned int TextureManager::GetMaxTotalTexels (  )  [protected]

Definition at line 470 of file TextureManager.cpp.

Referenced by CheckUpdate().

bool TextureManager::GetPhotometricCorrect (  )  [inline]

Definition at line 73 of file TextureManager.h.

References photometric_correct.

Referenced by PreviewDifferenceTool::AfterDrawImagesEvent().

unsigned int TextureManager::GetTextureName ( unsigned int  image_number  ) 

Definition at line 154 of file TextureManager.cpp.

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

void TextureManager::SetPhotometricCorrect ( bool  state  ) 

Definition at line 454 of file TextureManager.cpp.

References photometric_correct, and textures.

Referenced by GLViewer::SetPhotometricCorrect().


Member Data Documentation

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

Definition at line 82 of file TextureManager.h.

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

bool TextureManager::photometric_correct [protected]

Definition at line 179 of file TextureManager.h.

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

float TextureManager::texel_density [protected]

Definition at line 178 of file TextureManager.h.

Referenced by CheckUpdate().

std::map<TextureKey, TextureInfo> TextureManager::textures [protected]

Definition at line 173 of file TextureManager.h.

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

ViewState* TextureManager::view_state [protected]

Definition at line 83 of file TextureManager.h.

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

float TextureManager::viewer_exposure [protected]

Definition at line 84 of file TextureManager.h.

Referenced by Begin(), and DrawImage().


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