mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
- Erode brush mode: simulates water erosion by moving height downhill based on slope, creating natural drainage patterns and gullies - NPC JSON loader: File > Load NPCs parses saved creatures.json back into the spawn list (round-trip save/load now works) - Auto-save: every 5 minutes when unsaved changes exist, exports the full zone (ADT + WDT + creatures) to the output directory - Sculpt mode now has 6 brush types: Raise/Lower/Smooth/Flatten/Level/Erode
45 lines
938 B
C++
45 lines
938 B
C++
#pragma once
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
|
|
enum class BrushMode {
|
|
Raise,
|
|
Lower,
|
|
Smooth,
|
|
Flatten,
|
|
Level,
|
|
Erode
|
|
};
|
|
|
|
struct BrushSettings {
|
|
BrushMode mode = BrushMode::Raise;
|
|
float radius = 30.0f;
|
|
float strength = 5.0f;
|
|
float falloff = 0.5f; // 0 = hard edge, 1 = full falloff
|
|
float flattenHeight = 0.0f;
|
|
};
|
|
|
|
class EditorBrush {
|
|
public:
|
|
BrushSettings& settings() { return settings_; }
|
|
const BrushSettings& settings() const { return settings_; }
|
|
|
|
bool isActive() const { return active_; }
|
|
void setActive(bool a) { active_ = a; }
|
|
|
|
const glm::vec3& getPosition() const { return worldPos_; }
|
|
void setPosition(const glm::vec3& pos) { worldPos_ = pos; }
|
|
|
|
float getInfluence(float distance) const;
|
|
|
|
private:
|
|
BrushSettings settings_;
|
|
glm::vec3 worldPos_{0.0f};
|
|
bool active_ = false;
|
|
};
|
|
|
|
} // namespace editor
|
|
} // namespace wowee
|