OverviewOutlinesTool Class Reference

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>

Inheritance diagram for OverviewOutlinesTool:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OverviewOutlinesTool (ToolHelper *, GLViewer *preview)
virtual ~OverviewOutlinesTool ()
void panoramaChanged (HuginBase::PanoramaData &pano)
void panoramaImagesChanged (HuginBase::PanoramaData &, const HuginBase::UIntSet &)
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

Protected Member Functions

void draw ()
void DrawRect (double left, double top, double right, double bottom, bool outline, double linewidth=1.0)

Protected Attributes

ToolHelperthelper
bool dirty_meshes
GLViewerpreview
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

const double res = 10
const double mindist = 2

Detailed Description

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.


Constructor & Destructor Documentation

OverviewOutlinesTool::OverviewOutlinesTool ToolHelper ,
GLViewer preview
 

Definition at line 46 of file OverviewOutlinesTool.cpp.

References HuginBase::Panorama::addObserver(), ToolHelper::GetPanoramaPtr(), and thelper.

OverviewOutlinesTool::~OverviewOutlinesTool  )  [virtual]
 

Definition at line 56 of file OverviewOutlinesTool.cpp.


Member Function Documentation

void OverviewOutlinesTool::draw  )  [protected]
 

Definition at line 133 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().

virtual void OverviewOutlinesTool::drawBackground  )  [inline, virtual]
 

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 PanosphereOverviewOutlinesTool, and PlaneOverviewOutlinesTool.

Definition at line 91 of file OverviewOutlinesTool.h.

Referenced by draw().

void OverviewOutlinesTool::DrawRect double  left,
double  top,
double  right,
double  bottom,
bool  outline,
double  linewidth = 1.0
[protected]
 

Definition at line 221 of file OverviewOutlinesTool.cpp.

References Rec::bottom, HuginBase::PTools::Transform::createTransform(), GreatCircleArc::LineSegment::doGL(), hugin_utils::FDiff2D, MeshManager::GetCoord3D(), HuginBase::PanoramaOptions::getHFOV(), VisualizationState::GetMeshManager(), ViewState::GetOptions(), VisualizationState::GetOptions(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getSize(), ToolHelper::GetViewStatePtr(), ToolHelper::GetVisualizationStatePtr(), Rec::left, GLViewer::m_visualization_state, mindist, preview, res, Rec::right, HuginBase::BaseSrcPanoImage::setHFOV(), HuginBase::BaseSrcPanoImage::setProjection(), HuginBase::SrcPanoImage::setSize(), thelper, Rec::top, OverviewOutlinesTool::Rect::transformImgCoord(), OverviewOutlinesTool::Rect::val, GreatCircleArc::LineSegment::vertices, MeshManager::MeshInfo::Coord3D::x, MeshManager::MeshInfo::Coord3D::y, and MeshManager::MeshInfo::Coord3D::z.

Referenced by draw().

void OverviewOutlinesTool::panoramaChanged HuginBase::PanoramaData pano  ) 
 

Definition at line 60 of file OverviewOutlinesTool.cpp.

References dirty_meshes, VisualizationState::ForceRequireRedraw(), ToolHelper::GetVisualizationStatePtr(), and thelper.

void OverviewOutlinesTool::panoramaImagesChanged HuginBase::PanoramaData ,
const HuginBase::UIntSet
[inline]
 

Definition at line 51 of file OverviewOutlinesTool.h.


Member Data Documentation

bool OverviewOutlinesTool::dirty_meshes [protected]
 

Definition at line 101 of file OverviewOutlinesTool.h.

Referenced by draw(), and panoramaChanged().

unsigned int OverviewOutlinesTool::display_list_number_canvas [protected]
 

Definition at line 110 of file OverviewOutlinesTool.h.

Referenced by draw().

unsigned int OverviewOutlinesTool::display_list_number_canvas_outline [protected]
 

Definition at line 112 of file OverviewOutlinesTool.h.

Referenced by draw().

unsigned int OverviewOutlinesTool::display_list_number_crop [protected]
 

Definition at line 111 of file OverviewOutlinesTool.h.

Referenced by draw().

unsigned int OverviewOutlinesTool::display_list_number_crop_outline [protected]
 

Definition at line 113 of file OverviewOutlinesTool.h.

Referenced by draw().

const double OverviewOutlinesTool::mindist = 2 [static, protected]
 

Definition at line 44 of file OverviewOutlinesTool.cpp.

Referenced by DrawRect().

GLViewer* OverviewOutlinesTool::preview [protected]
 

Definition at line 108 of file OverviewOutlinesTool.h.

Referenced by draw(), and DrawRect().

const double OverviewOutlinesTool::res = 10 [static, protected]
 

Definition at line 43 of file OverviewOutlinesTool.cpp.

Referenced by DrawRect(), and OverviewOutlinesTool::Rect::transformImgCoord().

ToolHelper* OverviewOutlinesTool::thelper [protected]
 

Definition at line 99 of file OverviewOutlinesTool.h.

Referenced by draw(), DrawRect(), OverviewOutlinesTool(), and panoramaChanged().


The documentation for this class was generated from the following files:
Generated on Tue Sep 23 01:25:52 2014 for Hugintrunk by  doxygen 1.3.9.1