MRPT
2.0.3
|
An extension of nanogui::GLCanvas to render MRPT OpenGL scenes.
Directly access scene
(locking its mutex scene_mtx
first) to update the scene to be rendered.
Definition at line 32 of file MRPT2NanoguiGLCanvas.h.
#include <mrpt/gui/MRPT2NanoguiGLCanvas.h>
Public Member Functions | |
MRPT2NanoguiGLCanvas (nanogui::Widget *parent) | |
~MRPT2NanoguiGLCanvas () | |
virtual void | drawGL () override |
CGlCanvasBase & | camera () |
const CGlCanvasBase & | camera () const |
Public Attributes | |
mrpt::opengl::COpenGLScene::Ptr | scene |
The scene to render in this control. More... | |
std::mutex | scene_mtx |
Protected Member Functions | |
Internal virtual functions to handle GUI events | |
virtual bool | mouseMotionEvent (const nanogui::Vector2i &p, const nanogui::Vector2i &rel, int button, int modifiers) override |
virtual bool | mouseButtonEvent (const nanogui::Vector2i &p, int button, bool down, int modifiers) override |
virtual bool | scrollEvent (const nanogui::Vector2i &p, const nanogui::Vector2f &rel) override |
Protected Attributes | |
internal::NanoGUICanvasHeadless | m_headless_canvas |
Used to keep track of mouse events on the camera. More... | |
MRPT2NanoguiGLCanvas::MRPT2NanoguiGLCanvas | ( | nanogui::Widget * | parent | ) |
Definition at line 19 of file MRPT2NanoguiGLCanvas.cpp.
|
default |
|
inline |
Definition at line 46 of file MRPT2NanoguiGLCanvas.h.
References m_headless_canvas.
|
inline |
Definition at line 47 of file MRPT2NanoguiGLCanvas.h.
References m_headless_canvas.
|
overridevirtual |
Definition at line 26 of file MRPT2NanoguiGLCanvas.cpp.
References mrpt::img::TColorf::A, mrpt::img::TColorf::B, mrpt::exception_to_str(), mrpt::img::TColorf::G, m_headless_canvas, mrpt::img::TColorf::R, mrpt::opengl::CCamera::render(), scene, scene_mtx, THROW_EXCEPTION, and mrpt::gui::CGlCanvasBase::updateCameraParams().
|
overrideprotectedvirtual |
Definition at line 73 of file MRPT2NanoguiGLCanvas.cpp.
References m_headless_canvas, and mrpt::gui::internal::NanoGUICanvasHeadless::mouseButtonEvent().
|
overrideprotectedvirtual |
Definition at line 65 of file MRPT2NanoguiGLCanvas.cpp.
References m_headless_canvas, and mrpt::gui::internal::NanoGUICanvasHeadless::mouseMotionEvent().
|
overrideprotectedvirtual |
Definition at line 79 of file MRPT2NanoguiGLCanvas.cpp.
References m_headless_canvas, and mrpt::gui::internal::NanoGUICanvasHeadless::scrollEvent().
|
protected |
Used to keep track of mouse events on the camera.
Definition at line 63 of file MRPT2NanoguiGLCanvas.h.
Referenced by camera(), drawGL(), mouseButtonEvent(), mouseMotionEvent(), and scrollEvent().
mrpt::opengl::COpenGLScene::Ptr mrpt::gui::MRPT2NanoguiGLCanvas::scene |
The scene to render in this control.
Definition at line 43 of file MRPT2NanoguiGLCanvas.h.
Referenced by drawGL().
std::mutex mrpt::gui::MRPT2NanoguiGLCanvas::scene_mtx |
Definition at line 44 of file MRPT2NanoguiGLCanvas.h.
Referenced by drawGL().
Page generated by Doxygen 1.8.14 for MRPT 2.0.3 Git: 8e9e8af54 Wed May 13 17:41:24 2020 +0200 at miƩ may 13 17:55:54 CEST 2020 |