summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorsmix8 <52464204+smix8@users.noreply.github.com>2024-02-26 07:15:31 +0100
committersmix8 <52464204+smix8@users.noreply.github.com>2024-02-27 11:18:16 +0100
commit35dafc9fa8ac26cca9ca1da606cbfe782468d05f (patch)
tree84b4b187e6e16c513497225a2127234c96823e97 /editor
parentbb6b06c81343073f10cbbd2af515cf0dac1e6549 (diff)
downloadredot-engine-35dafc9fa8ac26cca9ca1da606cbfe782468d05f.tar.gz
Split monolithic physics class files
Splits monolithic physics class files.
Diffstat (limited to 'editor')
-rw-r--r--editor/import/3d/resource_importer_scene.cpp9
-rw-r--r--editor/plugins/cast_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.h2
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.h2
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.h2
-rw-r--r--editor/plugins/gizmos/collision_object_3d_gizmo_plugin.cpp6
-rw-r--r--editor/plugins/gizmos/collision_polygon_3d_gizmo_plugin.cpp2
-rw-r--r--editor/plugins/gizmos/collision_shape_3d_gizmo_plugin.cpp2
-rw-r--r--editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp6
-rw-r--r--editor/plugins/gizmos/physics_bone_3d_gizmo_plugin.cpp3
-rw-r--r--editor/plugins/gizmos/ray_cast_3d_gizmo_plugin.cpp2
-rw-r--r--editor/plugins/gizmos/shape_cast_3d_gizmo_plugin.cpp2
-rw-r--r--editor/plugins/gizmos/spring_arm_3d_gizmo_plugin.cpp2
-rw-r--r--editor/plugins/gizmos/vehicle_body_3d_gizmo_plugin.cpp2
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.h2
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp5
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp3
-rw-r--r--editor/plugins/navigation_obstacle_3d_editor_plugin.h2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp4
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.h3
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.h2
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp7
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp2
24 files changed, 44 insertions, 33 deletions
diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp
index 3310d6f298..9af6810b41 100644
--- a/editor/import/3d/resource_importer_scene.cpp
+++ b/editor/import/3d/resource_importer_scene.cpp
@@ -37,14 +37,15 @@
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/import/3d/scene_import_settings.h"
-#include "scene/3d/area_3d.h"
-#include "scene/3d/collision_shape_3d.h"
#include "scene/3d/importer_mesh_instance_3d.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/navigation_region_3d.h"
#include "scene/3d/occluder_instance_3d.h"
-#include "scene/3d/physics_body_3d.h"
-#include "scene/3d/vehicle_body_3d.h"
+#include "scene/3d/physics/area_3d.h"
+#include "scene/3d/physics/collision_shape_3d.h"
+#include "scene/3d/physics/physics_body_3d.h"
+#include "scene/3d/physics/static_body_3d.h"
+#include "scene/3d/physics/vehicle_body_3d.h"
#include "scene/animation/animation_player.h"
#include "scene/resources/3d/box_shape_3d.h"
#include "scene/resources/3d/importer_mesh.h"
diff --git a/editor/plugins/cast_2d_editor_plugin.cpp b/editor/plugins/cast_2d_editor_plugin.cpp
index a6457e38a7..64db19d85e 100644
--- a/editor/plugins/cast_2d_editor_plugin.cpp
+++ b/editor/plugins/cast_2d_editor_plugin.cpp
@@ -33,8 +33,8 @@
#include "canvas_item_editor_plugin.h"
#include "editor/editor_node.h"
#include "editor/editor_undo_redo_manager.h"
-#include "scene/2d/ray_cast_2d.h"
-#include "scene/2d/shape_cast_2d.h"
+#include "scene/2d/physics/ray_cast_2d.h"
+#include "scene/2d/physics/shape_cast_2d.h"
void Cast2DEditor::_notification(int p_what) {
switch (p_what) {
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.h b/editor/plugins/collision_polygon_2d_editor_plugin.h
index 070a01f651..61e6cc3dda 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -32,7 +32,7 @@
#define COLLISION_POLYGON_2D_EDITOR_PLUGIN_H
#include "editor/plugins/abstract_polygon_2d_editor.h"
-#include "scene/2d/collision_polygon_2d.h"
+#include "scene/2d/physics/collision_polygon_2d.h"
class CollisionPolygon2DEditor : public AbstractPolygon2DEditor {
GDCLASS(CollisionPolygon2DEditor, AbstractPolygon2DEditor);
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h
index d58f5d511f..0e454799d6 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -32,7 +32,7 @@
#define COLLISION_SHAPE_2D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "scene/2d/collision_shape_2d.h"
+#include "scene/2d/physics/collision_shape_2d.h"
class CanvasItemEditor;
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.h b/editor/plugins/cpu_particles_2d_editor_plugin.h
index 5077827ce8..ffcf53af66 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.h
@@ -32,8 +32,8 @@
#define CPU_PARTICLES_2D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/cpu_particles_2d.h"
+#include "scene/2d/physics/collision_polygon_2d.h"
#include "scene/gui/box_container.h"
class CheckBox;
diff --git a/editor/plugins/gizmos/collision_object_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/collision_object_3d_gizmo_plugin.cpp
index 63f2883ed7..caac143f23 100644
--- a/editor/plugins/gizmos/collision_object_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/collision_object_3d_gizmo_plugin.cpp
@@ -32,9 +32,9 @@
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/collision_object_3d.h"
-#include "scene/3d/collision_polygon_3d.h"
-#include "scene/3d/collision_shape_3d.h"
+#include "scene/3d/physics/collision_object_3d.h"
+#include "scene/3d/physics/collision_polygon_3d.h"
+#include "scene/3d/physics/collision_shape_3d.h"
#include "scene/resources/surface_tool.h"
CollisionObject3DGizmoPlugin::CollisionObject3DGizmoPlugin() {
diff --git a/editor/plugins/gizmos/collision_polygon_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/collision_polygon_3d_gizmo_plugin.cpp
index 50c10be11d..7d19e8f677 100644
--- a/editor/plugins/gizmos/collision_polygon_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/collision_polygon_3d_gizmo_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/collision_polygon_3d.h"
+#include "scene/3d/physics/collision_polygon_3d.h"
CollisionPolygon3DGizmoPlugin::CollisionPolygon3DGizmoPlugin() {
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
diff --git a/editor/plugins/gizmos/collision_shape_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/collision_shape_3d_gizmo_plugin.cpp
index 3cf9164460..9d4c08ed57 100644
--- a/editor/plugins/gizmos/collision_shape_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/collision_shape_3d_gizmo_plugin.cpp
@@ -36,7 +36,7 @@
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/gizmos/gizmo_3d_helper.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/collision_shape_3d.h"
+#include "scene/3d/physics/collision_shape_3d.h"
#include "scene/resources/3d/box_shape_3d.h"
#include "scene/resources/3d/capsule_shape_3d.h"
#include "scene/resources/3d/concave_polygon_shape_3d.h"
diff --git a/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp
index 3a8a0cff96..c15ddef933 100644
--- a/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/joint_3d_gizmo_plugin.cpp
@@ -33,7 +33,11 @@
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/joint_3d.h"
+#include "scene/3d/physics/joints/cone_twist_joint_3d.h"
+#include "scene/3d/physics/joints/generic_6dof_joint_3d.h"
+#include "scene/3d/physics/joints/hinge_joint_3d.h"
+#include "scene/3d/physics/joints/pin_joint_3d.h"
+#include "scene/3d/physics/joints/slider_joint_3d.h"
#define BODY_A_RADIUS 0.25
#define BODY_B_RADIUS 0.27
diff --git a/editor/plugins/gizmos/physics_bone_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/physics_bone_3d_gizmo_plugin.cpp
index d1511a5f76..b15f9bec3f 100644
--- a/editor/plugins/gizmos/physics_bone_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/physics_bone_3d_gizmo_plugin.cpp
@@ -33,7 +33,8 @@
#include "editor/editor_settings.h"
#include "editor/plugins/gizmos/joint_3d_gizmo_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/physics_body_3d.h"
+#include "scene/3d/physics/physical_bone_3d.h"
+#include "scene/3d/physics/physics_body_3d.h"
PhysicalBone3DGizmoPlugin::PhysicalBone3DGizmoPlugin() {
create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
diff --git a/editor/plugins/gizmos/ray_cast_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/ray_cast_3d_gizmo_plugin.cpp
index eb9e54fe1d..d783c4e4a7 100644
--- a/editor/plugins/gizmos/ray_cast_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/ray_cast_3d_gizmo_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/ray_cast_3d.h"
+#include "scene/3d/physics/ray_cast_3d.h"
RayCast3DGizmoPlugin::RayCast3DGizmoPlugin() {
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
diff --git a/editor/plugins/gizmos/shape_cast_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/shape_cast_3d_gizmo_plugin.cpp
index 23a224fc01..909f5b5f9a 100644
--- a/editor/plugins/gizmos/shape_cast_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/shape_cast_3d_gizmo_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/shape_cast_3d.h"
+#include "scene/3d/physics/shape_cast_3d.h"
ShapeCast3DGizmoPlugin::ShapeCast3DGizmoPlugin() {
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
diff --git a/editor/plugins/gizmos/spring_arm_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/spring_arm_3d_gizmo_plugin.cpp
index 69acac5a89..85e2c86947 100644
--- a/editor/plugins/gizmos/spring_arm_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/spring_arm_3d_gizmo_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/spring_arm_3d.h"
+#include "scene/3d/physics/spring_arm_3d.h"
#include "scene/resources/3d/shape_3d.h"
void SpringArm3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
diff --git a/editor/plugins/gizmos/vehicle_body_3d_gizmo_plugin.cpp b/editor/plugins/gizmos/vehicle_body_3d_gizmo_plugin.cpp
index ef6cd88868..69e87a55c0 100644
--- a/editor/plugins/gizmos/vehicle_body_3d_gizmo_plugin.cpp
+++ b/editor/plugins/gizmos/vehicle_body_3d_gizmo_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "scene/3d/vehicle_body_3d.h"
+#include "scene/3d/physics/vehicle_body_3d.h"
VehicleWheel3DGizmoPlugin::VehicleWheel3DGizmoPlugin() {
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.h b/editor/plugins/gpu_particles_2d_editor_plugin.h
index 237a005ab7..f202179eff 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.h
@@ -32,8 +32,8 @@
#define GPU_PARTICLES_2D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/gpu_particles_2d.h"
+#include "scene/2d/physics/collision_polygon_2d.h"
#include "scene/gui/box_container.h"
#include "scene/gui/spin_box.h"
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index 061b839ee3..d62eddeeea 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -35,9 +35,10 @@
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/themes/editor_scale.h"
-#include "scene/3d/collision_shape_3d.h"
#include "scene/3d/navigation_region_3d.h"
-#include "scene/3d/physics_body_3d.h"
+#include "scene/3d/physics/collision_shape_3d.h"
+#include "scene/3d/physics/physics_body_3d.h"
+#include "scene/3d/physics/static_body_3d.h"
#include "scene/gui/box_container.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/menu_button.h"
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index 4e45714174..8bfd3d0957 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -40,7 +40,8 @@
#include "main/main.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/navigation_region_3d.h"
-#include "scene/3d/physics_body_3d.h"
+#include "scene/3d/physics/physics_body_3d.h"
+#include "scene/3d/physics/static_body_3d.h"
#include "scene/gui/menu_button.h"
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
diff --git a/editor/plugins/navigation_obstacle_3d_editor_plugin.h b/editor/plugins/navigation_obstacle_3d_editor_plugin.h
index 1b125873d1..393f526da9 100644
--- a/editor/plugins/navigation_obstacle_3d_editor_plugin.h
+++ b/editor/plugins/navigation_obstacle_3d_editor_plugin.h
@@ -32,8 +32,8 @@
#define NAVIGATION_OBSTACLE_3D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "scene/3d/collision_polygon_3d.h"
#include "scene/3d/mesh_instance_3d.h"
+#include "scene/3d/physics/collision_polygon_3d.h"
#include "scene/gui/box_container.h"
#include "scene/resources/immediate_mesh.h"
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 4e462cfe34..ac1efa550f 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -78,11 +78,11 @@
#include "editor/plugins/node_3d_editor_gizmos.h"
#include "editor/scene_tree_dock.h"
#include "scene/3d/camera_3d.h"
-#include "scene/3d/collision_shape_3d.h"
#include "scene/3d/decal.h"
#include "scene/3d/light_3d.h"
#include "scene/3d/mesh_instance_3d.h"
-#include "scene/3d/physics_body_3d.h"
+#include "scene/3d/physics/collision_shape_3d.h"
+#include "scene/3d/physics/physics_body_3d.h"
#include "scene/3d/visual_instance_3d.h"
#include "scene/3d/world_environment.h"
#include "scene/gui/center_container.h"
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.cpp b/editor/plugins/physical_bone_3d_editor_plugin.cpp
index 37092f924e..b7c12ab5c0 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.cpp
+++ b/editor/plugins/physical_bone_3d_editor_plugin.cpp
@@ -33,6 +33,7 @@
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"
#include "editor/plugins/node_3d_editor_plugin.h"
+#include "scene/3d/physics/physical_bone_3d.h"
#include "scene/gui/separator.h"
void PhysicalBone3DEditor::_bind_methods() {
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.h b/editor/plugins/physical_bone_3d_editor_plugin.h
index c9799d3faa..5c49e641a5 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.h
+++ b/editor/plugins/physical_bone_3d_editor_plugin.h
@@ -32,10 +32,11 @@
#define PHYSICAL_BONE_3D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "scene/3d/physics_body_3d.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
+class PhysicalBone3D;
+
class PhysicalBone3DEditor : public Object {
GDCLASS(PhysicalBone3DEditor, Object);
diff --git a/editor/plugins/polygon_3d_editor_plugin.h b/editor/plugins/polygon_3d_editor_plugin.h
index 6cb9275dd6..77c9b2218b 100644
--- a/editor/plugins/polygon_3d_editor_plugin.h
+++ b/editor/plugins/polygon_3d_editor_plugin.h
@@ -32,8 +32,8 @@
#define POLYGON_3D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "scene/3d/collision_polygon_3d.h"
#include "scene/3d/mesh_instance_3d.h"
+#include "scene/3d/physics/collision_polygon_3d.h"
#include "scene/gui/box_container.h"
#include "scene/resources/immediate_mesh.h"
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index b6a6c8968e..f23bbab863 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -40,10 +40,11 @@
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/themes/editor_scale.h"
-#include "scene/3d/collision_shape_3d.h"
-#include "scene/3d/joint_3d.h"
#include "scene/3d/mesh_instance_3d.h"
-#include "scene/3d/physics_body_3d.h"
+#include "scene/3d/physics/collision_shape_3d.h"
+#include "scene/3d/physics/joints/joint_3d.h"
+#include "scene/3d/physics/physical_bone_3d.h"
+#include "scene/3d/physics/physics_body_3d.h"
#include "scene/gui/separator.h"
#include "scene/gui/texture_rect.h"
#include "scene/resources/3d/capsule_shape_3d.h"
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 3e98f3d64f..de81264f13 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -38,9 +38,9 @@
#include "editor/gui/editor_zoom_widget.h"
#include "editor/scene_tree_dock.h"
#include "editor/themes/editor_scale.h"
-#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/light_occluder_2d.h"
#include "scene/2d/mesh_instance_2d.h"
+#include "scene/2d/physics/collision_polygon_2d.h"
#include "scene/2d/polygon_2d.h"
#include "scene/gui/box_container.h"
#include "scene/gui/menu_button.h"