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)
 Notification about a Panorama change.
void panoramaImagesChanged (HuginBase::PanoramaData &, const HuginBase::UIntSet &)
 notifies about changes to images
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

static const double res = 10
static const double mindist = 2

Classes

class  Rect
 class to represent a single rectangle More...

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 HuginBase::PanoramaOptions::ALBERS_EQUAL_AREA_CONIC, HuginBase::PanoramaOptions::ARCHITECTURAL, HuginBase::PanoramaOptions::BIPLANE, Rec::bottom, HuginBase::PTools::Transform::createTransform(), HuginBase::PanoramaOptions::CYLINDRICAL, 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, 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::BaseSrcPanoImage::setHFOV(), HuginBase::BaseSrcPanoImage::setProjection(), 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().

void OverviewOutlinesTool::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 60 of file OverviewOutlinesTool.cpp.

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

void OverviewOutlinesTool::panoramaImagesChanged ( HuginBase::PanoramaData ,
const HuginBase::UIntSet  
) [inline, 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 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 106 of file OverviewOutlinesTool.h.

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 105 of file OverviewOutlinesTool.h.

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