adding and integrating ImGuizmo

This commit is contained in:
2026-10-02 11:36:33 -07:00
parent 379589fe8c
commit 6e48b0605c
28 changed files with 1223 additions and 108 deletions
+39
View File
@@ -0,0 +1,39 @@
#pragma once
#include <sophia/frame_info.hpp>
#include <sophia/handles.hpp>
#include <sophia/scene_view_registry.hpp>
#include <sophia/ui/panel.hpp>
#include <sophia/ui/ui.hpp>
#include "../editor_context.hpp"
/**
* Shows the active scene through its own active camera: what the game will
* see.
*/
class GamePanel : public sophia::Panel {
public:
// Renders into `target` through `view`, a SceneView with no camera of its
// own that this panel keeps pointed at the active scene.
GamePanel(sophia::UI& ui, EditorContext& context,
sophia::SceneViewRegistry& sceneViews, sophia::SceneViewHandle view,
sophia::RenderTargetHandle target)
: Panel{{.name = "Game",
.windowFlags = ImGuiWindowFlags_NoScrollbar |
ImGuiWindowFlags_NoScrollWithMouse}},
ui{ui},
context{context},
sceneViews{sceneViews},
view{view},
target{target} {}
void onUpdate(const sophia::FrameInfo& frameInfo) override;
private:
sophia::UI& ui;
EditorContext& context;
sophia::SceneViewRegistry& sceneViews;
sophia::SceneViewHandle view;
sophia::RenderTargetHandle target;
};