aboutsummaryrefslogtreecommitdiff
path: root/extension/src/MapMesh.cpp
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-05-02 11:25:32 +0200
committer GitHub <noreply@github.com>2023-05-02 11:25:32 +0200
commit9f772a314dc130df95fe5e3b018a9ba60e5be5b1 (patch)
treeab138ae3c615adeb51972b4bfff992dea86cd69c /extension/src/MapMesh.cpp
parentbe43b260128664756054a289cf9d22319def1f8a (diff)
parent112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 (diff)
Merge pull request #97 from Spartan322/update/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;