From 8d8d8b336dc099c06399e76b54f947fb1baeb021 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sun, 20 Mar 2022 22:57:53 +0000 Subject: [PATCH] Moved VoxelLodTerrain and VoxelTerrain stuff to their own folders --- SCsub | 2 ++ edition/voxel_tool_lod_terrain.cpp | 2 +- edition/voxel_tool_terrain.cpp | 2 +- .../terrain/voxel_terrain_editor_plugin.cpp | 4 ++-- register_types.cpp | 6 ++--- terrain/{ => fixed_lod}/voxel_box_mover.cpp | 6 ++--- terrain/{ => fixed_lod}/voxel_box_mover.h | 0 terrain/{ => fixed_lod}/voxel_mesh_block_vt.h | 2 +- terrain/{ => fixed_lod}/voxel_terrain.cpp | 22 ++++++++--------- terrain/{ => fixed_lod}/voxel_terrain.h | 12 +++++----- terrain/instancing/voxel_instancer.cpp | 2 +- terrain/{ => variable_lod}/lod_octree.h | 2 +- .../{ => variable_lod}/voxel_lod_terrain.cpp | 24 +++++++++---------- .../{ => variable_lod}/voxel_lod_terrain.h | 12 +++++----- .../voxel_lod_terrain_update_data.h | 12 +++++----- .../voxel_lod_terrain_update_task.cpp | 16 ++++++------- .../voxel_lod_terrain_update_task.h | 4 ++-- .../voxel_mesh_block_vlt.cpp | 6 ++--- .../{ => variable_lod}/voxel_mesh_block_vlt.h | 2 +- 19 files changed, 70 insertions(+), 68 deletions(-) rename terrain/{ => fixed_lod}/voxel_box_mover.cpp (98%) rename terrain/{ => fixed_lod}/voxel_box_mover.h (100%) rename terrain/{ => fixed_lod}/voxel_mesh_block_vt.h (97%) rename terrain/{ => fixed_lod}/voxel_terrain.cpp (99%) rename terrain/{ => fixed_lod}/voxel_terrain.h (97%) rename terrain/{ => variable_lod}/lod_octree.h (99%) rename terrain/{ => variable_lod}/voxel_lod_terrain.cpp (99%) rename terrain/{ => variable_lod}/voxel_lod_terrain.h (98%) rename terrain/{ => variable_lod}/voxel_lod_terrain_update_data.h (95%) rename terrain/{ => variable_lod}/voxel_lod_terrain_update_task.cpp (99%) rename terrain/{ => variable_lod}/voxel_lod_terrain_update_task.h (97%) rename terrain/{ => variable_lod}/voxel_mesh_block_vlt.cpp (98%) rename terrain/{ => variable_lod}/voxel_mesh_block_vlt.h (98%) diff --git a/SCsub b/SCsub index 387112dd..49c483b7 100644 --- a/SCsub +++ b/SCsub @@ -45,6 +45,8 @@ voxel_files = [ "terrain/*.cpp", "terrain/instancing/*.cpp", + "terrain/fixed_lod/*.cpp", + "terrain/variable_lod/*.cpp", "server/*.cpp", "edition/*.cpp", diff --git a/edition/voxel_tool_lod_terrain.cpp b/edition/voxel_tool_lod_terrain.cpp index 23066f5b..fc8af587 100644 --- a/edition/voxel_tool_lod_terrain.cpp +++ b/edition/voxel_tool_lod_terrain.cpp @@ -2,7 +2,7 @@ #include "../constants/voxel_string_names.h" #include "../storage/voxel_buffer_gd.h" #include "../storage/voxel_data_grid.h" -#include "../terrain/voxel_lod_terrain.h" +#include "../terrain/variable_lod/voxel_lod_terrain.h" #include "../util/funcs.h" #include "../util/godot/funcs.h" #include "../util/island_finder.h" diff --git a/edition/voxel_tool_terrain.cpp b/edition/voxel_tool_terrain.cpp index 3f635dcd..a12dea46 100644 --- a/edition/voxel_tool_terrain.cpp +++ b/edition/voxel_tool_terrain.cpp @@ -2,7 +2,7 @@ #include "../meshers/blocky/voxel_mesher_blocky.h" #include "../meshers/cubes/voxel_mesher_cubes.h" #include "../storage/voxel_buffer_gd.h" -#include "../terrain/voxel_terrain.h" +#include "../terrain/fixed_lod/voxel_terrain.h" #include "../util/godot/funcs.h" #include "../util/voxel_raycast.h" diff --git a/editor/terrain/voxel_terrain_editor_plugin.cpp b/editor/terrain/voxel_terrain_editor_plugin.cpp index 9f278611..359d4324 100644 --- a/editor/terrain/voxel_terrain_editor_plugin.cpp +++ b/editor/terrain/voxel_terrain_editor_plugin.cpp @@ -1,7 +1,7 @@ #include "voxel_terrain_editor_plugin.h" #include "../../generators/voxel_generator.h" -#include "../../terrain/voxel_lod_terrain.h" -#include "../../terrain/voxel_terrain.h" +#include "../../terrain/fixed_lod/voxel_terrain.h" +#include "../../terrain/variable_lod/voxel_lod_terrain.h" #include "../about_window.h" #include "../graph/voxel_graph_node_inspector_wrapper.h" #include "voxel_terrain_editor_task_indicator.h" diff --git a/register_types.cpp b/register_types.cpp index 3ff8bd8c..453fc5d2 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -27,13 +27,13 @@ #include "streams/voxel_block_serializer_gd.h" #include "streams/voxel_stream_block_files.h" #include "streams/voxel_stream_script.h" +#include "terrain/fixed_lod/voxel_box_mover.h" +#include "terrain/fixed_lod/voxel_terrain.h" #include "terrain/instancing/voxel_instance_component.h" #include "terrain/instancing/voxel_instance_library_scene_item.h" #include "terrain/instancing/voxel_instancer.h" -#include "terrain/voxel_box_mover.h" -#include "terrain/voxel_lod_terrain.h" +#include "terrain/variable_lod/voxel_lod_terrain.h" #include "terrain/voxel_mesh_block.h" -#include "terrain/voxel_terrain.h" #include "terrain/voxel_viewer.h" #include "util/macros.h" #include "util/noise/fast_noise_lite.h" diff --git a/terrain/voxel_box_mover.cpp b/terrain/fixed_lod/voxel_box_mover.cpp similarity index 98% rename from terrain/voxel_box_mover.cpp rename to terrain/fixed_lod/voxel_box_mover.cpp index 3c57958a..5d9b95f5 100644 --- a/terrain/voxel_box_mover.cpp +++ b/terrain/fixed_lod/voxel_box_mover.cpp @@ -1,7 +1,7 @@ #include "voxel_box_mover.h" -#include "../meshers/blocky/voxel_mesher_blocky.h" -#include "../meshers/cubes/voxel_mesher_cubes.h" -#include "../util/godot/funcs.h" +#include "../../meshers/blocky/voxel_mesher_blocky.h" +#include "../../meshers/cubes/voxel_mesher_cubes.h" +#include "../../util/godot/funcs.h" namespace zylann::voxel { diff --git a/terrain/voxel_box_mover.h b/terrain/fixed_lod/voxel_box_mover.h similarity index 100% rename from terrain/voxel_box_mover.h rename to terrain/fixed_lod/voxel_box_mover.h diff --git a/terrain/voxel_mesh_block_vt.h b/terrain/fixed_lod/voxel_mesh_block_vt.h similarity index 97% rename from terrain/voxel_mesh_block_vt.h rename to terrain/fixed_lod/voxel_mesh_block_vt.h index 94b48558..fde4467e 100644 --- a/terrain/voxel_mesh_block_vt.h +++ b/terrain/fixed_lod/voxel_mesh_block_vt.h @@ -1,7 +1,7 @@ #ifndef VOXEL_MESH_BLOCK_VT_H #define VOXEL_MESH_BLOCK_VT_H -#include "voxel_mesh_block.h" +#include "../voxel_mesh_block.h" namespace zylann::voxel { diff --git a/terrain/voxel_terrain.cpp b/terrain/fixed_lod/voxel_terrain.cpp similarity index 99% rename from terrain/voxel_terrain.cpp rename to terrain/fixed_lod/voxel_terrain.cpp index 19ef183b..76aacf76 100644 --- a/terrain/voxel_terrain.cpp +++ b/terrain/fixed_lod/voxel_terrain.cpp @@ -1,15 +1,15 @@ #include "voxel_terrain.h" -#include "../constants/voxel_constants.h" -#include "../constants/voxel_string_names.h" -#include "../edition/voxel_tool_terrain.h" -#include "../server/voxel_server.h" -#include "../server/voxel_server_updater.h" -#include "../storage/voxel_buffer_gd.h" -#include "../util/funcs.h" -#include "../util/macros.h" -#include "../util/profiling.h" -#include "../util/profiling_clock.h" -#include "voxel_data_block_enter_info.h" +#include "../../constants/voxel_constants.h" +#include "../../constants/voxel_string_names.h" +#include "../../edition/voxel_tool_terrain.h" +#include "../../server/voxel_server.h" +#include "../../server/voxel_server_updater.h" +#include "../../storage/voxel_buffer_gd.h" +#include "../../util/funcs.h" +#include "../../util/macros.h" +#include "../../util/profiling.h" +#include "../../util/profiling_clock.h" +#include "../voxel_data_block_enter_info.h" #include #include diff --git a/terrain/voxel_terrain.h b/terrain/fixed_lod/voxel_terrain.h similarity index 97% rename from terrain/voxel_terrain.h rename to terrain/fixed_lod/voxel_terrain.h index 4c40b937..e7e26eea 100644 --- a/terrain/voxel_terrain.h +++ b/terrain/fixed_lod/voxel_terrain.h @@ -1,13 +1,13 @@ #ifndef VOXEL_TERRAIN_H #define VOXEL_TERRAIN_H -#include "../server/voxel_server.h" -#include "../storage/voxel_data_map.h" -#include "../util/godot/funcs.h" -#include "voxel_data_block_enter_info.h" +#include "../../server/voxel_server.h" +#include "../../storage/voxel_data_map.h" +#include "../../util/godot/funcs.h" +#include "../voxel_data_block_enter_info.h" +#include "../voxel_mesh_map.h" +#include "../voxel_node.h" #include "voxel_mesh_block_vt.h" -#include "voxel_mesh_map.h" -#include "voxel_node.h" #include diff --git a/terrain/instancing/voxel_instancer.cpp b/terrain/instancing/voxel_instancer.cpp index 0e2e811d..24b75655 100644 --- a/terrain/instancing/voxel_instancer.cpp +++ b/terrain/instancing/voxel_instancer.cpp @@ -3,7 +3,7 @@ #include "../../util/godot/funcs.h" #include "../../util/macros.h" #include "../../util/profiling.h" -#include "../voxel_lod_terrain.h" +#include "../variable_lod/voxel_lod_terrain.h" #include "voxel_instance_component.h" #include "voxel_instance_library_scene_item.h" #include "voxel_instancer_rigidbody.h" diff --git a/terrain/lod_octree.h b/terrain/variable_lod/lod_octree.h similarity index 99% rename from terrain/lod_octree.h rename to terrain/variable_lod/lod_octree.h index 01d22a79..ac76e4d8 100644 --- a/terrain/lod_octree.h +++ b/terrain/variable_lod/lod_octree.h @@ -1,7 +1,7 @@ #ifndef LOD_OCTREE_H #define LOD_OCTREE_H -#include "../util/math/box3i.h" +#include "../../util/math/box3i.h" namespace zylann::voxel { diff --git a/terrain/voxel_lod_terrain.cpp b/terrain/variable_lod/voxel_lod_terrain.cpp similarity index 99% rename from terrain/voxel_lod_terrain.cpp rename to terrain/variable_lod/voxel_lod_terrain.cpp index 7d47790b..d158e7c9 100644 --- a/terrain/voxel_lod_terrain.cpp +++ b/terrain/variable_lod/voxel_lod_terrain.cpp @@ -1,16 +1,16 @@ #include "voxel_lod_terrain.h" -#include "../constants/voxel_string_names.h" -#include "../edition/voxel_tool_lod_terrain.h" -#include "../meshers/transvoxel/voxel_mesher_transvoxel.h" -#include "../server/voxel_server_gd.h" -#include "../server/voxel_server_updater.h" -#include "../util/funcs.h" -#include "../util/godot/funcs.h" -#include "../util/macros.h" -#include "../util/profiling.h" -#include "../util/profiling_clock.h" -#include "../util/tasks/async_dependency_tracker.h" -#include "instancing/voxel_instancer.h" +#include "../../constants/voxel_string_names.h" +#include "../../edition/voxel_tool_lod_terrain.h" +#include "../../meshers/transvoxel/voxel_mesher_transvoxel.h" +#include "../../server/voxel_server_gd.h" +#include "../../server/voxel_server_updater.h" +#include "../../util/funcs.h" +#include "../../util/godot/funcs.h" +#include "../../util/macros.h" +#include "../../util/profiling.h" +#include "../../util/profiling_clock.h" +#include "../../util/tasks/async_dependency_tracker.h" +#include "../instancing/voxel_instancer.h" #include "voxel_lod_terrain_update_task.h" #include diff --git a/terrain/voxel_lod_terrain.h b/terrain/variable_lod/voxel_lod_terrain.h similarity index 98% rename from terrain/voxel_lod_terrain.h rename to terrain/variable_lod/voxel_lod_terrain.h index a5fd6af6..cab99341 100644 --- a/terrain/voxel_lod_terrain.h +++ b/terrain/variable_lod/voxel_lod_terrain.h @@ -1,19 +1,19 @@ #ifndef VOXEL_LOD_TERRAIN_HPP #define VOXEL_LOD_TERRAIN_HPP -#include "../server/mesh_block_task.h" -#include "../server/voxel_server.h" -#include "../storage/voxel_data_map.h" +#include "../../server/mesh_block_task.h" +#include "../../server/voxel_server.h" +#include "../../storage/voxel_data_map.h" +#include "../voxel_mesh_map.h" +#include "../voxel_node.h" #include "lod_octree.h" #include "voxel_lod_terrain_update_data.h" #include "voxel_mesh_block_vlt.h" -#include "voxel_mesh_map.h" -#include "voxel_node.h" #include #ifdef TOOLS_ENABLED -#include "../editor/voxel_debug.h" +#include "../../editor/voxel_debug.h" #endif namespace zylann::voxel { diff --git a/terrain/voxel_lod_terrain_update_data.h b/terrain/variable_lod/voxel_lod_terrain_update_data.h similarity index 95% rename from terrain/voxel_lod_terrain_update_data.h rename to terrain/variable_lod/voxel_lod_terrain_update_data.h index 58e0d3af..bd5df331 100644 --- a/terrain/voxel_lod_terrain_update_data.h +++ b/terrain/variable_lod/voxel_lod_terrain_update_data.h @@ -1,13 +1,13 @@ #ifndef VOXEL_LOD_TERRAIN_UPDATE_DATA_H #define VOXEL_LOD_TERRAIN_UPDATE_DATA_H -#include "../constants/voxel_constants.h" -#include "../generators/voxel_generator.h" -#include "../storage/voxel_data_map.h" -#include "../streams/voxel_stream.h" -#include "../util/fixed_array.h" +#include "../../constants/voxel_constants.h" +#include "../../generators/voxel_generator.h" +#include "../../storage/voxel_data_map.h" +#include "../../streams/voxel_stream.h" +#include "../../util/fixed_array.h" +#include "../voxel_mesh_map.h" #include "lod_octree.h" -#include "voxel_mesh_map.h" #include diff --git a/terrain/voxel_lod_terrain_update_task.cpp b/terrain/variable_lod/voxel_lod_terrain_update_task.cpp similarity index 99% rename from terrain/voxel_lod_terrain_update_task.cpp rename to terrain/variable_lod/voxel_lod_terrain_update_task.cpp index 9a095459..d240e588 100644 --- a/terrain/voxel_lod_terrain_update_task.cpp +++ b/terrain/variable_lod/voxel_lod_terrain_update_task.cpp @@ -1,12 +1,12 @@ #include "voxel_lod_terrain_update_task.h" -#include "../server/generate_block_task.h" -#include "../server/load_block_data_task.h" -#include "../server/mesh_block_task.h" -#include "../server/save_block_data_task.h" -#include "../server/voxel_server.h" -#include "../util/godot/funcs.h" -#include "../util/profiling.h" -#include "../util/profiling_clock.h" +#include "../../server/generate_block_task.h" +#include "../../server/load_block_data_task.h" +#include "../../server/mesh_block_task.h" +#include "../../server/save_block_data_task.h" +#include "../../server/voxel_server.h" +#include "../../util/godot/funcs.h" +#include "../../util/profiling.h" +#include "../../util/profiling_clock.h" namespace zylann::voxel { diff --git a/terrain/voxel_lod_terrain_update_task.h b/terrain/variable_lod/voxel_lod_terrain_update_task.h similarity index 97% rename from terrain/voxel_lod_terrain_update_task.h rename to terrain/variable_lod/voxel_lod_terrain_update_task.h index 451260c0..196c0157 100644 --- a/terrain/voxel_lod_terrain_update_task.h +++ b/terrain/variable_lod/voxel_lod_terrain_update_task.h @@ -1,8 +1,8 @@ #ifndef VOXEL_LOD_TERRAIN_UPDATE_TASK_H #define VOXEL_LOD_TERRAIN_UPDATE_TASK_H -#include "../server/priority_dependency.h" -#include "../util/tasks/threaded_task.h" +#include "../../server/priority_dependency.h" +#include "../../util/tasks/threaded_task.h" #include "voxel_lod_terrain_update_data.h" namespace zylann::voxel { diff --git a/terrain/voxel_mesh_block_vlt.cpp b/terrain/variable_lod/voxel_mesh_block_vlt.cpp similarity index 98% rename from terrain/voxel_mesh_block_vlt.cpp rename to terrain/variable_lod/voxel_mesh_block_vlt.cpp index 326c76f0..108ce188 100644 --- a/terrain/voxel_mesh_block_vlt.cpp +++ b/terrain/variable_lod/voxel_mesh_block_vlt.cpp @@ -1,7 +1,7 @@ #include "voxel_mesh_block_vlt.h" -#include "../constants/voxel_string_names.h" -#include "../util/profiling.h" -#include "free_mesh_task.h" +#include "../../constants/voxel_string_names.h" +#include "../../util/profiling.h" +#include "../free_mesh_task.h" namespace zylann::voxel { diff --git a/terrain/voxel_mesh_block_vlt.h b/terrain/variable_lod/voxel_mesh_block_vlt.h similarity index 98% rename from terrain/voxel_mesh_block_vlt.h rename to terrain/variable_lod/voxel_mesh_block_vlt.h index e1912c0d..f01481b3 100644 --- a/terrain/voxel_mesh_block_vlt.h +++ b/terrain/variable_lod/voxel_mesh_block_vlt.h @@ -1,7 +1,7 @@ #ifndef VOXEL_MESH_BLOCK_VLT_H #define VOXEL_MESH_BLOCK_VLT_H -#include "voxel_mesh_block.h" +#include "../voxel_mesh_block.h" namespace zylann::voxel {