44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "MetaEditor/EditorPresenter.h"
|
|
|
|
#include <array>
|
|
#include <filesystem>
|
|
#include <memory>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace metacore::editor {
|
|
|
|
struct PendingShellEdits {
|
|
struct TransformEdit {
|
|
std::string entity_id;
|
|
std::array<float, 3> position{0.0F, 0.0F, 0.0F};
|
|
std::array<float, 3> rotation{0.0F, 0.0F, 0.0F};
|
|
std::array<float, 3> scale{1.0F, 1.0F, 1.0F};
|
|
};
|
|
|
|
std::optional<TransformEdit> transform_edit;
|
|
};
|
|
|
|
class IEditorShell {
|
|
public:
|
|
virtual ~IEditorShell() = default;
|
|
|
|
virtual bool initialize() = 0;
|
|
virtual void shutdown() = 0;
|
|
virtual void consume_snapshot(const EditorFrameSnapshot& snapshot) = 0;
|
|
|
|
[[nodiscard]] virtual bool initialized() const = 0;
|
|
[[nodiscard]] virtual const EditorFrameSnapshot& last_snapshot() const = 0;
|
|
[[nodiscard]] virtual std::string summarize_snapshot() const = 0;
|
|
[[nodiscard]] virtual std::string describe_workspace() const = 0;
|
|
[[nodiscard]] virtual std::string shell_name() const = 0;
|
|
[[nodiscard]] virtual PendingShellEdits consume_pending_edits() = 0;
|
|
virtual void set_debug_export_path(std::filesystem::path path) = 0;
|
|
};
|
|
|
|
std::unique_ptr<IEditorShell> create_default_editor_shell();
|
|
|
|
} // namespace metacore::editor
|