#pragma once #include #include #include "render/Renderer.h" #include "navigation/PathFinder.h" #include "items/GameObjectLoader.h" #include namespace ZL { class Location; // forward declaration — LocationEditor.cpp includes Location.h enum class EditorMode { None, Navigation, InteractiveObjects // GameObjects // future }; class LocationEditor { public: explicit LocationEditor(Location& location); // Navigation editor state std::vector navigationEditorPoints; VertexRenderStruct navigationEditorPointsMesh; std::vector navigationEditorNavMeshes; int navigationEditorObstacleCounter = 0; // Interactive object editor state std::vector interactiveObjectBoundsMeshes; std::vector interactionPositionMeshes; int selectedInteractiveObjectIndex = 0; int boundsClickCount = 0; // 0 = waiting for first corner, 1 = waiting for second Eigen::Vector3f boundsClickA = Eigen::Vector3f::Zero(); // Game object editor state std::vector editorPlacedObjects; int editorPlacedObjectCounter = 0; // Navigation editor methods void buildNavMeshes(); void drawNavigation(); void rebuildPointsMesh(); void drawPoints(); void handleLeftClick(const Eigen::Vector3f& hit, bool ctrlHeld); void handleRightClick(); void save(); void reload(); // Interactive object editor methods void buildInteractiveObjectBoundsMeshes(); void drawInteractiveObjectBounds(); void selectInteractiveObject(int index); void handleInteractiveObjectClick(const Eigen::Vector3f& worldHit, bool ctrlHeld); void saveInteractiveObjects(); // Save all editor data at once (nav mesh + interactive objects) void saveAll(); // Game object editor methods void placeTree(); void saveObjects(); private: Location& loc; }; } // namespace ZL