Hugintrunk
0.1
|
#include <ViewState.h>
Classes | |
class | fbool |
Public Member Functions | |
template<class M > | |
VisualizationState (HuginBase::Panorama *pano, ViewState *view_state, GLViewer *viewer, void(*RefreshFunction)(void *), void *arg, M *classArg) | |
virtual | ~VisualizationState () |
virtual HuginBase::PanoramaOptions * | GetOptions () |
virtual OutputProjectionInfo * | GetProjectionInfo () |
virtual HuginBase::SrcPanoImage * | GetSrcImage (unsigned int image_nr) |
virtual void | SetOptions (const HuginBase::PanoramaOptions *new_opts) |
virtual void | SetSrcImage (unsigned int image_nr, HuginBase::SrcPanoImage *new_img) |
bool | RequireRecalculateMesh (unsigned int image_nr) |
bool | RequireDraw () |
bool | RequireRecalculateViewport () |
float | GetScale () |
void | SetScale (float scale) |
unsigned int | GetMeshDisplayList (unsigned int image_nr) |
MeshManager * | GetMeshManager () |
void | FinishedDraw () |
void | SetVisibleArea (vigra::Rect2D area) |
vigra::Rect2D | GetVisibleArea () |
double | GetZoomLevel () const |
void | SetZoomLevel (const float new_zoom) |
hugin_utils::FDiff2D | GetViewingCenter () const |
void | SetViewingCenter (const hugin_utils::FDiff2D ¢er) |
void | SetCanvasSize (const vigra::Size2D &canvasSize) |
ViewState * | getViewState () |
void | Redraw () |
void | DoUpdates () |
void | SetDirtyMesh (int image_nr) |
void | ForceRequireRedraw () |
void | SetDirtyViewport () |
GLViewer * | GetViewer () |
Protected Attributes | |
HuginBase::Panorama * | m_pano |
std::map< unsigned int, fbool > | dirty_mesh |
bool | dirty_draw |
bool | dirty_viewport |
float | scale |
float | genscale |
float | gl_scale |
vigra::Rect2D | visible_area |
hugin_utils::FDiff2D | m_lookAt |
float | m_zoom |
vigra::Size2D | m_canvasSize |
void(* | RefreshFunc )(void *) |
void * | refreshArg |
MeshManager * | m_mesh_manager |
ViewState * | m_view_state |
GLViewer * | m_viewer |
Private Member Functions | |
VisualizationState (const VisualizationState &other) | |
VisualizationState & | operator= (const VisualizationState &other) |
Definition at line 159 of file ViewState.h.
|
inline |
Definition at line 164 of file ViewState.h.
References dirty_draw, dirty_mesh, dirty_viewport, genscale, HuginBase::Panorama::getNrOfImages(), m_lookAt, m_mesh_manager, m_pano, m_view_state, m_viewer, m_zoom, refreshArg, RefreshFunc, and ViewState::vis_states.
|
virtual |
Definition at line 366 of file ViewState.cpp.
References m_mesh_manager, m_view_state, and ViewState::vis_states.
|
private |
void VisualizationState::DoUpdates | ( | ) |
Definition at line 453 of file ViewState.cpp.
References MeshManager::CheckUpdate(), DEBUG_DEBUG, ViewState::DoUpdates(), m_mesh_manager, and m_view_state.
Referenced by GLViewer::Redraw().
void VisualizationState::FinishedDraw | ( | ) |
Definition at line 444 of file ViewState.cpp.
References DEBUG_DEBUG, dirty_draw, dirty_mesh, dirty_viewport, ViewState::FinishedDraw(), and m_view_state.
Referenced by GLViewer::Redraw().
void VisualizationState::ForceRequireRedraw | ( | ) |
Definition at line 439 of file ViewState.cpp.
References dirty_draw.
Referenced by PreviewEditCPTool::AddLineCP(), PanosphereOverviewCameraTool::ChangeFOV(), PanosphereOverviewCameraTool::ChangeZoomLevel(), PreviewCameraTool::ChangeZoomLevel(), PlaneOverviewCameraTool::ChangeZoomLevel(), PreviewIdentifyTool::ForceRedraw(), PreviewDifferenceTool::ImagesUnderMouseChangedEvent(), PreviewEditCPTool::MouseButtonEvent(), PreviewCropTool::MouseMoveEvent(), PreviewEditCPTool::MouseMoveEvent(), PreviewLayoutLinesTool::MouseMoveEvent(), PlaneOverviewCameraTool::MouseMoveEvent(), GLPreviewFrame::OnDragChoice(), GLPreviewFrame::OnOverviewModeChoice(), OverviewOutlinesTool::panoramaChanged(), and PreviewCameraTool::UpdateCenter().
unsigned int VisualizationState::GetMeshDisplayList | ( | unsigned int | image_nr | ) |
Definition at line 462 of file ViewState.cpp.
References MeshManager::GetDisplayList(), and m_mesh_manager.
Referenced by PreviewDifferenceTool::AfterDrawImagesEvent(), PreviewIdentifyTool::AfterDrawImagesEvent(), PreviewLayoutLinesTool::AfterDrawImagesEvent(), PreviewDifferenceTool::BeforeDrawImagesEvent(), and PreviewLayoutLinesTool::drawIdentificationBorder().
|
inline |
Definition at line 207 of file ViewState.h.
References m_mesh_manager.
Referenced by GreatCircleArc::LineSegment::doGL(), GreatCircleArc::LineSegment::doGLcross(), OverviewOutlinesTool::DrawRect(), GLPreviewRenderer::Redraw(), GLPreviewRenderer::Resize(), GLViewer::SetLayoutMode(), GLOverview::SetLayoutMode(), GLViewer::SetLayoutScale(), GLOverview::SetLayoutScale(), GLPreview::setUp(), and GLOverview::setUp().
|
virtual |
Reimplemented in PlaneOverviewVisualizationState, and PanosphereOverviewVisualizationState.
Definition at line 468 of file ViewState.cpp.
References ViewState::GetOptions(), and m_view_state.
Referenced by PreviewCameraTool::ChangeZoomLevel(), OverviewOutlinesTool::DrawRect(), MeshManager::PanosphereOverviewMeshInfo::GetCoord3D(), MeshManager::PlaneOverviewMeshInfo::GetCoord3D(), ToolHelper::GetImagesUnderPos(), MeshManager::PanosphereOverviewMeshInfo::GetMeshCoords3D(), MeshManager::PlaneOverviewMeshInfo::GetMeshCoords3D(), GreatCircleArc::GreatCircleArc(), LayoutRemapper::UpdateAndResetIndex(), ChoosyRemapper::UpdateAndResetIndex(), TexCoordRemapper::UpdateAndResetIndex(), VertexCoordRemapper::UpdateAndResetIndex(), and PreviewCameraTool::UpdateCenter().
|
virtual |
Reimplemented in PlaneOverviewVisualizationState, and PanosphereOverviewVisualizationState.
Definition at line 473 of file ViewState.cpp.
References ViewState::GetProjectionInfo(), and m_view_state.
Referenced by VertexCoordRemapper::DiscontinuityFlip(), DragTool::MouseButtonEvent(), DragTool::MouseMoveEvent(), VertexCoordRemapper::TestSubdivide(), ChoosyRemapper::UpdateAndResetIndex(), and VertexCoordRemapper::UpdateAndResetIndex().
float VisualizationState::GetScale | ( | ) |
Definition at line 373 of file ViewState.cpp.
References scale.
Referenced by GreatCircleArc::LineSegment::doGL(), GreatCircleArc::GreatCircleArc(), PreviewToolHelper::MouseMoved(), PreviewLayoutLinesTool::MouseMoveEvent(), TexCoordRemapper::SetSize(), MeshRemapper::UpdateAndResetIndex(), and PreviewCameraTool::UpdateCenter().
|
virtual |
Definition at line 478 of file ViewState.cpp.
References ViewState::GetSrcImage(), and m_view_state.
Referenced by MeshManager::CheckUpdate(), ToolHelper::GetImagesUnderPos(), and PreviewControlPointTool::MakeTransforms().
|
inline |
Definition at line 251 of file ViewState.h.
References m_viewer.
Referenced by PanosphereOverviewToolHelper::MouseMoved(), PlaneOverviewToolHelper::MouseMoved(), PlaneOverviewCameraTool::MouseMoveEvent(), GLPanosphereOverviewRenderer::Resize(), and GLPlaneOverviewRenderer::Resize().
|
inline |
Definition at line 232 of file ViewState.h.
References m_lookAt.
Referenced by GLPreviewRenderer::Resize(), and PreviewCameraTool::UpdateCenter().
|
inline |
Definition at line 239 of file ViewState.h.
References m_view_state.
Referenced by ToolHelper::GetImagesUnderPos(), ToolHelper::GetViewStatePtr(), PreviewCropTool::MouseButtonEvent(), PreviewCropTool::MouseMoveEvent(), PreviewCropTool::ReallyAfterDrawImagesEvent(), GLPreviewRenderer::Redraw(), GLPreviewRenderer::Resize(), and GLPlaneOverviewRenderer::Resize().
|
inline |
Definition at line 222 of file ViewState.h.
References visible_area.
Referenced by OverviewOutlinesTool::draw(), PreviewToolHelper::MouseMoved(), TexCoordRemapper::SetSize(), and VertexCoordRemapper::TestSubdivide().
|
inline |
Definition at line 227 of file ViewState.h.
References m_zoom.
Referenced by PreviewCameraTool::ChangeZoomLevel(), and GLPreviewRenderer::Resize().
|
private |
void VisualizationState::Redraw | ( | ) |
Definition at line 405 of file ViewState.cpp.
References DEBUG_DEBUG, refreshArg, RefreshFunc, and RequireDraw().
Referenced by PreviewEditCPTool::AddLineCP(), PanosphereOverviewCameraTool::ChangeFOV(), PanosphereOverviewCameraTool::ChangeZoomLevel(), PreviewCameraTool::ChangeZoomLevel(), PlaneOverviewCameraTool::ChangeZoomLevel(), PreviewIdentifyTool::ForceRedraw(), PreviewDifferenceTool::ImagesUnderMouseChangedEvent(), PreviewEditCPTool::MouseButtonEvent(), PreviewCropTool::MouseMoveEvent(), PanosphereOverviewCameraTool::MouseMoveEvent(), PreviewEditCPTool::MouseMoveEvent(), DragTool::MouseMoveEvent(), PreviewLayoutLinesTool::MouseMoveEvent(), PlaneOverviewCameraTool::MouseMoveEvent(), and PreviewCameraTool::UpdateCenter().
bool VisualizationState::RequireDraw | ( | ) |
bool VisualizationState::RequireRecalculateMesh | ( | unsigned int | image_nr | ) |
Definition at line 420 of file ViewState.cpp.
References dirty_mesh, HuginBase::Panorama::getNrOfImages(), and m_pano.
Referenced by MeshManager::CheckUpdate().
bool VisualizationState::RequireRecalculateViewport | ( | ) |
Definition at line 415 of file ViewState.cpp.
References dirty_viewport.
Referenced by OverviewOutlinesTool::draw(), and GLViewer::Redraw().
void VisualizationState::SetCanvasSize | ( | const vigra::Size2D & | canvasSize | ) |
Definition at line 517 of file ViewState.cpp.
References m_canvasSize, m_lookAt, and SetViewingCenter().
Referenced by GLPreviewRenderer::Resize().
|
inline |
Definition at line 247 of file ViewState.h.
References dirty_mesh.
|
inline |
Definition at line 249 of file ViewState.h.
References dirty_viewport.
Referenced by PanosphereOverviewCameraTool::ChangeFOV(), PanosphereOverviewCameraTool::ChangeZoomLevel(), PlaneOverviewCameraTool::ChangeZoomLevel(), GLPreviewFrame::OnDragChoice(), GLPreviewFrame::OnOverviewModeChoice(), SetViewingCenter(), SetZoomLevel(), and PreviewCameraTool::UpdateCenter().
|
inlinevirtual |
Reimplemented in PlaneOverviewVisualizationState, and PanosphereOverviewVisualizationState.
Definition at line 191 of file ViewState.h.
void VisualizationState::SetScale | ( | float | scale | ) |
Definition at line 378 of file ViewState.cpp.
References dirty_mesh, genscale, HuginBase::Panorama::getNrOfImages(), m_pano, and scale.
Referenced by GLPreviewRenderer::Resize(), GLPanosphereOverviewRenderer::Resize(), and GLPlaneOverviewRenderer::Resize().
|
inlinevirtual |
Definition at line 192 of file ViewState.h.
void VisualizationState::SetViewingCenter | ( | const hugin_utils::FDiff2D & | center | ) |
Definition at line 493 of file ViewState.cpp.
References ViewState::GetOptions(), HuginBase::PanoramaOptions::getSize(), m_canvasSize, m_lookAt, m_view_state, m_zoom, celeste::min(), SetDirtyViewport(), and hugin_utils::simpleClipPoint().
Referenced by PreviewCameraTool::ChangeZoomLevel(), SetCanvasSize(), SetZoomLevel(), and PreviewCameraTool::UpdateCenter().
|
inline |
Definition at line 213 of file ViewState.h.
References visible_area.
Referenced by GLPreviewRenderer::Resize(), GLPanosphereOverviewRenderer::Resize(), and GLPlaneOverviewRenderer::Resize().
void VisualizationState::SetZoomLevel | ( | const float | new_zoom | ) |
Definition at line 483 of file ViewState.cpp.
References m_lookAt, m_zoom, celeste::max(), celeste::min(), SetDirtyViewport(), and SetViewingCenter().
Referenced by PreviewCameraTool::ChangeZoomLevel(), and GLPreviewFrame::ResetPreviewZoom().
|
protected |
Definition at line 268 of file ViewState.h.
Referenced by FinishedDraw(), ForceRequireRedraw(), RequireDraw(), PanosphereOverviewVisualizationState::setAngX(), PanosphereOverviewVisualizationState::setAngY(), and VisualizationState().
|
protected |
Definition at line 267 of file ViewState.h.
Referenced by FinishedDraw(), RequireRecalculateMesh(), SetDirtyMesh(), SetScale(), and VisualizationState().
|
protected |
Definition at line 268 of file ViewState.h.
Referenced by FinishedDraw(), RequireRecalculateViewport(), SetDirtyViewport(), and VisualizationState().
|
protected |
Definition at line 270 of file ViewState.h.
Referenced by SetScale(), and VisualizationState().
|
protected |
Definition at line 270 of file ViewState.h.
|
protected |
Definition at line 274 of file ViewState.h.
Referenced by SetCanvasSize(), and SetViewingCenter().
|
protected |
Definition at line 272 of file ViewState.h.
Referenced by GetViewingCenter(), SetCanvasSize(), SetViewingCenter(), SetZoomLevel(), and VisualizationState().
|
protected |
Definition at line 279 of file ViewState.h.
Referenced by DoUpdates(), GetMeshDisplayList(), GetMeshManager(), VisualizationState(), and ~VisualizationState().
|
protected |
Definition at line 255 of file ViewState.h.
Referenced by RequireRecalculateMesh(), SetScale(), and VisualizationState().
|
protected |
Definition at line 280 of file ViewState.h.
Referenced by DoUpdates(), FinishedDraw(), GetOptions(), GetProjectionInfo(), GetSrcImage(), getViewState(), PanosphereOverviewVisualizationState::PanosphereOverviewVisualizationState(), PlaneOverviewVisualizationState::PlaneOverviewVisualizationState(), SetViewingCenter(), VisualizationState(), and ~VisualizationState().
|
protected |
Definition at line 282 of file ViewState.h.
Referenced by GetViewer(), and VisualizationState().
|
protected |
Definition at line 273 of file ViewState.h.
Referenced by GetZoomLevel(), SetViewingCenter(), SetZoomLevel(), and VisualizationState().
|
protected |
Definition at line 276 of file ViewState.h.
Referenced by Redraw(), and VisualizationState().
|
protected |
Definition at line 275 of file ViewState.h.
Referenced by Redraw(), and VisualizationState().
|
protected |
Definition at line 270 of file ViewState.h.
Referenced by GetScale(), PanosphereOverviewVisualizationState::PanosphereOverviewVisualizationState(), PlaneOverviewVisualizationState::PlaneOverviewVisualizationState(), and SetScale().
|
protected |
Definition at line 271 of file ViewState.h.
Referenced by GetVisibleArea(), and SetVisibleArea().