feat(editor): multi-select objects, time-of-day lighting, WOT loading

- Multi-select: Ctrl+Shift+Click adds objects to selection, transforms
  (move/rotate/scale/delete) operate on all selected objects at once
- Time-of-day slider (0-24h) with automatic sun angle, light color,
  ambient, fog, and sky color transitions (dawn/day/dusk/night)
- View > Sky/Lighting menu: color pickers for light/ambient/fog, fog
  distance sliders, preset buttons (Dawn/Noon/Dusk/Night)
- loadADT prefers WOT/WHM open format from custom_zones/output dirs
- Selection count display when multiple objects selected
- setSkyPreset now delegates to setTimeOfDay for consistency
This commit is contained in:
Kelsi 2026-05-05 13:47:23 -07:00
parent d44eaec487
commit ddf97e9b8a
7 changed files with 147 additions and 30 deletions

View file

@ -34,13 +34,18 @@ public:
// Place object at world position
void placeObject(const glm::vec3& position);
// Select object nearest to ray
// Select object nearest to ray (Shift adds to selection)
int selectAt(const rendering::Ray& ray, float maxDist = 50.0f);
void addToSelection(int idx);
void toggleSelection(int idx);
void clearSelection();
int getSelectedIndex() const { return selectedIdx_; }
PlacedObject* getSelected();
const std::vector<int>& getSelectedIndices() const { return selectedIndices_; }
size_t selectionCount() const { return selectedIndices_.size(); }
bool isMultiSelected() const { return selectedIndices_.size() > 1; }
// Transform selected
// Transform selected (operates on all selected objects)
void moveSelected(const glm::vec3& delta);
void rotateSelected(const glm::vec3& deltaDeg);
void scaleSelected(float delta);
@ -85,6 +90,7 @@ private:
std::vector<PlacedObject> objects_;
std::vector<int> undoStack_; // indices of recently placed objects
int selectedIdx_ = -1;
std::vector<int> selectedIndices_;
uint32_t uniqueIdCounter_ = 1;
float placementRotY_ = 0.0f;
float placementScale_ = 1.0f;