Hugintrunk
0.1
|
#include <TextureManager.h>
Classes | |
class | TextureInfo |
class | TextureKey |
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, std::shared_ptr< TextureInfo > > | TexturesMap |
Protected Member Functions | |
void | CleanTextures () |
unsigned int | GetMaxTotalTexels () |
unsigned int | GetMaxTextureSizePower () |
Protected Attributes | |
HuginBase::Panorama * | m_pano |
ViewState * | view_state |
float | viewer_exposure |
TexturesMap | textures |
float | texel_density |
bool | photometric_correct |
Definition at line 50 of file TextureManager.h.
|
protected |
Definition at line 167 of file TextureManager.h.
TextureManager::TextureManager | ( | HuginBase::Panorama * | pano, |
ViewState * | view | ||
) |
Definition at line 75 of file TextureManager.cpp.
References m_pano, photometric_correct, and view_state.
|
virtual |
Definition at line 82 of file TextureManager.cpp.
References textures.
void TextureManager::Begin | ( | ) |
Definition at line 210 of file TextureManager.cpp.
References HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, photometric_correct, vigra_ext::pow(), and viewer_exposure.
Referenced by GLPreviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPlaneOverviewRenderer::Redraw().
void TextureManager::BindTexture | ( | unsigned int | image_number | ) |
Definition at line 182 of file TextureManager.cpp.
References DEBUG_ASSERT, ViewState::GetSrcImage(), photometric_correct, textures, and view_state.
Referenced by PreviewDifferenceTool::AfterDrawImagesEvent(), and PreviewIdentifyTool::AfterDrawImagesEvent().
void TextureManager::CheckUpdate | ( | ) |
Definition at line 224 of file TextureManager.cpp.
References DEBUG_INFO, TextureManager::TextureInfo::DefineLevels(), TextureManager::TextureInfo::DefineMaskTexture(), GetMaxTextureSizePower(), GetMaxTotalTexels(), HuginBase::Panorama::getNrOfImages(), ViewState::GetOptions(), ViewState::GetSrcImage(), TextureManager::TextureInfo::height, TextureManager::TextureInfo::height_p, 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().
|
protected |
Definition at line 529 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 193 of file TextureManager.cpp.
References ViewState::GetSupportMultiTexture(), and view_state.
Referenced by PreviewDifferenceTool::AfterDrawImagesEvent(), PreviewControlPointTool::AfterDrawImagesEvent(), PreviewLayoutLinesTool::AfterDrawImagesEvent(), PanosphereSphereTool::BeforeDrawImagesBackEvent(), PreviewLayoutLinesTool::BeforeDrawImagesEvent(), DrawImage(), PreviewCropTool::ReallyAfterDrawImagesEvent(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), PreviewDragTool::ReallyAfterDrawImagesEvent(), GLPreviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPlaneOverviewRenderer::Redraw().
void TextureManager::DrawImage | ( | unsigned int | image_number, |
unsigned int | display_list | ||
) |
Definition at line 88 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(), GLPreviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPlaneOverviewRenderer::Redraw().
void TextureManager::End | ( | ) |
Definition at line 220 of file TextureManager.cpp.
Referenced by GLPreviewRenderer::Redraw(), GLPanosphereOverviewRenderer::Redraw(), and GLPlaneOverviewRenderer::Redraw().
|
protected |
Definition at line 507 of file TextureManager.cpp.
References DEBUG_ERROR, and DEBUG_INFO.
Referenced by CheckUpdate().
|
protected |
Definition at line 484 of file TextureManager.cpp.
References celeste::max().
Referenced by CheckUpdate().
|
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 171 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 568 of file TextureManager.cpp.
References textures.
Referenced by TextureManager::TextureInfo::DefineLevels().
void TextureManager::SetPhotometricCorrect | ( | bool | state | ) |
Definition at line 468 of file TextureManager.cpp.
References photometric_correct, and textures.
Referenced by GLViewer::SetPhotometricCorrect().
|
protected |
Definition at line 80 of file TextureManager.h.
Referenced by Begin(), CheckUpdate(), CleanTextures(), and TextureManager().
|
protected |
Definition at line 174 of file TextureManager.h.
Referenced by Begin(), BindTexture(), CheckUpdate(), CleanTextures(), TextureManager::TextureInfo::DefineLevels(), DrawImage(), GetPhotometricCorrect(), GetTextureName(), TextureManager::TextureKey::operator<(), SetPhotometricCorrect(), TextureManager::TextureKey::TextureKey(), and TextureManager().
|
protected |
Definition at line 173 of file TextureManager.h.
Referenced by CheckUpdate().
|
protected |
Definition at line 168 of file TextureManager.h.
Referenced by BindTexture(), CheckUpdate(), CleanTextures(), DrawImage(), GetTextureName(), LoadingImageFinished(), SetPhotometricCorrect(), and ~TextureManager().
|
protected |
Definition at line 81 of file TextureManager.h.
Referenced by BindTexture(), CheckUpdate(), CleanTextures(), DisableTexture(), DrawImage(), GetTextureName(), and TextureManager().
|
protected |
Definition at line 82 of file TextureManager.h.
Referenced by Begin(), and DrawImage().