diff options
Diffstat (limited to 'extension/src/MapMesh.hpp')
-rw-r--r-- | extension/src/MapMesh.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/extension/src/MapMesh.hpp b/extension/src/MapMesh.hpp new file mode 100644 index 0000000..5427894 --- /dev/null +++ b/extension/src/MapMesh.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include <godot_cpp/classes/primitive_mesh.hpp> + +namespace OpenVic2 { + class MapMesh : public godot::PrimitiveMesh { + GDCLASS(MapMesh, godot::PrimitiveMesh) + + float aspect_ratio = 2.0f, repeat_proportion = 0.5f; + int subdivide_w = 0, subdivide_d = 0; + + protected: + static void _bind_methods(); + void _request_update(); + + public: + void set_aspect_ratio(const float ratio); + float get_aspect_ratio() const; + + void set_repeat_proportion(const float proportion); + float get_repeat_proportion() const; + + void set_subdivide_width(const int divisions); + int get_subdivide_width() const; + + void set_subdivide_depth(const int divisions); + int get_subdivide_depth() const; + + godot::AABB get_core_aabb() const; + + godot::Array _create_mesh_array() const override; + }; +} |