ViewState Class Reference

#include <ViewState.h>

Inheritance diagram for ViewState:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ViewState (HuginBase::Panorama *pano, bool supportMultiTexture)
 ~ViewState ()
void panoramaChanged (HuginBase::Panorama &pano)
 Notification about a Panorama change.
void panoramaImagesChanged (HuginBase::Panorama &, const HuginBase::UIntSet &)
 notifies about changes to images
void SetOptions (const HuginBase::PanoramaOptions *new_opts)
void SetSrcImage (unsigned int image_nr, HuginBase::SrcPanoImage *new_img)
void SetLens (unsigned int lens_nr, HuginBase::Lens *new_lens)
void ForceRequireRedraw ()
HuginBase::PanoramaOptionsGetOptions ()
OutputProjectionInfoGetProjectionInfo ()
HuginBase::SrcPanoImageGetSrcImage (unsigned int image_nr)
TextureManagerGetTextureManager ()
bool GetSupportMultiTexture () const
bool RequireRecalculatePhotometric ()
bool RequireRecalculateImageSizes ()
bool RequireRecalculateMasks (unsigned int image_nr)
bool ImagesRemoved ()
void FinishedDraw ()
void DoUpdates ()
void Redraw ()

Public Attributes

std::map< VisualizationState *,
bool > 
vis_states

Protected Member Functions

void Clean ()

Protected Attributes

HuginBase::Panoramam_pano
std::map< unsigned int, HuginBase::SrcPanoImageimg_states
HuginBase::PanoramaOptions opts
OutputProjectionInfoprojection_info
unsigned int number_of_images
bool dirty_photometrics
std::map< unsigned int, bool > active
std::map< unsigned int, fbooldirty_mask
bool dirty_image_sizes
bool images_removed
TextureManagerm_tex_manager
bool m_multiTexture

Classes

class  fbool

Detailed Description

Definition at line 80 of file ViewState.h.


Constructor & Destructor Documentation

ViewState::ViewState ( HuginBase::Panorama pano,
bool  supportMultiTexture 
)

Definition at line 34 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 57 of file ViewState.cpp.

References m_pano, m_tex_manager, projection_info, and HuginBase::Panorama::removeObserver().


Member Function Documentation

void ViewState::Clean (  )  [protected]

Definition at line 331 of file ViewState.cpp.

References dirty_image_sizes, dirty_mask, dirty_photometrics, and images_removed.

Referenced by FinishedDraw().

void ViewState::DoUpdates (  ) 

Definition at line 339 of file ViewState.cpp.

References TextureManager::CheckUpdate(), DEBUG_DEBUG, and m_tex_manager.

Referenced by VisualizationState::DoUpdates().

void ViewState::FinishedDraw (  ) 

Definition at line 315 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 262 of file ViewState.cpp.

References vis_states.

HuginBase::PanoramaOptions * ViewState::GetOptions (  ) 

Definition at line 274 of file ViewState.cpp.

References opts.

Referenced by PreviewIdentifyTool::AfterDrawImagesEvent(), TextureManager::CheckUpdate(), OverviewOutlinesTool::draw(), OverviewOutlinesTool::DrawRect(), VisualizationState::GetOptions(), PreviewCropTool::MouseButtonEvent(), PanosphereOverviewVisualizationState::PanosphereOverviewVisualizationState(), PlaneOverviewVisualizationState::PlaneOverviewVisualizationState(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), PreviewGuideTool::ReallyAfterDrawImagesEvent(), PreviewCropTool::ReallyAfterDrawImagesEvent(), PreviewDragTool::ReallyAfterDrawImagesEvent(), GLPreviewRenderer::Redraw(), GLPlaneOverviewRenderer::Resize(), GLPreviewRenderer::Resize(), PreviewLayoutLinesTool::updateImageCentres(), and PreviewLayoutLinesTool::updateLineInformation().

OutputProjectionInfo * ViewState::GetProjectionInfo (  ) 

Definition at line 279 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 284 of file ViewState.cpp.

References img_states.

Referenced by PreviewIdentifyTool::AfterDrawImagesEvent(), PreviewDifferenceTool::AfterDrawImagesEvent(), TextureManager::BindTexture(), TextureManager::CheckUpdate(), TextureManager::CleanTextures(), TextureManager::TextureInfo::DefineLevels(), TextureManager::DrawImage(), VisualizationState::GetSrcImage(), TextureManager::GetTextureName(), DragTool::MouseButtonEvent(), PreviewLayoutLinesTool::updateImageCentres(), PlaneOverviewToolHelper::UpdateImagesUnderMouse(), PanosphereOverviewToolHelper::UpdateImagesUnderMouse(), PreviewToolHelper::UpdateImagesUnderMouse(), and PreviewLayoutLinesTool::updateLineInformation().

bool ViewState::GetSupportMultiTexture (  )  const [inline]

Definition at line 106 of file ViewState.h.

References m_multiTexture.

Referenced by PanosphereOverviewProjectionGridTool::AfterDrawImagesBackEvent(), PreviewProjectionGridTool::AfterDrawImagesEvent(), PreviewIdentifyTool::AfterDrawImagesEvent(), PanosphereOverviewProjectionGridTool::AfterDrawImagesFrontEvent(), TextureManager::TextureInfo::Bind(), TextureManager::TextureInfo::BindImageTexture(), TextureManager::TextureInfo::BindMaskTexture(), MeshManager::MeshInfo::CompileList(), ProjectionGridTool::createTexture(), TextureManager::DisableTexture(), TextureManager::TextureInfo::SetMaxLevel(), TextureManager::TextureInfo::SetParameters(), and TextureManager::TextureInfo::UpdateMask().

TextureManager* ViewState::GetTextureManager (  )  [inline]

Definition at line 104 of file ViewState.h.

References m_tex_manager.

Referenced by PreviewLayoutLinesTool::AfterDrawImagesEvent(), PreviewIdentifyTool::AfterDrawImagesEvent(), PreviewDifferenceTool::AfterDrawImagesEvent(), PreviewControlPointTool::AfterDrawImagesEvent(), PanosphereSphereTool::BeforeDrawImagesBackEvent(), PreviewLayoutLinesTool::BeforeDrawImagesEvent(), PreviewDifferenceTool::BeforeDrawImagesEvent(), TextureManager::TextureInfo::DefineLevels(), TextureManager::DrawImage(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), PreviewCropTool::ReallyAfterDrawImagesEvent(), PreviewDragTool::ReallyAfterDrawImagesEvent(), GLViewer::SetPhotometricCorrect(), GLOverview::setUp(), and GLPreview::setUp().

bool ViewState::ImagesRemoved (  ) 

Definition at line 300 of file ViewState.cpp.

References images_removed.

void ViewState::panoramaChanged ( HuginBase::Panorama pano  )  [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 65 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.

void ViewState::panoramaImagesChanged ( HuginBase::Panorama ,
const HuginBase::UIntSet  
) [virtual]

notifies about changes to images

Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.

Parameters:
pano the panorama object that changed
changed set of changed images

Implements HuginBase::PanoramaObserver.

Definition at line 116 of file ViewState.cpp.

void ViewState::Redraw (  ) 

Definition at line 346 of file ViewState.cpp.

References vis_states.

Referenced by PreviewGuideTool::SetGuideStyle().

bool ViewState::RequireRecalculateImageSizes (  ) 

Definition at line 290 of file ViewState.cpp.

References dirty_image_sizes.

bool ViewState::RequireRecalculateMasks ( unsigned int  image_nr  ) 

Definition at line 305 of file ViewState.cpp.

References dirty_mask, and number_of_images.

Referenced by TextureManager::CheckUpdate().

bool ViewState::RequireRecalculatePhotometric (  ) 

Definition at line 295 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 122 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, 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 177 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().


Member Data Documentation

std::map<unsigned int, bool> ViewState::active [protected]

Definition at line 148 of file ViewState.h.

Referenced by FinishedDraw(), and panoramaChanged().

bool ViewState::dirty_image_sizes [protected]

Definition at line 150 of file ViewState.h.

Referenced by Clean(), panoramaChanged(), RequireRecalculateImageSizes(), SetSrcImage(), and ViewState().

std::map<unsigned int, fbool> ViewState::dirty_mask [protected]

Definition at line 149 of file ViewState.h.

Referenced by Clean(), RequireRecalculateMasks(), SetSrcImage(), and ViewState().

bool ViewState::dirty_photometrics [protected]

Definition at line 147 of file ViewState.h.

Referenced by Clean(), RequireRecalculatePhotometric(), SetOptions(), and ViewState().

bool ViewState::images_removed [protected]

Definition at line 150 of file ViewState.h.

Referenced by Clean(), ImagesRemoved(), panoramaChanged(), SetSrcImage(), and ViewState().

std::map<unsigned int, HuginBase::SrcPanoImage> ViewState::img_states [protected]

Definition at line 132 of file ViewState.h.

Referenced by FinishedDraw(), GetSrcImage(), SetSrcImage(), and ViewState().

bool ViewState::m_multiTexture [protected]

Definition at line 156 of file ViewState.h.

Referenced by GetSupportMultiTexture(), and ViewState().

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

Definition at line 131 of file ViewState.h.

Referenced by FinishedDraw(), panoramaChanged(), SetOptions(), ViewState(), and ~ViewState().

TextureManager* ViewState::m_tex_manager [protected]

Definition at line 155 of file ViewState.h.

Referenced by DoUpdates(), GetTextureManager(), ViewState(), and ~ViewState().

unsigned int ViewState::number_of_images [protected]

Definition at line 136 of file ViewState.h.

Referenced by FinishedDraw(), panoramaChanged(), RequireRecalculateMasks(), SetSrcImage(), and ViewState().

HuginBase::PanoramaOptions ViewState::opts [protected]

Definition at line 133 of file ViewState.h.

Referenced by FinishedDraw(), GetOptions(), SetOptions(), and ViewState().

OutputProjectionInfo* ViewState::projection_info [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().


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