Hugintrunk
0.1
|
class for drawing the outlines of the preview canvas and the crop rectangle in the overview openl scenes it also creates meshes that are used to darken the outside regions it works similarly to the mesh remapper used for the images, with the exception that instead of remapping from image to projection, this needs to remap from projection to another projection More...
#include <OverviewOutlinesTool.h>
Classes | |
class | Rect |
class to represent a single rectangle More... | |
Public Member Functions | |
OverviewOutlinesTool (ToolHelper *, GLViewer *preview) | |
virtual | ~OverviewOutlinesTool () |
virtual void | panoramaChanged (HuginBase::Panorama &pano) |
Notification about a Panorama change. More... | |
virtual void | panoramaImagesChanged (HuginBase::Panorama &, const HuginBase::UIntSet &) |
notifies about changes to images More... | |
virtual void | drawBackground () |
drawing the background means drawing a mesh that covers the whole panorama for the purpose of darkening the regions outside of the preview canvas More... | |
Public Member Functions inherited from HuginBase::PanoramaObserver | |
virtual | ~PanoramaObserver () |
Protected Member Functions | |
void | draw () |
void | DrawRect (double left, double top, double right, double bottom, bool outline, double linewidth=1.0) |
Protected Attributes | |
ToolHelper * | thelper |
bool | dirty_meshes |
GLViewer * | preview |
unsigned int | display_list_number_canvas |
unsigned int | display_list_number_crop |
unsigned int | display_list_number_canvas_outline |
unsigned int | display_list_number_crop_outline |
Static Protected Attributes | |
static const double | res =10 |
static const double | mindist =2 |
class for drawing the outlines of the preview canvas and the crop rectangle in the overview openl scenes it also creates meshes that are used to darken the outside regions it works similarly to the mesh remapper used for the images, with the exception that instead of remapping from image to projection, this needs to remap from projection to another projection
it has two modes of operation:
Definition at line 43 of file OverviewOutlinesTool.h.
OverviewOutlinesTool::OverviewOutlinesTool | ( | ToolHelper * | helper, |
GLViewer * | preview | ||
) |
Definition at line 57 of file OverviewOutlinesTool.cpp.
References HuginBase::Panorama::addObserver(), ToolHelper::GetPanoramaPtr(), and thelper.
|
virtual |
Definition at line 67 of file OverviewOutlinesTool.cpp.
|
protected |
Definition at line 156 of file OverviewOutlinesTool.cpp.
References dirty_meshes, display_list_number_canvas, display_list_number_canvas_outline, display_list_number_crop, display_list_number_crop_outline, drawBackground(), DrawRect(), ViewState::GetOptions(), HuginBase::PanoramaOptions::getROI(), ToolHelper::GetViewStatePtr(), VisualizationState::GetVisibleArea(), ToolHelper::GetVisualizationStatePtr(), GLViewer::m_visualization_state, preview, VisualizationState::RequireRecalculateViewport(), and thelper.
Referenced by PanosphereOverviewOutlinesTool::AfterDrawImagesBackEvent(), PlaneOverviewOutlinesTool::AfterDrawImagesEvent(), and PanosphereOverviewOutlinesTool::AfterDrawImagesFrontEvent().
|
inlinevirtual |
drawing the background means drawing a mesh that covers the whole panorama for the purpose of darkening the regions outside of the preview canvas
Reimplemented in PlaneOverviewOutlinesTool, and PanosphereOverviewOutlinesTool.
Definition at line 91 of file OverviewOutlinesTool.h.
Referenced by draw().
|
protected |
Definition at line 244 of file OverviewOutlinesTool.cpp.
References HuginBase::PanoramaOptions::ALBERS_EQUAL_AREA_CONIC, HuginBase::PanoramaOptions::ARCHITECTURAL, HuginBase::PanoramaOptions::BIPLANE, Rec::bottom, HuginBase::PTools::Transform::createTransform(), HuginBase::PanoramaOptions::CYLINDRICAL, DEBUG_ERROR, GreatCircleArc::LineSegment::doGL(), HuginBase::PanoramaOptions::EQUI_PANINI, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, HuginBase::PanoramaOptions::EQUIRECTANGULAR, HuginBase::PanoramaOptions::EQUISOLID, HuginBase::PanoramaOptions::FULL_FRAME_FISHEYE, HuginBase::PanoramaOptions::GENERAL_PANINI, MeshManager::GetCoord3D(), HuginBase::PanoramaOptions::getHFOV(), VisualizationState::GetMeshManager(), ViewState::GetOptions(), VisualizationState::GetOptions(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getSize(), ToolHelper::GetViewStatePtr(), ToolHelper::GetVisualizationStatePtr(), vigra_ext::EMoR::h, HuginBase::PanoramaOptions::HAMMER_AITOFF, HuginBase::PanoramaOptions::LAMBERT, HuginBase::PanoramaOptions::LAMBERT_AZIMUTHAL, Rec::left, celeste::line, GLViewer::m_visualization_state, HuginBase::PanoramaOptions::MERCATOR, HuginBase::PanoramaOptions::MILLER_CYLINDRICAL, mindist, HuginBase::PanoramaOptions::ORTHOGRAPHIC, HuginBase::PanoramaOptions::PANINI, preview, HuginBase::BaseSrcPanoImage::RECTILINEAR, HuginBase::PanoramaOptions::RECTILINEAR, res, Rec::right, HuginBase::SrcPanoImage::setSize(), HuginBase::PanoramaOptions::SINUSOIDAL, HuginBase::PanoramaOptions::STEREOGRAPHIC, thelper, HuginBase::PanoramaOptions::THOBY_PROJECTION, Rec::top, OverviewOutlinesTool::Rect::transformImgCoord(), HuginBase::PanoramaOptions::TRANSVERSE_MERCATOR, HuginBase::PanoramaOptions::TRIPLANE, OverviewOutlinesTool::Rect::val, GreatCircleArc::LineSegment::vertices, MeshManager::MeshInfo::Coord3D::x, MeshManager::MeshInfo::Coord3D::y, and MeshManager::MeshInfo::Coord3D::z.
Referenced by draw().
|
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 71 of file OverviewOutlinesTool.cpp.
References dirty_meshes, VisualizationState::ForceRequireRedraw(), ToolHelper::GetVisualizationStatePtr(), and thelper.
|
inlinevirtual |
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 51 of file OverviewOutlinesTool.h.
|
protected |
Definition at line 101 of file OverviewOutlinesTool.h.
Referenced by draw(), PanosphereOverviewOutlinesTool::MarkDirty(), PlaneOverviewOutlinesTool::MarkDirty(), and panoramaChanged().
|
protected |
Definition at line 110 of file OverviewOutlinesTool.h.
Referenced by draw().
|
protected |
Definition at line 112 of file OverviewOutlinesTool.h.
Referenced by draw().
|
protected |
Definition at line 111 of file OverviewOutlinesTool.h.
Referenced by draw().
|
protected |
Definition at line 113 of file OverviewOutlinesTool.h.
Referenced by draw().
|
staticprotected |
Definition at line 106 of file OverviewOutlinesTool.h.
Referenced by DrawRect().
|
protected |
Definition at line 108 of file OverviewOutlinesTool.h.
Referenced by draw(), and DrawRect().
|
staticprotected |
Definition at line 105 of file OverviewOutlinesTool.h.
Referenced by DrawRect(), and OverviewOutlinesTool::Rect::transformImgCoord().
|
protected |
Definition at line 99 of file OverviewOutlinesTool.h.
Referenced by draw(), DrawRect(), OverviewOutlinesTool(), and panoramaChanged().