Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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. More...
 
virtual ~GLRenderer ()
 dtor. More...
 
virtual vigra::Diff2D Resize (int width, int height)=0
 Resize the viewport because the window's dimensions have changed. More...
 
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 More...
 

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 ( const wxColour  backgroundColour)
explicit

ctor.

Definition at line 50 of file GLRenderer.cpp.

References m_background_color.

GLRenderer::~GLRenderer ( )
virtual

dtor.

Definition at line 65 of file GLRenderer.cpp.

Member Function Documentation

virtual void GLRenderer::Redraw ( )
pure virtual
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 GLPlaneOverviewRenderer, GLPanosphereOverviewRenderer, and GLPreviewRenderer.

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

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

Definition at line 60 of file GLRenderer.cpp.

Referenced by GLViewer::Redraw().

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

int GLRenderer::height
protected
float GLRenderer::height_o
wxColour GLRenderer::m_background_color
protected
MeshManager* GLRenderer::m_mesh_man
protected
HuginBase::Panorama* GLRenderer::m_pano
protected
TextureManager* GLRenderer::m_tex_man
protected
ToolHelper* GLRenderer::m_tool_helper
protected
int GLRenderer::width
protected
float GLRenderer::width_o

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