Hugintrunk
0.1
|
A wxWidget to display the fast preview. More...
#include <GLViewer.h>
Public Member Functions | |
GLViewer (wxWindow *parent, HuginBase::Panorama &pano, int args[], GLPreviewFrame *frame, wxGLContext *shared_context=NULL) | |
virtual | ~GLViewer () |
void | RedrawE (wxPaintEvent &e) |
void | Resized (wxSizeEvent &e) |
void | Redraw () |
void | SetUpContext () |
void | SetPhotometricCorrect (bool state) |
virtual void | SetLayoutMode (bool state) |
virtual void | SetLayoutScale (double scale) |
void | SetActive (bool active) |
bool | IsActive () |
wxGLContext * | GetContext () |
void | SetViewerBackground (wxColour col) |
void | MarkToolsDirty () |
Static Public Member Functions | |
static void | RefreshWrapper (void *obj) |
Public Attributes | |
VisualizationState * | m_visualization_state |
Static Public Attributes | |
static ViewState * | m_view_state = NULL |
static size_t | m_view_state_observer = 0 |
Protected Member Functions | |
void | OnEraseBackground (wxEraseEvent &e) |
void | MouseMotion (wxMouseEvent &e) |
void | MouseEnter (wxMouseEvent &e) |
void | MouseLeave (wxMouseEvent &e) |
void | MouseButtons (wxMouseEvent &e) |
void | MouseWheel (wxMouseEvent &e) |
void | KeyDown (wxKeyEvent &e) |
void | KeyUp (wxKeyEvent &e) |
virtual void | setUp ()=0 |
Protected Attributes | |
ToolHelper * | m_tool_helper |
GLRenderer * | m_renderer |
wxGLContext * | m_glContext |
HuginBase::Panorama * | m_pano |
bool | started_creation |
bool | redrawing |
bool | m_toolsInitialized |
vigra::Diff2D | offset |
double | m_scale = 1.0 |
GLPreviewFrame * | frame |
bool | active |
wxColour | m_background_color |
Static Protected Attributes | |
static bool | initialised_glew =false |
A wxWidget to display the fast preview.
It is the OpenGL equivalent of PreviewPanel. The actual work in rendering the preview is done by a GLRenderer.
Definition at line 51 of file GLViewer.h.
GLViewer::GLViewer | ( | wxWindow * | parent, |
HuginBase::Panorama & | pano, | ||
int | args[], | ||
GLPreviewFrame * | frame, | ||
wxGLContext * | shared_context = NULL |
||
) |
Definition at line 73 of file GLViewer.cpp.
|
virtual |
Definition at line 102 of file GLViewer.cpp.
References m_glContext, m_renderer, m_tool_helper, m_view_state, m_view_state_observer, and m_visualization_state.
|
inline |
Definition at line 78 of file GLViewer.h.
References m_glContext.
Referenced by GLPreviewFrame::GLPreviewFrame().
|
inline |
Definition at line 76 of file GLViewer.h.
References active.
|
protected |
Definition at line 467 of file GLViewer.cpp.
References ToolHelper::KeypressEvent(), m_renderer, and m_tool_helper.
|
protected |
Definition at line 473 of file GLViewer.cpp.
References ToolHelper::KeypressEvent(), m_renderer, and m_tool_helper.
void GLViewer::MarkToolsDirty | ( | ) |
Definition at line 479 of file GLViewer.cpp.
References m_tool_helper, and ToolHelper::MarkDirty().
Referenced by GLPanosphereOverviewRenderer::Resize(), and GLPlaneOverviewRenderer::Resize().
|
protected |
Definition at line 444 of file GLViewer.cpp.
References m_renderer, m_tool_helper, and ToolHelper::MouseButtonEvent().
|
protected |
Definition at line 431 of file GLViewer.cpp.
References m_renderer, m_scale, m_tool_helper, ToolHelper::MouseEnter(), offset, and hugin_utils::roundi().
|
protected |
Definition at line 438 of file GLViewer.cpp.
References m_renderer, m_tool_helper, and ToolHelper::MouseLeave().
|
protected |
Definition at line 424 of file GLViewer.cpp.
References m_renderer, m_scale, m_tool_helper, ToolHelper::MouseMoved(), offset, and hugin_utils::roundi().
|
protected |
Definition at line 459 of file GLViewer.cpp.
References m_renderer, m_tool_helper, and ToolHelper::MouseWheelEvent().
|
protected |
Definition at line 419 of file GLViewer.cpp.
void GLViewer::Redraw | ( | ) |
Definition at line 384 of file GLViewer.cpp.
References DEBUG_INFO, VisualizationState::DoUpdates(), VisualizationState::FinishedDraw(), HuginBase::Panorama::hasPendingChanges(), m_pano, m_renderer, m_scale, m_visualization_state, offset, GLRenderer::Redraw(), VisualizationState::RequireRecalculateViewport(), GLRenderer::Resize(), and GLRenderer::SetBackground().
Referenced by RedrawE(), GLPreviewFrame::ResetPreviewZoom(), and Resized().
void GLViewer::RedrawE | ( | wxPaintEvent & | e | ) |
Definition at line 321 of file GLViewer.cpp.
References GLPreviewFrame::CanResize(), GLPreviewFrame::ContinueResize(), DEBUG_DEBUG, frame, IsActive(), Redraw(), redrawing, and SetUpContext().
|
static |
Definition at line 348 of file GLViewer.cpp.
References DEBUG_DEBUG.
Referenced by GLPreview::setUp(), and GLOverview::setUp().
void GLViewer::Resized | ( | wxSizeEvent & | e | ) |
Definition at line 355 of file GLViewer.cpp.
References GLPreviewFrame::CanResize(), DEBUG_DEBUG, frame, IsActive(), m_renderer, m_scale, offset, Redraw(), GLRenderer::Resize(), and SetUpContext().
Referenced by GLPreviewFrame::ContinueResize().
|
inline |
Definition at line 75 of file GLViewer.h.
References active.
Referenced by GLPreviewFrame::GLPreviewFrame(), GLPreviewFrame::LoadOpenGLLayout(), and GLPreviewFrame::OnOverviewToggle().
|
virtual |
Reimplemented in GLOverview.
Definition at line 294 of file GLViewer.cpp.
References VisualizationState::GetMeshManager(), m_visualization_state, and MeshManager::SetLayoutMode().
Referenced by GLPreviewFrame::SetMode().
|
virtual |
Reimplemented in GLOverview.
Definition at line 300 of file GLViewer.cpp.
References VisualizationState::GetMeshManager(), m_visualization_state, and MeshManager::SetLayoutScale().
Referenced by GLPreviewFrame::OnLayoutScaleChange().
void GLViewer::SetPhotometricCorrect | ( | bool | state | ) |
Definition at line 288 of file GLViewer.cpp.
References ViewState::GetTextureManager(), m_view_state, and TextureManager::SetPhotometricCorrect().
Referenced by GLPreviewFrame::MakePreviewTools(), and GLPreviewFrame::OnPhotometric().
|
protectedpure virtual |
Implemented in GLOverview, and GLPreview.
Referenced by SetUpContext().
void GLViewer::SetUpContext | ( | ) |
Definition at line 121 of file GLViewer.cpp.
References DEBUG_ERROR, DEBUG_INFO, frame, GLPreviewFrame::getOverview(), GLPreviewFrame::getPreview(), initialised_glew, m_glContext, setUp(), GLPreview::setUp(), GLOverview::setUp(), and started_creation.
Referenced by GLPreviewFrame::InitPreviews(), RedrawE(), and Resized().
void GLViewer::SetViewerBackground | ( | wxColour | col | ) |
Definition at line 484 of file GLViewer.cpp.
References m_background_color, m_renderer, and GLRenderer::SetPreviewBackgroundColor().
Referenced by GLPreviewFrame::OnPreviewBackgroundColorChanged().
|
protected |
Definition at line 107 of file GLViewer.h.
Referenced by IsActive(), and SetActive().
|
protected |
Definition at line 105 of file GLViewer.h.
Referenced by RedrawE(), Resized(), GLPreview::setUp(), GLOverview::setUp(), and SetUpContext().
|
staticprotected |
Definition at line 102 of file GLViewer.h.
Referenced by SetUpContext().
|
protected |
Definition at line 109 of file GLViewer.h.
Referenced by GLPreview::setUp(), GLOverview::setUp(), and SetViewerBackground().
|
protected |
Definition at line 96 of file GLViewer.h.
Referenced by GetContext(), SetUpContext(), and ~GLViewer().
|
protected |
Definition at line 97 of file GLViewer.h.
Referenced by Redraw(), GLPreview::setUp(), and GLOverview::setUp().
|
protected |
Definition at line 95 of file GLViewer.h.
Referenced by KeyDown(), KeyUp(), MouseButtons(), MouseEnter(), MouseLeave(), MouseMotion(), MouseWheel(), Redraw(), Resized(), GLOverview::SetMode(), GLPreview::setUp(), GLOverview::setUp(), SetViewerBackground(), GLOverview::~GLOverview(), and ~GLViewer().
|
protected |
Definition at line 104 of file GLViewer.h.
Referenced by MouseEnter(), MouseMotion(), Redraw(), and Resized().
|
protected |
Definition at line 94 of file GLViewer.h.
Referenced by KeyDown(), KeyUp(), MarkToolsDirty(), MouseButtons(), MouseEnter(), MouseLeave(), MouseMotion(), MouseWheel(), GLOverview::SetMode(), GLPreview::setUp(), GLOverview::setUp(), and ~GLViewer().
|
protected |
Definition at line 101 of file GLViewer.h.
Referenced by GLPreview::setUp(), and GLOverview::setUp().
|
static |
Definition at line 72 of file GLViewer.h.
Referenced by GLPreviewFrame::OnTrackChangeFOV(), SetPhotometricCorrect(), GLPreview::setUp(), GLOverview::setUp(), and ~GLViewer().
|
static |
Definition at line 73 of file GLViewer.h.
Referenced by GLPreview::setUp(), GLOverview::setUp(), and ~GLViewer().
VisualizationState* GLViewer::m_visualization_state |
Definition at line 71 of file GLViewer.h.
Referenced by OverviewOutlinesTool::draw(), OverviewOutlinesTool::DrawRect(), GLPreviewFrame::OnDragChoice(), GLPreviewFrame::OnOverviewModeChoice(), Redraw(), GLPreviewFrame::ResetPreviewZoom(), SetLayoutMode(), SetLayoutScale(), GLOverview::SetMode(), GLPreview::setUp(), GLOverview::setUp(), and ~GLViewer().
|
protected |
Definition at line 103 of file GLViewer.h.
Referenced by MouseEnter(), MouseMotion(), Redraw(), and Resized().
|
protected |
Definition at line 101 of file GLViewer.h.
Referenced by RedrawE().
|
protected |
Definition at line 101 of file GLViewer.h.
Referenced by SetUpContext().