Class MolaVizImGui
Defined in File MolaVizImGui.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Types
public mola::ExecutableBasepublic mola::VizInterface
Class Documentation
-
class MolaVizImGui : public mola::ExecutableBase, public mola::VizInterface
MOLA visualization — Dear ImGui docking-branch backend.
Implements VizInterface using Dear ImGui + GLFW + OpenGL 3. For the nanogui backend see MolaViz.
mola-viz-imgui main API
-
using window_name_t = std::string
-
using subwindow_name_t = std::string
-
static const window_name_t DEFAULT_WINDOW_NAME
-
static bool IsRunning()
-
static MolaVizImGui *Instance()
-
using update_handler_t = std::function<void(const mrpt::rtti::CObject::Ptr&, void *subWinHandle, const window_name_t &parentWin, const std::string &subWindowTitle, MolaVizImGui *instance, const mrpt::containers::yaml *extra_parameters)>
Sensor-observation rendering handler signature. subWin is nullptr for the ImGui backend — use subWindowTitle to key ImGui state instead.
-
using class_name_t = std::string
-
static void register_gui_handler(const class_name_t &name, const update_handler_t &handler)
-
static void register_gui_cleanup(const std::function<void()> &cleanup)
Register a callback that will be invoked on the GUI thread during shutdown, with the GL context still current, before any GLFW window is destroyed. Handlers use this to release GL resources held in function-local static state (FBOs, textures, VAOs in CImGuiSceneView, …) without risking calls on a dead context.
Module parameters
-
double console_text_font_size_ = 13.0
-
unsigned int max_console_lines_ = 12
-
bool show_rgbd_as_point_cloud_ = false
-
double assumed_sensor_rate_hz_ = 10.0
-
int target_fps_ = 60
-
std::string imgui_app_name_ = "default"
Identifier used to persist ImGui window layout / docking state across runs: each distinct value maps to its own
imgui_<app_name>.inifile under$XDG_CONFIG_HOME/mola/(or$HOME/.config/mola/). Set a different name per launch config (e.g. “kitti_replay”, “live_lio”) to keep layouts separate. Empty string disables persistence.
VizInterface — backend identity
-
virtual const std::string &gui_backend() const noexcept override
VizInterface — backend-agnostic sub-window API
-
virtual std::future<void> create_subwindow_from_description(const mola::gui::WindowDescription &desc, const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
-
virtual std::future<void> enqueue_custom_gui_code(const std::function<void()> &userCode) override
-
virtual void *get_subwindow_handle(const std::string &subWindowTitle, const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
-
virtual std::future<std::optional<std::string>> open_file_dialog(const std::string &title, bool save, const std::vector<std::pair<std::string, std::string>> &filters = {}, const std::string &default_path = "", const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
VizInterface — 3-D scene API
-
virtual std::future<bool> clear_all_point_clouds_with_decay(const std::string &viewportName = "main", const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
-
virtual std::future<bool> update_viewport_look_at(const mrpt::math::TPoint3Df &lookAt, const std::string &viewportName = "main", const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
-
virtual std::future<bool> update_viewport_camera_azimuth(double azimuth, bool absolute_falseForRelative = true, const std::string &viewportName = "main", const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
-
virtual std::future<bool> update_viewport_camera_orthographic(bool orthographic, const std::string &viewportName = "main", const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
-
virtual std::future<bool> execute_custom_code_on_background_scene(const std::function<void(mrpt::opengl::Scene&)> &userCode, const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
VizInterface — observation / RTTI handler API
-
virtual std::future<bool> subwindow_update_visualization(const mrpt::rtti::CObject::Ptr &obj, const std::string &subWindowTitle, const mrpt::containers::yaml *extra_parameters = nullptr, const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
VizInterface — console output
-
virtual std::future<bool> output_console_message(const std::string &message, const std::string &parentWindow = DEFAULT_WINDOW_NAME) override
VizInterface — deprecated nanogui-specific stubs
These compile cleanly and resolve futures immediately (no-ops or delegates). nullptr is returned for create_subwindow().
-
virtual std::future<nanogui::Window*> create_subwindow(const std::string&, const std::string& = DEFAULT_WINDOW_NAME) override
-
virtual std::future<void> enqueue_custom_nanogui_code(const std::function<void()> &userCode) override
-
virtual std::future<void> subwindow_grid_layout(const std::string&, bool, int, const std::string& = DEFAULT_WINDOW_NAME) override
-
virtual std::future<void> subwindow_move_resize(const std::string&, const mrpt::math::TPoint2D_<int>&, const mrpt::math::TPoint2D_<int>&, const std::string& = DEFAULT_WINDOW_NAME) override
Public Functions
-
MolaVizImGui()
-
~MolaVizImGui() override
-
MolaVizImGui(const MolaVizImGui&) = delete
-
MolaVizImGui &operator=(const MolaVizImGui&) = delete
-
MolaVizImGui(MolaVizImGui&&) = delete
-
MolaVizImGui &operator=(MolaVizImGui&&) = delete
-
virtual void initialize(const Yaml &cfg) override
-
virtual void spinOnce() override
-
using window_name_t = std::string