18 namespace mrpt {
namespace gui { } }
21 #if MRPT_HAS_WXWIDGETS 23 #include <wx/string.h> 25 #include <wx/bitmap.h> 28 #include <wx/artprov.h> 30 #include <wx/msgdlg.h> 31 #include <wx/filedlg.h> 32 #include <wx/progdlg.h> 33 #include <wx/imaglist.h> 34 #include <wx/busyinfo.h> 36 #include <wx/textdlg.h> 37 #include <wx/dirdlg.h> 38 #include <wx/colordlg.h> 39 #include <wx/dcmemory.h> 41 #if wxUSE_GLCANVAS && MRPT_HAS_OPENGL_GLUT 43 #include <wx/glcanvas.h> 44 #include <wx/dcclient.h> 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 {
158 mrpt::opengl::COpenGLScenePtr m_openGLScene;
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()
184 #endif // wxUSE_GLCANVAS 185 #endif // MRPT_HAS_WXWIDGETS 186 #endif // CMyGLCanvas_H
Keeps a list of text messages which can be rendered to OpenGL contexts by graphic classes...
#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.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
GLuint const GLchar * name