Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
GLViewer Class Referenceabstract

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

#include <GLViewer.h>

Inheritance diagram for GLViewer:
Inheritance graph

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 ()
 
wxGLContextGetContext ()
 
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
 
wxGLContextm_glContext
 
HuginBase::Panoramam_pano
 
bool started_creation
 
bool redrawing
 
bool m_toolsInitialized
 
vigra::Diff2D offset
 
double m_scale = 1.0
 
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::GLViewer ( wxWindow *  parent,
HuginBase::Panorama pano,
int  args[],
GLPreviewFrame frame,
wxGLContext shared_context = NULL 
)

◆ ~GLViewer()

GLViewer::~GLViewer ( )
virtual

Member Function Documentation

◆ GetContext()

wxGLContext * GLViewer::GetContext ( )
inline

Definition at line 78 of file GLViewer.h.

References m_glContext.

Referenced by GLPreviewFrame::GLPreviewFrame().

◆ IsActive()

bool GLViewer::IsActive ( )
inline

Definition at line 76 of file GLViewer.h.

References active.

Referenced by RedrawE(), and Resized().

◆ KeyDown()

void GLViewer::KeyDown ( wxKeyEvent e)
protected

Definition at line 468 of file GLViewer.cpp.

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

Referenced by GLViewer().

◆ KeyUp()

void GLViewer::KeyUp ( wxKeyEvent e)
protected

Definition at line 474 of file GLViewer.cpp.

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

Referenced by GLViewer().

◆ MarkToolsDirty()

void GLViewer::MarkToolsDirty ( )

◆ MouseButtons()

void GLViewer::MouseButtons ( wxMouseEvent e)
protected

Definition at line 445 of file GLViewer.cpp.

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

Referenced by GLViewer().

◆ MouseEnter()

void GLViewer::MouseEnter ( wxMouseEvent e)
protected

Definition at line 432 of file GLViewer.cpp.

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

Referenced by GLViewer().

◆ MouseLeave()

void GLViewer::MouseLeave ( wxMouseEvent e)
protected

Definition at line 439 of file GLViewer.cpp.

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

Referenced by GLViewer().

◆ MouseMotion()

void GLViewer::MouseMotion ( wxMouseEvent e)
protected

Definition at line 425 of file GLViewer.cpp.

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

Referenced by GLViewer().

◆ MouseWheel()

void GLViewer::MouseWheel ( wxMouseEvent e)
protected

Definition at line 460 of file GLViewer.cpp.

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

Referenced by GLViewer().

◆ OnEraseBackground()

void GLViewer::OnEraseBackground ( wxEraseEvent e)
protected

Definition at line 420 of file GLViewer.cpp.

Referenced by GLViewer().

◆ Redraw()

void GLViewer::Redraw ( )

◆ RedrawE()

void GLViewer::RedrawE ( wxPaintEvent e)

◆ RefreshWrapper()

void GLViewer::RefreshWrapper ( void obj)
static

Definition at line 349 of file GLViewer.cpp.

References DEBUG_DEBUG, and threshold().

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

◆ Resized()

void GLViewer::Resized ( wxSizeEvent e)

◆ SetActive()

void GLViewer::SetActive ( bool  active)
inline

◆ SetLayoutMode()

void GLViewer::SetLayoutMode ( bool  state)
virtual

◆ SetLayoutScale()

void GLViewer::SetLayoutScale ( double  scale)
virtual

◆ SetPhotometricCorrect()

void GLViewer::SetPhotometricCorrect ( bool  state)

◆ setUp()

virtual void GLViewer::setUp ( )
protectedpure virtual

Implemented in GLPreview, and GLOverview.

Referenced by SetUpContext().

◆ SetUpContext()

void GLViewer::SetUpContext ( )

◆ SetViewerBackground()

void GLViewer::SetViewerBackground ( wxColour  col)

Member Data Documentation

◆ active

bool GLViewer::active
protected

Definition at line 105 of file GLViewer.h.

Referenced by GLViewer(), IsActive(), and SetActive().

◆ frame

GLPreviewFrame* GLViewer::frame
protected

◆ initialised_glew

bool GLViewer::initialised_glew =false
staticprotected

Definition at line 100 of file GLViewer.h.

Referenced by SetUpContext().

◆ m_background_color

wxColour GLViewer::m_background_color
protected

Definition at line 107 of file GLViewer.h.

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

◆ m_glContext

wxGLContext* GLViewer::m_glContext
protected

Definition at line 94 of file GLViewer.h.

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

◆ m_pano

HuginBase::Panorama* GLViewer::m_pano
protected

Definition at line 95 of file GLViewer.h.

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

◆ m_renderer

GLRenderer* GLViewer::m_renderer
protected

◆ m_scale

double GLViewer::m_scale = 1.0
protected

Definition at line 102 of file GLViewer.h.

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

◆ m_tool_helper

ToolHelper* GLViewer::m_tool_helper
protected

◆ m_toolsInitialized

bool GLViewer::m_toolsInitialized
protected

Definition at line 99 of file GLViewer.h.

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

◆ m_view_state

ViewState * GLViewer::m_view_state = NULL
static

◆ m_view_state_observer

size_t GLViewer::m_view_state_observer = 0
static

Definition at line 73 of file GLViewer.h.

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

◆ m_visualization_state

VisualizationState* GLViewer::m_visualization_state

◆ offset

vigra::Diff2D GLViewer::offset
protected

Definition at line 101 of file GLViewer.h.

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

◆ redrawing

bool GLViewer::redrawing
protected

Definition at line 99 of file GLViewer.h.

Referenced by GLViewer(), and RedrawE().

◆ started_creation

bool GLViewer::started_creation
protected

Definition at line 99 of file GLViewer.h.

Referenced by GLViewer(), and SetUpContext().


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