Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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. 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

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

Definition at line 67 of file OverviewOutlinesTool.cpp.

Member Function Documentation

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

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 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().

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.

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

bool OverviewOutlinesTool::dirty_meshes
protected
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
staticprotected

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
staticprotected
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: