Hugintrunk
0.1
|
Finds the topmost image underneath the mouse pontier, cancel it's normal drawing, and then subtract it from the rest of the images. More...
#include <PreviewDifferenceTool.h>
Public Member Functions | |
PreviewDifferenceTool (ToolHelper *helper) | |
void | Activate () |
Switch on a tool. More... | |
void | ImagesUnderMouseChangedEvent () |
Notify when the images directly underneath the mouse pointer have changed. More... | |
void | AfterDrawImagesEvent () |
Draw (using OpenGL) images above the others. More... | |
void | BeforeDrawImagesEvent () |
Draw using OpenGL anything the tool requires underneath the images. More... | |
bool | BeforeDrawImageEvent (unsigned int image) |
Draw what the tool requires just before a given image is drawn. More... | |
Public Member Functions inherited from Tool | |
Tool (ToolHelper *helper) | |
Construct keeping a pointer to a PreviewToolHelper. More... | |
virtual | ~Tool () |
virtual void | MouseMoveEvent (double x, double y, wxMouseEvent &e) |
Notify when the mouse pointer has moved over the panorama preview. More... | |
virtual void | MouseButtonEvent (wxMouseEvent &e) |
Notify of a mouse button press on the panorama preview. More... | |
virtual void | MouseWheelEvent (wxMouseEvent &e) |
Notify of a mouse wheel event on the panorama preview. More... | |
virtual void | KeypressEvent (int keycode, int modifiers, bool pressed) |
Notify of a Keypress event. More... | |
virtual void | ReallyAfterDrawImagesEvent () |
Draw (using OpenGL) the overlays, e.g. crop highlights, guides. More... | |
virtual void | AfterDrawImageEvent (unsigned int image) |
Notification called just after the image was drawn normally. More... | |
virtual void | MarkDirty () |
Static Public Member Functions | |
static bool | CheckOpenGLCanDifference () |
check, if graphic card supports the necessary modes for difference tool call this procedure first, when there is a OpenGL context More... | |
Private Attributes | |
unsigned int | image_number |
bool | over_image |
Additional Inherited Members | |
Protected Attributes inherited from Tool | |
ToolHelper * | helper |
The PreviewToolHelper that uses the same preview window and panorama as the tool should. More... | |
Finds the topmost image underneath the mouse pontier, cancel it's normal drawing, and then subtract it from the rest of the images.
It is meant to be the fast preview's equivalent of the accurate preview's difference mode.
Definition at line 34 of file PreviewDifferenceTool.h.
|
explicit |
Definition at line 44 of file PreviewDifferenceTool.cpp.
|
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 71 of file PreviewDifferenceTool.cpp.
References CheckOpenGLCanDifference(), Tool::helper, ToolHelper::IMAGES_UNDER_MOUSE_CHANGE, ToolHelper::NotifyMe(), and over_image.
|
virtual |
Draw (using OpenGL) images above the others.
Reimplemented from Tool.
Definition at line 125 of file PreviewDifferenceTool.cpp.
References TextureManager::BindTexture(), DIFFERENCE_DOUBLE, TextureManager::DisableTexture(), HuginBase::SrcPanoImage::getExposure(), VisualizationState::GetMeshDisplayList(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), TextureManager::GetPhotometricCorrect(), ViewState::GetSrcImage(), ViewState::GetTextureManager(), ToolHelper::GetViewStatePtr(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, image_number, HuginBase::PanoramaOptions::outputExposureValue, and vigra_ext::pow().
|
virtual |
Draw what the tool requires just before a given image is drawn.
This can be used to modify how the images are drawn, prevent drawing of the image, or change the order of the image drawing (with another event to draw the image when it is needed).
Reimplemented from Tool.
Definition at line 182 of file PreviewDifferenceTool.cpp.
|
virtual |
Draw using OpenGL anything the tool requires underneath the images.
Reimplemented from Tool.
Definition at line 175 of file PreviewDifferenceTool.cpp.
References TextureManager::DrawImage(), VisualizationState::GetMeshDisplayList(), ViewState::GetTextureManager(), ToolHelper::GetViewStatePtr(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, and image_number.
|
static |
check, if graphic card supports the necessary modes for difference tool call this procedure first, when there is a OpenGL context
call this function only after OpenGL context was created
Definition at line 51 of file PreviewDifferenceTool.cpp.
Referenced by Activate(), and GLPreviewFrame::FillBlendChoice().
|
virtual |
Notify when the images directly underneath the mouse pointer have changed.
It is monitored by the PreviewToolHelper.
Reimplemented from Tool.
Definition at line 85 of file PreviewDifferenceTool.cpp.
References ToolHelper::DoNotNotifyMe(), ToolHelper::DoNotNotifyMeBeforeDrawing(), ToolHelper::DRAW_OVER_IMAGES, ToolHelper::DRAW_UNDER_IMAGES, VisualizationState::ForceRequireRedraw(), ToolHelper::GetImageNumbersUnderMouse(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, image_number, ToolHelper::NotifyMe(), ToolHelper::NotifyMeBeforeDrawing(), over_image, and VisualizationState::Redraw().
|
private |
Definition at line 49 of file PreviewDifferenceTool.h.
Referenced by AfterDrawImagesEvent(), BeforeDrawImagesEvent(), and ImagesUnderMouseChangedEvent().
|
private |
Definition at line 50 of file PreviewDifferenceTool.h.
Referenced by Activate(), and ImagesUnderMouseChangedEvent().