Hugintrunk
0.1
|
#include <ViewState.h>
Classes | |
class | fbool |
Public Attributes | |
std::map< VisualizationState *, bool > | vis_states |
Protected Member Functions | |
void | Clean () |
Protected Attributes | |
HuginBase::Panorama * | m_pano |
std::map< unsigned int, HuginBase::SrcPanoImage > | img_states |
HuginBase::PanoramaOptions | opts |
OutputProjectionInfo * | projection_info |
unsigned int | number_of_images |
bool | dirty_photometrics |
std::map< unsigned int, bool > | active |
std::map< unsigned int, fbool > | dirty_mask |
bool | dirty_image_sizes |
bool | images_removed |
TextureManager * | m_tex_manager |
bool | m_multiTexture |
Definition at line 80 of file ViewState.h.
ViewState::ViewState | ( | HuginBase::Panorama * | pano, |
bool | supportMultiTexture | ||
) |
Definition at line 32 of file ViewState.cpp.
References HuginBase::Panorama::addObserver(), dirty_image_sizes, dirty_mask, dirty_photometrics, HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::Panorama::getSrcImage(), images_removed, img_states, m_multiTexture, m_pano, m_tex_manager, number_of_images, opts, and projection_info.
ViewState::~ViewState | ( | ) |
Definition at line 55 of file ViewState.cpp.
References m_pano, m_tex_manager, projection_info, and HuginBase::Panorama::removeObserver().
|
protected |
Definition at line 330 of file ViewState.cpp.
References dirty_image_sizes, dirty_mask, dirty_photometrics, and images_removed.
Referenced by FinishedDraw().
void ViewState::DoUpdates | ( | ) |
Definition at line 338 of file ViewState.cpp.
References TextureManager::CheckUpdate(), DEBUG_DEBUG, and m_tex_manager.
Referenced by VisualizationState::DoUpdates().
void ViewState::FinishedDraw | ( | ) |
Definition at line 314 of file ViewState.cpp.
References active, Clean(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::Panorama::getSrcImage(), img_states, m_pano, number_of_images, and opts.
Referenced by VisualizationState::FinishedDraw().
void ViewState::ForceRequireRedraw | ( | ) |
Definition at line 261 of file ViewState.cpp.
References vis_states.
HuginBase::PanoramaOptions * ViewState::GetOptions | ( | ) |
Definition at line 273 of file ViewState.cpp.
References opts.
Referenced by PreviewIdentifyTool::AfterDrawImagesEvent(), TextureManager::CheckUpdate(), OverviewOutlinesTool::draw(), OverviewOutlinesTool::DrawRect(), VisualizationState::GetOptions(), PreviewCropTool::MouseButtonEvent(), PanosphereOverviewVisualizationState::PanosphereOverviewVisualizationState(), PlaneOverviewVisualizationState::PlaneOverviewVisualizationState(), PreviewCropTool::ReallyAfterDrawImagesEvent(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), PreviewGuideTool::ReallyAfterDrawImagesEvent(), PreviewDragTool::ReallyAfterDrawImagesEvent(), GLPreviewRenderer::Redraw(), GLPreviewRenderer::Resize(), GLPlaneOverviewRenderer::Resize(), VisualizationState::SetViewingCenter(), PreviewLayoutLinesTool::updateImageCentres(), and PreviewLayoutLinesTool::updateLineInformation().
OutputProjectionInfo * ViewState::GetProjectionInfo | ( | ) |
Definition at line 278 of file ViewState.cpp.
References projection_info.
Referenced by VisualizationState::GetProjectionInfo(), DragTool::MouseButtonEvent(), and PreviewDragTool::ReallyAfterDrawImagesEvent().
HuginBase::SrcPanoImage * ViewState::GetSrcImage | ( | unsigned int | image_nr | ) |
Definition at line 283 of file ViewState.cpp.
References img_states.
Referenced by PreviewDifferenceTool::AfterDrawImagesEvent(), PreviewIdentifyTool::AfterDrawImagesEvent(), TextureManager::BindTexture(), TextureManager::CheckUpdate(), TextureManager::CleanTextures(), TextureManager::DrawImage(), ToolHelper::GetImagesUnderPos(), VisualizationState::GetSrcImage(), TextureManager::GetTextureName(), DragTool::MouseButtonEvent(), PreviewLayoutLinesTool::updateImageCentres(), and PreviewLayoutLinesTool::updateLineInformation().
|
inline |
Definition at line 106 of file ViewState.h.
References m_multiTexture.
Referenced by PanosphereOverviewProjectionGridTool::AfterDrawImagesBackEvent(), PreviewProjectionGridTool::AfterDrawImagesEvent(), PreviewIdentifyTool::AfterDrawImagesEvent(), PanosphereOverviewProjectionGridTool::AfterDrawImagesFrontEvent(), ProjectionGridTool::createTexture(), and TextureManager::DisableTexture().
|
inline |
Definition at line 104 of file ViewState.h.
References m_tex_manager.
Referenced by PreviewDifferenceTool::AfterDrawImagesEvent(), PreviewControlPointTool::AfterDrawImagesEvent(), PreviewIdentifyTool::AfterDrawImagesEvent(), PreviewLayoutLinesTool::AfterDrawImagesEvent(), PanosphereSphereTool::BeforeDrawImagesBackEvent(), PreviewDifferenceTool::BeforeDrawImagesEvent(), PreviewLayoutLinesTool::BeforeDrawImagesEvent(), TextureManager::DrawImage(), PreviewCropTool::ReallyAfterDrawImagesEvent(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), PreviewDragTool::ReallyAfterDrawImagesEvent(), GLViewer::SetPhotometricCorrect(), GLPreview::setUp(), and GLOverview::setUp().
bool ViewState::ImagesRemoved | ( | ) |
Definition at line 299 of file ViewState.cpp.
References images_removed.
|
virtual |
Notification about a Panorama change.
This function will always be called, even when the change could be handled by panoramaImageAdded() or other notify functions.
This allows lazy observers to just listen to panoramaChanged().
Implements HuginBase::PanoramaObserver.
Definition at line 63 of file ViewState.cpp.
References active, DEBUG_DEBUG, dirty_image_sizes, HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::Panorama::getSrcImage(), images_removed, m_pano, number_of_images, SetOptions(), SetSrcImage(), and vis_states.
|
virtual |
notifies about changes to images
Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.
pano | the panorama object that changed |
changed | set of changed images |
Implements HuginBase::PanoramaObserver.
Definition at line 114 of file ViewState.cpp.
void ViewState::Redraw | ( | ) |
Definition at line 345 of file ViewState.cpp.
References vis_states.
Referenced by PreviewGuideTool::SetGuideStyle().
bool ViewState::RequireRecalculateImageSizes | ( | ) |
Definition at line 289 of file ViewState.cpp.
References dirty_image_sizes.
bool ViewState::RequireRecalculateMasks | ( | unsigned int | image_nr | ) |
Definition at line 304 of file ViewState.cpp.
References dirty_mask, and number_of_images.
Referenced by TextureManager::CheckUpdate().
bool ViewState::RequireRecalculatePhotometric | ( | ) |
Definition at line 294 of file ViewState.cpp.
References dirty_photometrics.
Referenced by TextureManager::CheckUpdate().
void ViewState::SetLens | ( | unsigned int | lens_nr, |
HuginBase::Lens * | new_lens | ||
) |
void ViewState::SetOptions | ( | const HuginBase::PanoramaOptions * | new_opts | ) |
Definition at line 120 of file ViewState.cpp.
References dirty_photometrics, HuginBase::PanoramaOptions::getHFOV(), HuginBase::Panorama::getNrOfImages(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getProjectionParameters(), HuginBase::PanoramaOptions::getROI(), HuginBase::PanoramaOptions::getSize(), HuginBase::PanoramaOptions::getVFOV(), m_pano, opts, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputRangeCompression, projection_info, and vis_states.
Referenced by PreviewCropTool::MouseMoveEvent(), GLPreviewFrame::OnTrackChangeFOV(), panoramaChanged(), and PreviewCropTool::ReallyAfterDrawImagesEvent().
void ViewState::SetSrcImage | ( | unsigned int | image_nr, |
HuginBase::SrcPanoImage * | new_img | ||
) |
Definition at line 176 of file ViewState.cpp.
References dirty_image_sizes, dirty_mask, images_removed, img_states, number_of_images, and vis_states.
Referenced by DragTool::MouseMoveEvent(), and panoramaChanged().
|
protected |
Definition at line 148 of file ViewState.h.
Referenced by FinishedDraw(), and panoramaChanged().
|
protected |
Definition at line 150 of file ViewState.h.
Referenced by Clean(), panoramaChanged(), RequireRecalculateImageSizes(), SetSrcImage(), and ViewState().
|
protected |
Definition at line 149 of file ViewState.h.
Referenced by Clean(), RequireRecalculateMasks(), SetSrcImage(), and ViewState().
|
protected |
Definition at line 147 of file ViewState.h.
Referenced by Clean(), RequireRecalculatePhotometric(), SetOptions(), and ViewState().
|
protected |
Definition at line 150 of file ViewState.h.
Referenced by Clean(), ImagesRemoved(), panoramaChanged(), SetSrcImage(), and ViewState().
|
protected |
Definition at line 132 of file ViewState.h.
Referenced by FinishedDraw(), GetSrcImage(), SetSrcImage(), and ViewState().
|
protected |
Definition at line 156 of file ViewState.h.
Referenced by GetSupportMultiTexture(), and ViewState().
|
protected |
Definition at line 131 of file ViewState.h.
Referenced by FinishedDraw(), panoramaChanged(), SetOptions(), ViewState(), and ~ViewState().
|
protected |
Definition at line 155 of file ViewState.h.
Referenced by DoUpdates(), GetTextureManager(), ViewState(), and ~ViewState().
|
protected |
Definition at line 136 of file ViewState.h.
Referenced by FinishedDraw(), panoramaChanged(), RequireRecalculateMasks(), SetSrcImage(), and ViewState().
|
protected |
Definition at line 133 of file ViewState.h.
Referenced by FinishedDraw(), GetOptions(), SetOptions(), and ViewState().
|
protected |
Definition at line 134 of file ViewState.h.
Referenced by GetProjectionInfo(), SetOptions(), ViewState(), and ~ViewState().
std::map<VisualizationState*, bool> ViewState::vis_states |
Definition at line 127 of file ViewState.h.
Referenced by ForceRequireRedraw(), panoramaChanged(), Redraw(), SetOptions(), SetSrcImage(), VisualizationState::VisualizationState(), and VisualizationState::~VisualizationState().