ViewState Class Reference

#include <ViewState.h>

Inheritance diagram for ViewState:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ViewState (PT::Panorama *pano, bool supportMultiTexture)
 ~ViewState ()
void panoramaChanged (HuginBase::PanoramaData &pano)
 Notification about a Panorama change.
void panoramaImagesChanged (HuginBase::PanoramaData &, 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

PT::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 81 of file ViewState.h.


Constructor & Destructor Documentation

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

Definition at line 34 of file ViewState.cpp.

References HuginBase::Panorama::addObserver(), dirty_image_sizes, dirty_mask, 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 56 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 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 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 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(), 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 107 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 105 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::DrawImage(), PreviewPanoMaskTool::ReallyAfterDrawImagesEvent(), PreviewCropTool::ReallyAfterDrawImagesEvent(), PreviewDragTool::ReallyAfterDrawImagesEvent(), GLViewer::SetPhotometricCorrect(), GLOverview::setUp(), and GLPreview::setUp().

bool ViewState::ImagesRemoved (  ) 

Definition at line 299 of file ViewState.cpp.

References images_removed.

void ViewState::panoramaChanged ( HuginBase::PanoramaData 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 64 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::PanoramaData ,
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 115 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 121 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 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().


Member Data Documentation

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

Definition at line 149 of file ViewState.h.

Referenced by FinishedDraw(), and panoramaChanged().

bool ViewState::dirty_image_sizes [protected]

Definition at line 151 of file ViewState.h.

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

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

Definition at line 150 of file ViewState.h.

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

bool ViewState::dirty_photometrics [protected]

Definition at line 148 of file ViewState.h.

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

bool ViewState::images_removed [protected]

Definition at line 151 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 133 of file ViewState.h.

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

bool ViewState::m_multiTexture [protected]

Definition at line 157 of file ViewState.h.

Referenced by GetSupportMultiTexture(), and ViewState().

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

Definition at line 132 of file ViewState.h.

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

TextureManager* ViewState::m_tex_manager [protected]

Definition at line 156 of file ViewState.h.

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

unsigned int ViewState::number_of_images [protected]

Definition at line 137 of file ViewState.h.

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

HuginBase::PanoramaOptions ViewState::opts [protected]

Definition at line 134 of file ViewState.h.

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

OutputProjectionInfo* ViewState::projection_info [protected]

Definition at line 135 of file ViewState.h.

Referenced by GetProjectionInfo(), SetOptions(), ViewState(), and ~ViewState().

std::map<VisualizationState*, bool> ViewState::vis_states

Definition at line 128 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 23 Oct 2014 for Hugintrunk by  doxygen 1.4.7