aboutsummaryrefslogtreecommitdiff
path: root/extension/src/MapMesh.cpp
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-04-24 05:36:42 +0200
committer Spartan322 <Megacake1234@gmail.com>2023-05-02 00:50:24 +0200
commit112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 (patch)
tree8c2376ce06c164e10fe815723e5601f2a7bebf02 /extension/src/MapMesh.cpp
parentb1e985e0774598b3add22069be50f891e981fd79 (diff)
Support features up to clang-format 14
Add .editorconfig Update C++ files within `extension/src` to follow .clang-format
Diffstat (limited to 'extension/src/MapMesh.cpp')
-rw-r--r--extension/src/MapMesh.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/extension/src/MapMesh.cpp b/extension/src/MapMesh.cpp
index 6d94973..84149b9 100644
--- a/extension/src/MapMesh.cpp
+++ b/extension/src/MapMesh.cpp
@@ -69,8 +69,8 @@ int32_t MapMesh::get_subdivide_depth() const {
}
AABB MapMesh::get_core_aabb() const {
- const Vector3 size{ aspect_ratio, 0.0f, 1.0f };
- return AABB{ size * -0.5f, size };
+ const Vector3 size { aspect_ratio, 0.0f, 1.0f };
+ return AABB { size * -0.5f, size };
}
bool MapMesh::is_valid_uv_coord(godot::Vector2 const& uv) const {
@@ -96,15 +96,15 @@ Array MapMesh::_create_mesh_array() const {
uvs.resize(vertex_count);
indices.resize(indice_count);
- static const Vector3 normal{ 0.0f, 1.0f, 0.0f };
- const Size2 uv_size{ 1.0f + 2.0f * repeat_proportion, 1.0f };
- const Size2 size{ aspect_ratio * uv_size.x, uv_size.y }, start_pos = size * -0.5f;
+ static const Vector3 normal { 0.0f, 1.0f, 0.0f };
+ const Size2 uv_size { 1.0f + 2.0f * repeat_proportion, 1.0f };
+ const Size2 size { aspect_ratio * uv_size.x, uv_size.y }, start_pos = size * -0.5f;
int32_t point_index = 0, thisrow = 0, prevrow = 0, indice_index = 0;
- Vector2 subdivide_step{ 1.0f / (subdivide_w + 1.0f) , 1.0f / (subdivide_d + 1.0f) };
- Vector3 point{ 0.0f, 0.0f, start_pos.y };
+ Vector2 subdivide_step { 1.0f / (subdivide_w + 1.0f), 1.0f / (subdivide_d + 1.0f) };
+ Vector3 point { 0.0f, 0.0f, start_pos.y };
Vector2 point_step = subdivide_step * size;
- Vector2 uv{}, uv_step = subdivide_step * uv_size;
+ Vector2 uv {}, uv_step = subdivide_step * uv_size;
for (int32_t j = 0; j <= subdivide_d + 1; ++j) {
point.x = start_pos.x;