From 70c040d042cb536e5ce16b0cfff0e0afa39e8ed7 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Thu, 14 Sep 2023 08:52:25 +0100 Subject: Logger::warning, format cleanup + req comments --- extension/src/openvic-extension/MapMesh.hpp | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 extension/src/openvic-extension/MapMesh.hpp (limited to 'extension/src/openvic-extension/MapMesh.hpp') diff --git a/extension/src/openvic-extension/MapMesh.hpp b/extension/src/openvic-extension/MapMesh.hpp new file mode 100644 index 0000000..38b208c --- /dev/null +++ b/extension/src/openvic-extension/MapMesh.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include + +namespace OpenVic { + class MapMesh : public godot::PrimitiveMesh { + GDCLASS(MapMesh, godot::PrimitiveMesh) + + float aspect_ratio = 2.0f, repeat_proportion = 0.5f; + int32_t 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 int32_t divisions); + int32_t get_subdivide_width() const; + + void set_subdivide_depth(const int32_t divisions); + int32_t get_subdivide_depth() const; + + godot::AABB get_core_aabb() const; + bool is_valid_uv_coord(godot::Vector2 const& uv) const; + + godot::Array _create_mesh_array() const override; + }; +} -- cgit v1.2.3-56-ga3b1