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

The renderer handles drawing the opengl scene. More...

#include <GLRenderer.h>

Inheritance diagram for GLRenderer:
Inheritance graph

Public Member Functions

 GLRenderer (const wxColour backgroundColour)
 ctor.
 
virtual ~GLRenderer ()
 dtor.
 
virtual vigra::Diff2D Resize (int width, int height)=0
 Resize the viewport because the window's dimensions have changed.
 
virtual void Redraw ()=0
 
void SetBackground (unsigned char red, unsigned char green, unsigned char blue)
 
void SetPreviewBackgroundColor (const wxColour c)
 sets the preview background color
 

Public Attributes

float width_o
 
float height_o
 

Protected Attributes

HuginBase::Panoramam_pano
 
TextureManagerm_tex_man
 
MeshManagerm_mesh_man
 
ToolHelperm_tool_helper
 
int width
 
int height
 
wxColour m_background_color
 

Detailed Description

The renderer handles drawing the opengl scene.

It is used by a GLViewer, which is a wxWidget. The work of generating textures to represent the image is done by a TextureManager, and the remappings are made in display lists by a MeshManager. The GLViewer gives us instances of those objects to use.

Definition at line 47 of file GLRenderer.h.

Constructor & Destructor Documentation

◆ GLRenderer()

GLRenderer::GLRenderer ( const wxColour  backgroundColour)
explicit

ctor.

Definition at line 50 of file GLRenderer.cpp.

References m_background_color, and threshold().

◆ ~GLRenderer()

GLRenderer::~GLRenderer ( )
virtual

dtor.

Definition at line 65 of file GLRenderer.cpp.

Member Function Documentation

◆ Redraw()

virtual void GLRenderer::Redraw ( )
pure virtual

◆ Resize()

virtual vigra::Diff2D GLRenderer::Resize ( int  width,
int  height 
)
pure virtual

Resize the viewport because the window's dimensions have changed.

Returns
the number of screen pixels from the corner of the widget to the start of the panorama, both horizontally and vertically.
Parameters
widththe width of the widget in screen pixels.
heightthe height of the widget in screen pixels.

Implemented in GLPreviewRenderer, GLPanosphereOverviewRenderer, and GLPlaneOverviewRenderer.

Referenced by GLViewer::Redraw(), and GLViewer::Resized().

◆ SetBackground()

void GLRenderer::SetBackground ( unsigned char  red,
unsigned char  green,
unsigned char  blue 
)

Definition at line 60 of file GLRenderer.cpp.

References threshold().

Referenced by GLViewer::Redraw().

◆ SetPreviewBackgroundColor()

void GLRenderer::SetPreviewBackgroundColor ( const wxColour  c)

sets the preview background color

Definition at line 55 of file GLRenderer.cpp.

References m_background_color.

Referenced by GLViewer::SetViewerBackground().

Member Data Documentation

◆ height

int GLRenderer::height
protected

◆ height_o

float GLRenderer::height_o

◆ m_background_color

wxColour GLRenderer::m_background_color
protected

◆ m_mesh_man

MeshManager* GLRenderer::m_mesh_man
protected

◆ m_pano

HuginBase::Panorama* GLRenderer::m_pano
protected

◆ m_tex_man

TextureManager* GLRenderer::m_tex_man
protected

◆ m_tool_helper

ToolHelper* GLRenderer::m_tool_helper
protected

◆ width

int GLRenderer::width
protected

◆ width_o

float GLRenderer::width_o

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