Hugin trunk 0.1
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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

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.
 
virtual void panoramaImagesChanged (HuginBase::Panorama &, 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
 
- 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

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
 

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::OverviewOutlinesTool ( ToolHelper helper,
GLViewer preview 
)

◆ ~OverviewOutlinesTool()

OverviewOutlinesTool::~OverviewOutlinesTool ( )
virtual

Definition at line 67 of file OverviewOutlinesTool.cpp.

Member Function Documentation

◆ draw()

void OverviewOutlinesTool::draw ( )
protected

◆ drawBackground()

virtual void OverviewOutlinesTool::drawBackground ( )
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 PanosphereOverviewOutlinesTool, and PlaneOverviewOutlinesTool.

Definition at line 91 of file OverviewOutlinesTool.h.

Referenced by draw().

◆ DrawRect()

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

Definition at line 244 of file OverviewOutlinesTool.cpp.

References HuginBase::PanoramaOptions::ALBERS_EQUAL_AREA_CONIC, HuginBase::PanoramaOptions::ARCHITECTURAL, HuginBase::PanoramaOptions::BIPLANE, HuginBase::PTools::Transform::createTransform(), HuginBase::PanoramaOptions::CYLINDRICAL, DEBUG_ERROR, GreatCircleArc::LineSegment::doGL(), HuginBase::PanoramaOptions::EQUI_PANINI, HuginBase::PanoramaOptions::EQUIRECTANGULAR, HuginBase::BaseSrcPanoImage::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(), HuginBase::PanoramaOptions::HAMMER_AITOFF, HuginBase::PanoramaOptions::LAMBERT, HuginBase::PanoramaOptions::LAMBERT_AZIMUTHAL, GLViewer::m_visualization_state, HuginBase::PanoramaOptions::MERCATOR, HuginBase::PanoramaOptions::MILLER_CYLINDRICAL, mindist, HuginBase::PanoramaOptions::ORTHOGRAPHIC, HuginBase::PanoramaOptions::PANINI, preview, HuginBase::PanoramaOptions::RECTILINEAR, HuginBase::BaseSrcPanoImage::RECTILINEAR, res, HuginBase::SrcPanoImage::setSize(), HuginBase::PanoramaOptions::SINUSOIDAL, HuginBase::PanoramaOptions::STEREOGRAPHIC, thelper, HuginBase::PanoramaOptions::THOBY_PROJECTION, threshold(), OverviewOutlinesTool::Rect::transformImgCoord(), HuginBase::PanoramaOptions::TRANSVERSE_MERCATOR, HuginBase::PanoramaOptions::TRIPLANE, and GreatCircleArc::LineSegment::vertices.

Referenced by draw().

◆ panoramaChanged()

void OverviewOutlinesTool::panoramaChanged ( HuginBase::Panorama 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 71 of file OverviewOutlinesTool.cpp.

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

◆ panoramaImagesChanged()

virtual void OverviewOutlinesTool::panoramaImagesChanged ( HuginBase::Panorama pano,
const HuginBase::UIntSet changed 
)
inlinevirtual

notifies about changes to images

Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.

Parameters
panothe panorama object that changed
changedset of changed images

Implements HuginBase::PanoramaObserver.

Definition at line 51 of file OverviewOutlinesTool.h.

Member Data Documentation

◆ dirty_meshes

bool OverviewOutlinesTool::dirty_meshes
protected

◆ display_list_number_canvas

unsigned int OverviewOutlinesTool::display_list_number_canvas
protected

Definition at line 110 of file OverviewOutlinesTool.h.

Referenced by draw().

◆ display_list_number_canvas_outline

unsigned int OverviewOutlinesTool::display_list_number_canvas_outline
protected

Definition at line 112 of file OverviewOutlinesTool.h.

Referenced by draw().

◆ display_list_number_crop

unsigned int OverviewOutlinesTool::display_list_number_crop
protected

Definition at line 111 of file OverviewOutlinesTool.h.

Referenced by draw().

◆ display_list_number_crop_outline

unsigned int OverviewOutlinesTool::display_list_number_crop_outline
protected

Definition at line 113 of file OverviewOutlinesTool.h.

Referenced by draw().

◆ mindist

const double OverviewOutlinesTool::mindist =2
staticprotected

Definition at line 106 of file OverviewOutlinesTool.h.

Referenced by DrawRect().

◆ preview

GLViewer* OverviewOutlinesTool::preview
protected

Definition at line 108 of file OverviewOutlinesTool.h.

Referenced by draw(), and DrawRect().

◆ res

const double OverviewOutlinesTool::res =10
staticprotected

◆ thelper

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: