Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
PlaneOverviewCameraTool Class Reference

tool for manipulation of the opengl 'camera' properties It handles the position of the camera in 3 dimensions. More...

#include <OverviewCameraTool.h>

Inheritance diagram for PlaneOverviewCameraTool:
Inheritance graph

Public Member Functions

 PlaneOverviewCameraTool (PlaneOverviewToolHelper *helper)
 
virtual ~PlaneOverviewCameraTool ()
 
void Activate ()
 Switch on a tool. More...
 
void MouseMoveEvent (double x, double y, wxMouseEvent &e)
 Notify when the mouse pointer has moved over the panorama preview. More...
 
void MouseButtonEvent (wxMouseEvent &e)
 Notify of a mouse button press on the panorama preview. More...
 
void MouseWheelEvent (wxMouseEvent &)
 Notify of a mouse wheel event on the panorama preview. More...
 
void ChangeZoomLevel (bool zoomIn, double scale=1.1)
 
void KeypressEvent (int keycode, int modifiers, bool pressed)
 Notify of a Keypress event. More...
 
- Public Member Functions inherited from PlaneOverviewTool
 PlaneOverviewTool (PlaneOverviewToolHelper *helper)
 
virtual ~PlaneOverviewTool ()
 
- Public Member Functions inherited from OverviewTool
 OverviewTool (OverviewToolHelper *helper)
 
virtual ~OverviewTool ()
 
- Public Member Functions inherited from Tool
 Tool (ToolHelper *helper)
 Construct keeping a pointer to a PreviewToolHelper. More...
 
virtual ~Tool ()
 
virtual void ImagesUnderMouseChangedEvent ()
 Notify when the images directly underneath the mouse pointer have changed. More...
 
virtual void BeforeDrawImagesEvent ()
 Draw using OpenGL anything the tool requires underneath the images. More...
 
virtual void AfterDrawImagesEvent ()
 Draw (using OpenGL) images above the others. More...
 
virtual void ReallyAfterDrawImagesEvent ()
 Draw (using OpenGL) the overlays, e.g. crop highlights, guides. More...
 
virtual bool BeforeDrawImageEvent (unsigned int image)
 Draw what the tool requires just before a given image is drawn. More...
 
virtual void AfterDrawImageEvent (unsigned int image)
 Notification called just after the image was drawn normally. More...
 
virtual void MarkDirty ()
 

Private Attributes

int counter
 
bool down
 
double start_x
 
double start_y
 
double start_pos_x
 
double start_pos_y
 

Additional Inherited Members

- Protected Attributes inherited from Tool
ToolHelperhelper
 The PreviewToolHelper that uses the same preview window and panorama as the tool should. More...
 

Detailed Description

tool for manipulation of the opengl 'camera' properties It handles the position of the camera in 3 dimensions.

dragging with middle click or ctrl + left click for adjusting the XY position and mouse wheel for adjusting Z position (zooming in/out)

Definition at line 72 of file OverviewCameraTool.h.

Constructor & Destructor Documentation

PlaneOverviewCameraTool::PlaneOverviewCameraTool ( PlaneOverviewToolHelper helper)
inlineexplicit

Definition at line 75 of file OverviewCameraTool.h.

virtual PlaneOverviewCameraTool::~PlaneOverviewCameraTool ( )
inlinevirtual

Definition at line 76 of file OverviewCameraTool.h.

Member Function Documentation

void PlaneOverviewCameraTool::Activate ( )
virtual

Switch on a tool.

Inherited classes also register events they want to respond to with the PreviewToolHelper. As events are lost when the tool is deactivated without notification to the PreviewTool, things from the last activation can be cleaned up here too.

Implements Tool.

Definition at line 185 of file OverviewCameraTool.cpp.

References down, Tool::helper, ToolHelper::MOUSE_MOVE, ToolHelper::MOUSE_PRESS, ToolHelper::MOUSE_WHEEL, and ToolHelper::NotifyMe().

void PlaneOverviewCameraTool::ChangeZoomLevel ( bool  zoomIn,
double  scale = 1.1 
)
void PlaneOverviewCameraTool::KeypressEvent ( int  keycode,
int  modifiers,
bool  pressed 
)
virtual

Notify of a Keypress event.

Currently unused as the preview cannot get keyboard input focus.

Reimplemented from Tool.

Definition at line 275 of file OverviewCameraTool.cpp.

References ChangeZoomLevel().

void PlaneOverviewCameraTool::MouseButtonEvent ( wxMouseEvent &  e)
virtual

Notify of a mouse button press on the panorama preview.

Parameters
eThe event created by wxWidgets.

Reimplemented from Tool.

Definition at line 237 of file OverviewCameraTool.cpp.

References down, PlaneOverviewToolHelper::getPlaneX(), PlaneOverviewToolHelper::getPlaneY(), ToolHelper::GetVisualizationStatePtr(), PlaneOverviewVisualizationState::getX(), PlaneOverviewVisualizationState::getY(), Tool::helper, start_pos_x, start_pos_y, start_x, and start_y.

void PlaneOverviewCameraTool::MouseMoveEvent ( double  x,
double  y,
wxMouseEvent &  e 
)
virtual

Notify when the mouse pointer has moved over the panorama preview.

The coordinates are in the space of the panorama output at full size, with no output cropping.

Parameters
xThe horizontal position of the mouse pointer in panorama pixels.
yThe vertical position of the mouse pointer in panorama pixels.
eThe event created by wxWidgets.

Reimplemented from Tool.

Definition at line 193 of file OverviewCameraTool.cpp.

References DEG_TO_RAD, down, VisualizationState::ForceRequireRedraw(), PlaneOverviewVisualizationState::getFOV(), PlaneOverviewVisualizationState::getR(), VisualizationState::GetViewer(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, VisualizationState::Redraw(), PlaneOverviewVisualizationState::setX(), PlaneOverviewVisualizationState::setY(), start_pos_x, start_pos_y, start_x, and start_y.

void PlaneOverviewCameraTool::MouseWheelEvent ( wxMouseEvent &  e)
virtual

Notify of a mouse wheel event on the panorama preview.

Parameters
eThe event created by wxWidgets.

Reimplemented from Tool.

Definition at line 268 of file OverviewCameraTool.cpp.

References ChangeZoomLevel().

Member Data Documentation

int PlaneOverviewCameraTool::counter
private

Definition at line 89 of file OverviewCameraTool.h.

bool PlaneOverviewCameraTool::down
private

Definition at line 90 of file OverviewCameraTool.h.

Referenced by Activate(), MouseButtonEvent(), and MouseMoveEvent().

double PlaneOverviewCameraTool::start_pos_x
private

Definition at line 94 of file OverviewCameraTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().

double PlaneOverviewCameraTool::start_pos_y
private

Definition at line 94 of file OverviewCameraTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().

double PlaneOverviewCameraTool::start_x
private

Definition at line 92 of file OverviewCameraTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().

double PlaneOverviewCameraTool::start_y
private

Definition at line 92 of file OverviewCameraTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().


The documentation for this class was generated from the following files: