struct mola::MolaVizImGui::PerWindowData

Overview

struct PerWindowData
{
    // structs

    struct PendingSensorObs;

    // fields

    GLFWwindow* glfw_window = nullptr;
    std::shared_ptr<mrpt::opengl::COpenGLScene> background_scene;
    std::mutex background_scene_mtx;
    std::unique_ptr<mrpt::imgui::CImGuiSceneView> background_scene_view;
    float cam_azimuth_deg = 110.0f;
    float cam_elevation_deg = 15.0f;
    float cam_zoom = 20.0f;
    float cam_look_at[3] = {0.0f, 0.0f, 0.0f};
    bool cam_orthographic = false;
    bool cam_dirty = true;
    std::map<subwindow_name_t, SubWindowState> sub_windows;
    std::map<subwindow_name_t, PendingSensorObs> sensor_windows;
    std::deque<std::string> console_messages;
    std::deque<DecayingCloud> decaying_clouds;
    size_t max_decaying_clouds = 100;
    mola::gui::MenuBar menu_bar;
};

Fields

std::shared_ptr<mrpt::opengl::COpenGLScene> background_scene

mrpt scene rendered in the background OpenGL viewport.

std::unique_ptr<mrpt::imgui::CImGuiSceneView> background_scene_view

Camera / FBO renderer for the background scene. Held by unique_ptr so we can release its GL resources (FBO/texture) explicitly while the GL context is still current, before glfwDestroyWindow(). CImGuiSceneView is non-copyable and non-movable.

float cam_azimuth_deg = 110.0f

Camera state mirrored from background_scene_view after each render. API calls (update_viewport_*) write here; render_background_scene pushes to the view on the first frame (cam_dirty=true) and reads back every frame so mouse interaction persists.

bool cam_dirty = true

push cam_* into view on next render

std::map<subwindow_name_t, SubWindowState> sub_windows

Sub-windows registered for this host window.

std::deque<std::string> console_messages

Console overlay lines.

std::deque<DecayingCloud> decaying_clouds

Decaying point clouds.

mola::gui::MenuBar menu_bar

Menu bar (empty = no menu bar rendered).