GLViewer Class Reference

A wxWidget to display the fast preview. More...

#include <GLViewer.h>

Inheritance diagram for GLViewer:

Inheritance graph
[legend]
List of all members.

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

VisualizationStatem_visualization_state

Static Public Attributes

static ViewStatem_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

ToolHelperm_tool_helper
GLRendererm_renderer
wxGLContext * m_glContext
HuginBase::Panoramam_pano
bool started_creation
bool redrawing
bool m_toolsInitialized
vigra::Diff2D offset
GLPreviewFrameframe
bool active
wxColour m_background_color

Static Protected Attributes

static bool initialised_glew = false

Detailed Description

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.


Constructor & Destructor Documentation

GLViewer::GLViewer ( wxWindow *  parent,
HuginBase::Panorama pano,
int  args[],
GLPreviewFrame frame,
wxGLContext *  shared_context = NULL 
)

Definition at line 67 of file GLViewer.cpp.

GLViewer::~GLViewer (  )  [virtual]

Definition at line 96 of file GLViewer.cpp.

References m_glContext, m_renderer, m_tool_helper, m_view_state, m_view_state_observer, and m_visualization_state.


Member Function Documentation

wxGLContext* GLViewer::GetContext (  )  [inline]

Definition at line 78 of file GLViewer.h.

References m_glContext.

Referenced by GLPreviewFrame::GLPreviewFrame().

bool GLViewer::IsActive (  )  [inline]

Definition at line 76 of file GLViewer.h.

References active.

Referenced by RedrawE(), and Resized().

void GLViewer::KeyDown ( wxKeyEvent &  e  )  [protected]

Definition at line 440 of file GLViewer.cpp.

References ToolHelper::KeypressEvent(), m_renderer, and m_tool_helper.

void GLViewer::KeyUp ( wxKeyEvent &  e  )  [protected]

Definition at line 446 of file GLViewer.cpp.

References ToolHelper::KeypressEvent(), m_renderer, and m_tool_helper.

void GLViewer::MarkToolsDirty (  ) 

Definition at line 452 of file GLViewer.cpp.

References m_tool_helper, and ToolHelper::MarkDirty().

Referenced by GLPlaneOverviewRenderer::Resize(), and GLPanosphereOverviewRenderer::Resize().

void GLViewer::MouseButtons ( wxMouseEvent &  e  )  [protected]

Definition at line 417 of file GLViewer.cpp.

References m_renderer, m_tool_helper, and ToolHelper::MouseButtonEvent().

void GLViewer::MouseEnter ( wxMouseEvent &  e  )  [protected]

Definition at line 404 of file GLViewer.cpp.

References m_renderer, m_tool_helper, ToolHelper::MouseEnter(), and offset.

void GLViewer::MouseLeave ( wxMouseEvent &  e  )  [protected]

Definition at line 411 of file GLViewer.cpp.

References m_renderer, m_tool_helper, and ToolHelper::MouseLeave().

void GLViewer::MouseMotion ( wxMouseEvent &  e  )  [protected]

Definition at line 397 of file GLViewer.cpp.

References m_renderer, m_tool_helper, ToolHelper::MouseMoved(), and offset.

void GLViewer::MouseWheel ( wxMouseEvent &  e  )  [protected]

Definition at line 432 of file GLViewer.cpp.

References m_renderer, m_tool_helper, and ToolHelper::MouseWheelEvent().

void GLViewer::OnEraseBackground ( wxEraseEvent &  e  )  [protected]

Definition at line 392 of file GLViewer.cpp.

void GLViewer::Redraw (  ) 

Definition at line 360 of file GLViewer.cpp.

References DEBUG_INFO, VisualizationState::DoUpdates(), VisualizationState::FinishedDraw(), vigra_ext::EMoR::h, HuginBase::Panorama::hasPendingChanges(), m_pano, m_renderer, m_visualization_state, offset, GLRenderer::Redraw(), VisualizationState::RequireRecalculateViewport(), GLRenderer::Resize(), and GLRenderer::SetBackground().

Referenced by RedrawE(), and Resized().

void GLViewer::RedrawE ( wxPaintEvent &  e  ) 

Definition at line 299 of file GLViewer.cpp.

References GLPreviewFrame::CanResize(), GLPreviewFrame::ContinueResize(), DEBUG_DEBUG, frame, IsActive(), Redraw(), redrawing, and SetUpContext().

void GLViewer::RefreshWrapper ( void *  obj  )  [static]

Definition at line 327 of file GLViewer.cpp.

References DEBUG_DEBUG.

Referenced by GLOverview::setUp(), and GLPreview::setUp().

void GLViewer::Resized ( wxSizeEvent &  e  ) 

Definition at line 334 of file GLViewer.cpp.

References GLPreviewFrame::CanResize(), DEBUG_DEBUG, frame, vigra_ext::EMoR::h, IsActive(), m_renderer, offset, Redraw(), GLRenderer::Resize(), and SetUpContext().

Referenced by GLPreviewFrame::ContinueResize().

void GLViewer::SetActive ( bool  active  )  [inline]

Definition at line 75 of file GLViewer.h.

Referenced by GLPreviewFrame::GLPreviewFrame(), GLPreviewFrame::LoadOpenGLLayout(), and GLPreviewFrame::OnOverviewToggle().

void GLViewer::SetLayoutMode ( bool  state  )  [virtual]

Reimplemented in GLOverview.

Definition at line 272 of file GLViewer.cpp.

References VisualizationState::GetMeshManager(), m_visualization_state, and MeshManager::SetLayoutMode().

Referenced by GLPreviewFrame::SetMode().

void GLViewer::SetLayoutScale ( double  scale  )  [virtual]

Reimplemented in GLOverview.

Definition at line 278 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 266 of file GLViewer.cpp.

References ViewState::GetTextureManager(), m_view_state, and TextureManager::SetPhotometricCorrect().

Referenced by GLPreviewFrame::MakePreviewTools(), and GLPreviewFrame::OnPhotometric().

virtual void GLViewer::setUp (  )  [protected, pure virtual]

Implemented in GLPreview, and GLOverview.

Referenced by SetUpContext().

void GLViewer::SetUpContext (  ) 

Definition at line 115 of file GLViewer.cpp.

References DEBUG_ERROR, DEBUG_INFO, frame, GLPreviewFrame::getOverview(), GLPreviewFrame::getPreview(), initialised_glew, m_glContext, GLPreview::setUp(), GLOverview::setUp(), setUp(), and started_creation.

Referenced by GLPreviewFrame::InitPreviews(), RedrawE(), and Resized().

void GLViewer::SetViewerBackground ( wxColour  col  ) 

Definition at line 457 of file GLViewer.cpp.

References m_background_color, m_renderer, and GLRenderer::SetPreviewBackgroundColor().

Referenced by GLPreviewFrame::OnPreviewBackgroundColorChanged().


Member Data Documentation

bool GLViewer::active [protected]

Definition at line 106 of file GLViewer.h.

Referenced by IsActive().

GLPreviewFrame* GLViewer::frame [protected]

Definition at line 104 of file GLViewer.h.

Referenced by RedrawE(), Resized(), GLOverview::setUp(), GLPreview::setUp(), and SetUpContext().

bool GLViewer::initialised_glew = false [static, protected]

Definition at line 102 of file GLViewer.h.

Referenced by SetUpContext().

wxColour GLViewer::m_background_color [protected]

Definition at line 108 of file GLViewer.h.

Referenced by GLOverview::setUp(), GLPreview::setUp(), and SetViewerBackground().

wxGLContext* GLViewer::m_glContext [protected]

Definition at line 96 of file GLViewer.h.

Referenced by GetContext(), SetUpContext(), and ~GLViewer().

HuginBase::Panorama* GLViewer::m_pano [protected]

Definition at line 97 of file GLViewer.h.

Referenced by Redraw(), GLOverview::setUp(), and GLPreview::setUp().

GLRenderer* GLViewer::m_renderer [protected]

Definition at line 95 of file GLViewer.h.

Referenced by KeyDown(), KeyUp(), MouseButtons(), MouseEnter(), MouseLeave(), MouseMotion(), MouseWheel(), Redraw(), Resized(), GLOverview::SetMode(), GLOverview::setUp(), GLPreview::setUp(), SetViewerBackground(), GLOverview::~GLOverview(), and ~GLViewer().

ToolHelper* GLViewer::m_tool_helper [protected]

Definition at line 94 of file GLViewer.h.

Referenced by KeyDown(), KeyUp(), MarkToolsDirty(), MouseButtons(), MouseEnter(), MouseLeave(), MouseMotion(), MouseWheel(), GLOverview::SetMode(), GLOverview::setUp(), GLPreview::setUp(), and ~GLViewer().

bool GLViewer::m_toolsInitialized [protected]

Definition at line 101 of file GLViewer.h.

Referenced by GLOverview::setUp(), and GLPreview::setUp().

ViewState * GLViewer::m_view_state = NULL [static]

Definition at line 72 of file GLViewer.h.

Referenced by GLPreviewFrame::OnTrackChangeFOV(), SetPhotometricCorrect(), GLOverview::setUp(), GLPreview::setUp(), and ~GLViewer().

size_t GLViewer::m_view_state_observer = 0 [static]

Definition at line 73 of file GLViewer.h.

Referenced by GLOverview::setUp(), GLPreview::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(), SetLayoutMode(), SetLayoutScale(), GLOverview::SetMode(), GLOverview::setUp(), GLPreview::setUp(), and ~GLViewer().

vigra::Diff2D GLViewer::offset [protected]

Definition at line 103 of file GLViewer.h.

Referenced by MouseEnter(), MouseMotion(), Redraw(), and Resized().

bool GLViewer::redrawing [protected]

Definition at line 101 of file GLViewer.h.

Referenced by RedrawE().

bool GLViewer::started_creation [protected]

Definition at line 101 of file GLViewer.h.

Referenced by SetUpContext().


The documentation for this class was generated from the following files:
Generated on 4 Dec 2016 for Hugintrunk by  doxygen 1.4.7