17namespace mrpt {
namespace gui { } }
27#include <wx/artprov.h>
30#include <wx/filedlg.h>
31#include <wx/progdlg.h>
32#include <wx/imaglist.h>
33#include <wx/busyinfo.h>
35#include <wx/textdlg.h>
37#include <wx/colordlg.h>
38#include <wx/dcmemory.h>
40#if wxUSE_GLCANVAS && MRPT_HAS_OPENGL_GLUT
42#include <wx/glcanvas.h>
43#include <wx/dcclient.h>
62 class GUI_IMPEXP CMyGLCanvasBase:
public wxGLCanvas
65 CMyGLCanvasBase( wxWindow *parent, wxWindowID
id = wxID_ANY,
66 const wxPoint& pos = wxDefaultPosition,
67 const wxSize& size = wxDefaultSize,
68 long style = 0,
const wxString& name = _T(
"CMyGLCanvasBase") );
70 virtual ~CMyGLCanvasBase();
72 void OnPaint(wxPaintEvent& event);
73 void OnSize(wxSizeEvent& event);
74 void OnEraseBackground(wxEraseEvent& event);
75 void OnEnterWindow(wxMouseEvent& event);
77 void OnChar(wxKeyEvent& event);
79 void OnMouseDown(wxMouseEvent& event);
80 void OnMouseMove(wxMouseEvent& event);
81 void OnMouseUp(wxMouseEvent& event);
82 void OnMouseWheel(wxMouseEvent& event);
88 float cameraPointingX,cameraPointingY,cameraPointingZ;
89 float cameraZoomDistance;
90 float cameraElevationDeg,cameraAzimuthDeg;
91 bool cameraIsProjective;
96 bool useCameraFromScene;
103 float clearColorR,clearColorG,clearColorB;
105 static float SENSIBILITY_DEG_PER_PIXEL;
108 virtual void OnCharCustom( wxKeyEvent& event ) {
112 virtual void OnPreRender() { }
113 virtual void OnPostRender() { }
114 virtual void OnPostRenderSwapBuffers(
double At, wxPaintDC &dc) {
118 virtual void OnRenderError(
const wxString &str ) {
135 virtual void OnUserManuallyMovesCamera(
136 float new_cameraPointingX,
137 float new_cameraPointingY,
138 float new_cameraPointingZ,
139 float new_cameraZoomDistance,
140 float new_cameraElevationDeg,
141 float new_cameraAzimuthDeg )
143 cameraPointingX = new_cameraPointingX;
144 cameraPointingY = new_cameraPointingY;
145 cameraPointingZ = new_cameraPointingZ;
146 cameraZoomDistance = new_cameraZoomDistance;
147 cameraElevationDeg = new_cameraElevationDeg ;
148 cameraAzimuthDeg = new_cameraAzimuthDeg;
151 inline void getLastMousePosition(
int &x,
int& y)
const {
161 wxGLContext *m_gl_context;
164 int m_mouseLastX,m_mouseLastY;
166 int mouseClickX,mouseClickY;
170 unsigned long m_StartTime;
171 unsigned long m_LastTime;
172 unsigned long m_LastRedraw;
175 void OnWindowCreation(wxWindowCreateEvent &ev);
177 DECLARE_EVENT_TABLE()
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
struct OPENGL_IMPEXP COpenGLScenePtr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.