00001
00023 #ifndef _GLRENDERER_H
00024 #define _GLRENDERER_H
00025
00026
00027
00028
00029
00030 #include "hugin_utils/utils.h"
00031 #include <base_wx/wxImageCache.h>
00032 #include <vigra_ext/ROIImage.h>
00033 #include <vigra/diff2d.hxx>
00034 #include <utility>
00035
00036 class ToolHelper;
00037 class OverviewToolHelper;
00038 class PreviewToolHelper;
00039 class PanosphereOverviewToolHelper;
00040 class PlaneOverviewToolHelper;
00041
00047 class GLRenderer
00048 {
00049 public:
00052 GLRenderer(const wxColour backgroundColour);
00053
00056 virtual ~GLRenderer();
00063 virtual vigra::Diff2D Resize(int width, int height) = 0;
00064 virtual void Redraw() = 0;
00065
00066 void SetBackground(unsigned char red, unsigned char green, unsigned char blue);
00067 float width_o, height_o;
00069 void SetPreviewBackgroundColor(const wxColour c);
00070
00071 protected:
00072 PT::Panorama * m_pano;
00073 TextureManager * m_tex_man;
00074 MeshManager * m_mesh_man;
00075 ToolHelper *m_tool_helper;
00076 int width, height;
00077 wxColour m_background_color;
00078
00079 };
00080
00084 class GLPreviewRenderer : public GLRenderer
00085 {
00086 public:
00087 GLPreviewRenderer(PT::Panorama * pano, TextureManager *tex_man,
00088 MeshManager *mesh_man, VisualizationState *visualization_state,
00089 PreviewToolHelper *tool_helper, const wxColour backgroundColour);
00090
00091 vigra::Diff2D Resize(int width, int height);
00092 void Redraw();
00093
00094 protected:
00095 VisualizationState * m_visualization_state;
00096 };
00097
00101 class GLPanosphereOverviewRenderer : public GLRenderer
00102 {
00103 public:
00104 GLPanosphereOverviewRenderer(PT::Panorama * pano, TextureManager *tex_man,
00105 MeshManager *mesh_man, PanosphereOverviewVisualizationState *visualization_state,
00106 PanosphereOverviewToolHelper *tool_helper, const wxColour backgroundColour);
00107
00108 vigra::Diff2D Resize(int width, int height);
00109 void Redraw();
00110 protected:
00111 PanosphereOverviewVisualizationState * m_visualization_state;
00112
00113 };
00114
00118 class GLPlaneOverviewRenderer : public GLRenderer
00119 {
00120 public:
00121 GLPlaneOverviewRenderer(PT::Panorama * pano, TextureManager *tex_man,
00122 MeshManager *mesh_man, PlaneOverviewVisualizationState *visualization_state,
00123 PlaneOverviewToolHelper *tool_helper, const wxColour backgroundColour);
00124
00125 vigra::Diff2D Resize(int width, int height);
00126 void Redraw();
00127 protected:
00128 PlaneOverviewVisualizationState * m_visualization_state;
00129
00130 };
00131
00132 #endif