17 namespace mrpt {
namespace gui { } }
20 #if MRPT_HAS_WXWIDGETS
22 #include <wx/string.h>
24 #include <wx/bitmap.h>
27 #include <wx/artprov.h>
29 #include <wx/msgdlg.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>
36 #include <wx/dirdlg.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>
53 class GUI_IMPEXP CMyGLCanvasBase:
public wxGLCanvas
56 CMyGLCanvasBase( wxWindow *parent, wxWindowID
id = wxID_ANY,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize&
size = wxDefaultSize,
59 long style = 0,
const wxString& name = _T(
"CMyGLCanvasBase") );
61 virtual ~CMyGLCanvasBase();
63 void OnPaint(wxPaintEvent& event);
64 void OnSize(wxSizeEvent& event);
65 void OnEraseBackground(wxEraseEvent& event);
66 void OnEnterWindow(wxMouseEvent& event);
68 void OnChar(wxKeyEvent& event);
70 void OnMouseDown(wxMouseEvent& event);
71 void OnMouseMove(wxMouseEvent& event);
72 void OnMouseUp(wxMouseEvent& event);
73 void OnMouseWheel(wxMouseEvent& event);
79 float cameraPointingX,cameraPointingY,cameraPointingZ;
80 float cameraZoomDistance;
81 float cameraElevationDeg,cameraAzimuthDeg;
82 bool cameraIsProjective;
87 bool useCameraFromScene;
94 float clearColorR,clearColorG,clearColorB;
96 static float SENSIBILITY_DEG_PER_PIXEL;
99 virtual void OnCharCustom( wxKeyEvent& event ) {
103 virtual void OnPreRender() { }
104 virtual void OnPostRender() { }
105 virtual void OnPostRenderSwapBuffers(
double At, wxPaintDC &dc) {
109 virtual void OnRenderError(
const wxString &str ) {
126 virtual void OnUserManuallyMovesCamera(
127 float new_cameraPointingX,
128 float new_cameraPointingY,
129 float new_cameraPointingZ,
130 float new_cameraZoomDistance,
131 float new_cameraElevationDeg,
132 float new_cameraAzimuthDeg )
134 cameraPointingX = new_cameraPointingX;
135 cameraPointingY = new_cameraPointingY;
136 cameraPointingZ = new_cameraPointingZ;
137 cameraZoomDistance = new_cameraZoomDistance;
138 cameraElevationDeg = new_cameraElevationDeg ;
139 cameraAzimuthDeg = new_cameraAzimuthDeg;
142 inline void getLastMousePosition(
int &x,
int& y)
const {
149 mrpt::opengl::COpenGLScenePtr m_openGLScene;
152 wxGLContext *m_gl_context;
155 int m_mouseLastX,m_mouseLastY;
157 int mouseClickX,mouseClickY;
161 unsigned long m_StartTime;
162 unsigned long m_LastTime;
163 unsigned long m_LastRedraw;
166 void OnWindowCreation(wxWindowCreateEvent &ev);
168 DECLARE_EVENT_TABLE()
175 #endif // wxUSE_GLCANVAS
176 #endif // MRPT_HAS_WXWIDGETS
177 #endif // CMyGLCanvas_H
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
size_t size(const MATRIXLIKE &m, int dim)
A class used to store a 3D pose (a 3D translation + a rotation in 3D).