From 0c320a6bf3f9d8d2570a9230a29cf8ae925e89f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 28 Mar 2020 13:19:05 +0100 Subject: [PATCH] More server renames for consistency after #37361 --- main/tests/test_main.cpp | 14 +++--- .../{test_physics.cpp => test_physics_3d.cpp} | 18 ++++---- .../{test_physics.h => test_physics_3d.h} | 4 +- scene/2d/physics_body_2d.cpp | 4 +- scene/2d/physics_body_2d.h | 2 +- scene/register_scene_types.cpp | 14 ++++++ scene/resources/world_2d.cpp | 2 +- servers/navigation_server_2d.cpp | 2 +- servers/navigation_server_2d.h | 2 +- servers/navigation_server_3d.cpp | 2 +- servers/navigation_server_3d.h | 2 +- servers/physics_2d/body_2d_sw.cpp | 8 ++-- servers/physics_2d/body_2d_sw.h | 10 ++--- servers/physics_2d/physics_server_2d_sw.cpp | 7 +-- servers/physics_2d/physics_server_2d_sw.h | 8 ++-- .../physics_2d/physics_server_2d_wrap_mt.cpp | 2 +- .../physics_2d/physics_server_2d_wrap_mt.h | 2 +- servers/physics_2d/space_2d_sw.cpp | 24 +++++----- servers/physics_2d/space_2d_sw.h | 12 ++--- servers/physics_3d/area_3d_sw.cpp | 2 +- servers/physics_3d/area_3d_sw.h | 2 +- servers/physics_3d/area_pair_3d_sw.cpp | 2 +- servers/physics_3d/area_pair_3d_sw.h | 2 +- servers/physics_3d/body_3d_sw.cpp | 2 +- servers/physics_3d/body_3d_sw.h | 2 +- servers/physics_3d/body_pair_3d_sw.cpp | 2 +- servers/physics_3d/body_pair_3d_sw.h | 2 +- servers/physics_3d/broad_phase_3d_basic.cpp | 2 +- servers/physics_3d/broad_phase_3d_basic.h | 2 +- servers/physics_3d/broad_phase_3d_sw.cpp | 2 +- servers/physics_3d/broad_phase_3d_sw.h | 2 +- servers/physics_3d/collision_object_3d_sw.cpp | 2 +- servers/physics_3d/collision_object_3d_sw.h | 2 +- .../physics_3d/collision_solver_3d_sat.cpp | 2 +- servers/physics_3d/collision_solver_3d_sat.h | 2 +- servers/physics_3d/collision_solver_3d_sw.cpp | 2 +- servers/physics_3d/collision_solver_3d_sw.h | 2 +- servers/physics_3d/constraint_3d_sw.h | 2 +- .../joints/cone_twist_joint_3d_sw.cpp | 2 +- .../joints/cone_twist_joint_3d_sw.h | 2 +- .../joints/generic_6dof_joint_3d_sw.cpp | 2 +- .../joints/generic_6dof_joint_3d_sw.h | 2 +- .../physics_3d/joints/hinge_joint_3d_sw.cpp | 2 +- servers/physics_3d/joints/hinge_joint_3d_sw.h | 2 +- .../physics_3d/joints/jacobian_entry_3d_sw.h | 2 +- servers/physics_3d/joints/pin_joint_3d_sw.cpp | 2 +- servers/physics_3d/joints/pin_joint_3d_sw.h | 2 +- .../physics_3d/joints/slider_joint_3d_sw.cpp | 2 +- .../physics_3d/joints/slider_joint_3d_sw.h | 2 +- servers/physics_3d/joints_3d_sw.h | 2 +- servers/physics_3d/physics_server_3d_sw.cpp | 2 +- servers/physics_3d/physics_server_3d_sw.h | 2 +- servers/physics_3d/shape_3d_sw.cpp | 2 +- servers/physics_3d/shape_3d_sw.h | 2 +- servers/physics_3d/space_3d_sw.cpp | 2 +- servers/physics_3d/space_3d_sw.h | 2 +- servers/physics_3d/step_3d_sw.cpp | 2 +- servers/physics_3d/step_3d_sw.h | 2 +- servers/physics_server_2d.cpp | 44 +++++++++---------- servers/physics_server_2d.h | 12 ++--- servers/physics_server_3d.cpp | 2 +- servers/physics_server_3d.h | 2 +- servers/register_server_types.cpp | 6 +-- servers/rendering/rendering_server_canvas.cpp | 2 +- servers/rendering/rendering_server_canvas.h | 2 +- .../rendering/rendering_server_globals.cpp | 2 +- servers/rendering/rendering_server_globals.h | 2 +- servers/rendering/rendering_server_raster.cpp | 2 +- servers/rendering/rendering_server_raster.h | 2 +- servers/rendering/rendering_server_scene.cpp | 2 +- servers/rendering/rendering_server_scene.h | 2 +- .../rendering/rendering_server_viewport.cpp | 2 +- servers/rendering/rendering_server_viewport.h | 2 +- .../rendering/rendering_server_wrap_mt.cpp | 2 +- servers/rendering/rendering_server_wrap_mt.h | 2 +- servers/rendering_server.cpp | 2 +- servers/rendering_server.h | 2 +- 77 files changed, 163 insertions(+), 148 deletions(-) rename main/tests/{test_physics.cpp => test_physics_3d.cpp} (97%) rename main/tests/{test_physics.h => test_physics_3d.h} (96%) diff --git a/main/tests/test_main.cpp b/main/tests/test_main.cpp index beb955d045e..a9a671e2f10 100644 --- a/main/tests/test_main.cpp +++ b/main/tests/test_main.cpp @@ -40,8 +40,8 @@ #include "test_math.h" #include "test_oa_hash_map.h" #include "test_ordered_hash_map.h" -#include "test_physics.h" #include "test_physics_2d.h" +#include "test_physics_3d.h" #include "test_render.h" #include "test_shader_lang.h" #include "test_string.h" @@ -51,8 +51,8 @@ const char **tests_get_names() { static const char *test_names[] = { "string", "math", - "physics", "physics_2d", + "physics_3d", "render", "oa_hash_map", "gui", @@ -81,16 +81,16 @@ MainLoop *test_main(String p_test, const List &p_args) { return TestMath::test(); } - if (p_test == "physics") { - - return TestPhysics::test(); - } - if (p_test == "physics_2d") { return TestPhysics2D::test(); } + if (p_test == "physics_3d") { + + return TestPhysics3D::test(); + } + if (p_test == "render") { return TestRender::test(); diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics_3d.cpp similarity index 97% rename from main/tests/test_physics.cpp rename to main/tests/test_physics_3d.cpp index 5e8940f4533..2d208ee3172 100644 --- a/main/tests/test_physics.cpp +++ b/main/tests/test_physics_3d.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* test_physics.cpp */ +/* test_physics_3d.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "test_physics.h" +#include "test_physics_3d.h" #include "core/map.h" #include "core/math/math_funcs.h" @@ -40,9 +40,9 @@ #include "servers/physics_server_3d.h" #include "servers/rendering_server.h" -class TestPhysicsMainLoop : public MainLoop { +class TestPhysics3DMainLoop : public MainLoop { - GDCLASS(TestPhysicsMainLoop, MainLoop); + GDCLASS(TestPhysics3DMainLoop, MainLoop); enum { LINK_COUNT = 20, @@ -81,7 +81,7 @@ class TestPhysicsMainLoop : public MainLoop { protected: static void _bind_methods() { - ClassDB::bind_method("body_changed_transform", &TestPhysicsMainLoop::body_changed_transform); + ClassDB::bind_method("body_changed_transform", &TestPhysics3DMainLoop::body_changed_transform); } RID create_body(PhysicsServer3D::ShapeType p_shape, PhysicsServer3D::BodyMode p_body, const Transform p_location, bool p_active_default = true, const Transform &p_shape_xform = Transform()) { @@ -426,14 +426,14 @@ public: return false; } - TestPhysicsMainLoop() { + TestPhysics3DMainLoop() { } }; -namespace TestPhysics { +namespace TestPhysics3D { MainLoop *test() { - return memnew(TestPhysicsMainLoop); + return memnew(TestPhysics3DMainLoop); } -} // namespace TestPhysics +} // namespace TestPhysics3D diff --git a/main/tests/test_physics.h b/main/tests/test_physics_3d.h similarity index 96% rename from main/tests/test_physics.h rename to main/tests/test_physics_3d.h index fbbc59bba9b..d03f2c6573c 100644 --- a/main/tests/test_physics.h +++ b/main/tests/test_physics_3d.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* test_physics.h */ +/* test_physics_3d.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -33,7 +33,7 @@ #include "core/os/main_loop.h" -namespace TestPhysics { +namespace TestPhysics3D { MainLoop *test(); } diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index fe91e63792b..942d2aac24d 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -360,7 +360,7 @@ struct _RigidBody2DInOut { int local_shape; }; -bool RigidBody2D::_test_motion(const Vector2 &p_motion, bool p_infinite_inertia, float p_margin, const Ref &p_result) { +bool RigidBody2D::_test_motion(const Vector2 &p_motion, bool p_infinite_inertia, float p_margin, const Ref &p_result) { PhysicsServer2D::MotionResult *r = NULL; if (p_result.is_valid()) @@ -898,7 +898,7 @@ void RigidBody2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody2D::get_colliding_bodies); - BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectBodyState"))); + BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState2D"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 5bce5f6be3c..0d92a820e32 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -185,7 +185,7 @@ private: void _body_inout(int p_status, ObjectID p_instance, int p_body_shape, int p_local_shape); void _direct_state_changed(Object *p_state); - bool _test_motion(const Vector2 &p_motion, bool p_infinite_inertia = true, float p_margin = 0.08, const Ref &p_result = Ref()); + bool _test_motion(const Vector2 &p_motion, bool p_infinite_inertia = true, float p_margin = 0.08, const Ref &p_result = Ref()); protected: void _notification(int p_what); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 1094759ce7a..774d943efee 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -789,7 +789,20 @@ void register_scene_types() { ClassDB::add_compatibility_class("Path", "Path3D"); ClassDB::add_compatibility_class("PathFollow", "PathFollow3D"); ClassDB::add_compatibility_class("PhysicalBone", "PhysicalBone3D"); + ClassDB::add_compatibility_class("Physics2DDirectBodyStateSW", "PhysicsDirectBodyState2DSW"); + ClassDB::add_compatibility_class("Physics2DDirectBodyState", "PhysicsDirectBodyState2D"); + ClassDB::add_compatibility_class("Physics2DDirectSpaceState", "PhysicsDirectSpaceState2D"); + ClassDB::add_compatibility_class("Physics2DServerSW", "PhysicsServer2DSW"); + ClassDB::add_compatibility_class("Physics2DServer", "PhysicsServer2D"); + ClassDB::add_compatibility_class("Physics2DShapeQueryParameters", "PhysicsShapeQueryParameters2D"); + ClassDB::add_compatibility_class("Physics2DShapeQueryResult", "PhysicsShapeQueryResult2D"); + ClassDB::add_compatibility_class("Physics2DTestMotionResult", "PhysicsTestMotionResult2D"); ClassDB::add_compatibility_class("PhysicsBody", "PhysicsBody3D"); + ClassDB::add_compatibility_class("PhysicsDirectBodyState", "PhysicsDirectBodyState3D"); + ClassDB::add_compatibility_class("PhysicsDirectSpaceState", "PhysicsDirectSpaceState3D"); + ClassDB::add_compatibility_class("PhysicsServer", "PhysicsServer3D"); + ClassDB::add_compatibility_class("PhysicsShapeQueryParameters", "PhysicsShapeQueryParameters3D"); + ClassDB::add_compatibility_class("PhysicsShapeQueryResult", "PhysicsShapeQueryResult3D"); ClassDB::add_compatibility_class("PinJoint", "PinJoint3D"); ClassDB::add_compatibility_class("PlaneShape", "WorldMarginShape3D"); ClassDB::add_compatibility_class("ProximityGroup", "ProximityGroup3D"); @@ -814,6 +827,7 @@ void register_scene_types() { ClassDB::add_compatibility_class("VehicleWheel", "VehicleWheel3D"); ClassDB::add_compatibility_class("VisibilityEnabler", "VisibilityEnabler3D"); ClassDB::add_compatibility_class("VisibilityNotifier", "VisibilityNotifier3D"); + ClassDB::add_compatibility_class("VisualServer", "RenderingServer"); ClassDB::add_compatibility_class("VisualShaderNodeScalarConstant", "VisualShaderNodeFloatConstant"); ClassDB::add_compatibility_class("VisualShaderNodeScalarFunc", "VisualShaderNodeFloatFunc"); ClassDB::add_compatibility_class("VisualShaderNodeScalarOp", "VisualShaderNodeFloatOp"); diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp index ef8067497f2..742ef106d9c 100644 --- a/scene/resources/world_2d.cpp +++ b/scene/resources/world_2d.cpp @@ -376,7 +376,7 @@ void World2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::_RID, "canvas", PROPERTY_HINT_NONE, "", 0), "", "get_canvas"); ADD_PROPERTY(PropertyInfo(Variant::_RID, "space", PROPERTY_HINT_NONE, "", 0), "", "get_space"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectSpaceState", 0), "", "get_direct_space_state"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectSpaceState2D", 0), "", "get_direct_space_state"); } PhysicsDirectSpaceState2D *World2D::get_direct_space_state() { diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index b64ad0e5ab7..fe9eaa57368 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* navigation_2d_server.cpp */ +/* navigation_server_2d.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index 272d07667d4..af914e5ba98 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* navigation_2d_server.h */ +/* navigation_server_2d.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 3cfc47b1e58..3e7a8e816ec 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* navigation_server.cpp */ +/* navigation_server_3d.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/navigation_server_3d.h b/servers/navigation_server_3d.h index 2e9d078f730..c34bd2391b4 100644 --- a/servers/navigation_server_3d.h +++ b/servers/navigation_server_3d.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* navigation_server.h */ +/* navigation_server_3d.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index 79388ffe93a..11cf1339bc6 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -601,7 +601,7 @@ void Body2DSW::call_queries() { if (fi_callback) { - Physics2DDirectBodyStateSW *dbs = Physics2DDirectBodyStateSW::singleton; + PhysicsDirectBodyState2DSW *dbs = PhysicsDirectBodyState2DSW::singleton; dbs->body = this; Variant v = dbs; @@ -706,14 +706,14 @@ Body2DSW::~Body2DSW() { memdelete(fi_callback); } -Physics2DDirectBodyStateSW *Physics2DDirectBodyStateSW::singleton = NULL; +PhysicsDirectBodyState2DSW *PhysicsDirectBodyState2DSW::singleton = NULL; -PhysicsDirectSpaceState2D *Physics2DDirectBodyStateSW::get_space_state() { +PhysicsDirectSpaceState2D *PhysicsDirectBodyState2DSW::get_space_state() { return body->get_space()->get_direct_state(); } -Variant Physics2DDirectBodyStateSW::get_contact_collider_shape_metadata(int p_contact_idx) const { +Variant PhysicsDirectBodyState2DSW::get_contact_collider_shape_metadata(int p_contact_idx) const { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Variant()); diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h index 4a83cf95001..e463377c7b6 100644 --- a/servers/physics_2d/body_2d_sw.h +++ b/servers/physics_2d/body_2d_sw.h @@ -132,7 +132,7 @@ class Body2DSW : public CollisionObject2DSW { _FORCE_INLINE_ void _compute_area_gravity_and_dampenings(const Area2DSW *p_area); - friend class Physics2DDirectBodyStateSW; // i give up, too many functions to expose + friend class PhysicsDirectBodyState2DSW; // i give up, too many functions to expose public: void set_force_integration_callback(ObjectID p_id, const StringName &p_method, const Variant &p_udata = Variant()); @@ -341,12 +341,12 @@ void Body2DSW::add_contact(const Vector2 &p_local_pos, const Vector2 &p_local_no c[idx].collider_velocity_at_pos = p_collider_velocity_at_pos; } -class Physics2DDirectBodyStateSW : public PhysicsDirectBodyState2D { +class PhysicsDirectBodyState2DSW : public PhysicsDirectBodyState2D { - GDCLASS(Physics2DDirectBodyStateSW, PhysicsDirectBodyState2D); + GDCLASS(PhysicsDirectBodyState2DSW, PhysicsDirectBodyState2D); public: - static Physics2DDirectBodyStateSW *singleton; + static PhysicsDirectBodyState2DSW *singleton; Body2DSW *body; real_t step; @@ -417,7 +417,7 @@ public: virtual PhysicsDirectSpaceState2D *get_space_state(); virtual real_t get_step() const { return step; } - Physics2DDirectBodyStateSW() { + PhysicsDirectBodyState2DSW() { singleton = this; body = NULL; } diff --git a/servers/physics_2d/physics_server_2d_sw.cpp b/servers/physics_2d/physics_server_2d_sw.cpp index cd1f14b69da..e2a482e9608 100644 --- a/servers/physics_2d/physics_server_2d_sw.cpp +++ b/servers/physics_2d/physics_server_2d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_2d_server_sw.cpp */ +/* physics_server_2d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -29,6 +29,7 @@ /*************************************************************************/ #include "physics_server_2d_sw.h" + #include "broad_phase_2d_basic.h" #include "broad_phase_2d_hash_grid.h" #include "collision_solver_2d_sw.h" @@ -1321,7 +1322,7 @@ void PhysicsServer2DSW::init() { last_step = 0.001; iterations = 8; // 8? stepper = memnew(Step2DSW); - direct_state = memnew(Physics2DDirectBodyStateSW); + direct_state = memnew(PhysicsDirectBodyState2DSW); }; void PhysicsServer2DSW::step(real_t p_step) { @@ -1334,7 +1335,7 @@ void PhysicsServer2DSW::step(real_t p_step) { doing_sync = false; last_step = p_step; - Physics2DDirectBodyStateSW::singleton->step = p_step; + PhysicsDirectBodyState2DSW::singleton->step = p_step; island_count = 0; active_objects = 0; collision_pairs = 0; diff --git a/servers/physics_2d/physics_server_2d_sw.h b/servers/physics_2d/physics_server_2d_sw.h index 196b9a50b96..9dfa8bf474b 100644 --- a/servers/physics_2d/physics_server_2d_sw.h +++ b/servers/physics_2d/physics_server_2d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_2d_server_sw.h */ +/* physics_server_2d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -42,8 +42,8 @@ class PhysicsServer2DSW : public PhysicsServer2D { GDCLASS(PhysicsServer2DSW, PhysicsServer2D); - friend class Physics2DDirectSpaceStateSW; - friend class Physics2DDirectBodyStateSW; + friend class PhysicsDirectSpaceState2DSW; + friend class PhysicsDirectBodyState2DSW; bool active; int iterations; bool doing_sync; @@ -60,7 +60,7 @@ class PhysicsServer2DSW : public PhysicsServer2D { Step2DSW *stepper; Set active_spaces; - Physics2DDirectBodyStateSW *direct_state; + PhysicsDirectBodyState2DSW *direct_state; mutable RID_PtrOwner shape_owner; mutable RID_PtrOwner space_owner; diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.cpp b/servers/physics_2d/physics_server_2d_wrap_mt.cpp index c0f49aa4d12..5f65e296fd4 100644 --- a/servers/physics_2d/physics_server_2d_wrap_mt.cpp +++ b/servers/physics_2d/physics_server_2d_wrap_mt.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_2d_server_wrap_mt.cpp */ +/* physics_server_2d_wrap_mt.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.h b/servers/physics_2d/physics_server_2d_wrap_mt.h index 8196ede069e..ffd46feebd0 100644 --- a/servers/physics_2d/physics_server_2d_wrap_mt.h +++ b/servers/physics_2d/physics_server_2d_wrap_mt.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_2d_server_wrap_mt.h */ +/* physics_server_2d_wrap_mt.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 72f3e8d1b41..cba190995fe 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -49,7 +49,7 @@ _FORCE_INLINE_ static bool _can_collide_with(CollisionObject2DSW *p_object, uint return true; } -int Physics2DDirectSpaceStateSW::_intersect_point_impl(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point, bool p_filter_by_canvas, ObjectID p_canvas_instance_id) { +int PhysicsDirectSpaceState2DSW::_intersect_point_impl(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point, bool p_filter_by_canvas, ObjectID p_canvas_instance_id) { if (p_result_max <= 0) return 0; @@ -103,17 +103,17 @@ int Physics2DDirectSpaceStateSW::_intersect_point_impl(const Vector2 &p_point, S return cc; } -int Physics2DDirectSpaceStateSW::intersect_point(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point) { +int PhysicsDirectSpaceState2DSW::intersect_point(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point) { return _intersect_point_impl(p_point, r_results, p_result_max, p_exclude, p_collision_mask, p_collide_with_bodies, p_collide_with_areas, p_pick_point); } -int Physics2DDirectSpaceStateSW::intersect_point_on_canvas(const Vector2 &p_point, ObjectID p_canvas_instance_id, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point) { +int PhysicsDirectSpaceState2DSW::intersect_point_on_canvas(const Vector2 &p_point, ObjectID p_canvas_instance_id, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point) { return _intersect_point_impl(p_point, r_results, p_result_max, p_exclude, p_collision_mask, p_collide_with_bodies, p_collide_with_areas, p_pick_point, true, p_canvas_instance_id); } -bool Physics2DDirectSpaceStateSW::intersect_ray(const Vector2 &p_from, const Vector2 &p_to, RayResult &r_result, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { +bool PhysicsDirectSpaceState2DSW::intersect_ray(const Vector2 &p_from, const Vector2 &p_to, RayResult &r_result, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { ERR_FAIL_COND_V(space->locked, false); @@ -193,7 +193,7 @@ bool Physics2DDirectSpaceStateSW::intersect_ray(const Vector2 &p_from, const Vec return true; } -int Physics2DDirectSpaceStateSW::intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { +int PhysicsDirectSpaceState2DSW::intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { if (p_result_max <= 0) return 0; @@ -238,7 +238,7 @@ int Physics2DDirectSpaceStateSW::intersect_shape(const RID &p_shape, const Trans return cc; } -bool Physics2DDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { +bool PhysicsDirectSpaceState2DSW::cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.getornull(p_shape); ERR_FAIL_COND_V(!shape, false); @@ -308,7 +308,7 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transfor return true; } -bool Physics2DDirectSpaceStateSW::collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { +bool PhysicsDirectSpaceState2DSW::collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { if (p_result_max <= 0) return 0; @@ -402,7 +402,7 @@ static void _rest_cbk_result(const Vector2 &p_point_A, const Vector2 &p_point_B, rd->best_local_shape = rd->local_shape; } -bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { +bool PhysicsDirectSpaceState2DSW::rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) { Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.getornull(p_shape); ERR_FAIL_COND_V(!shape, 0); @@ -462,7 +462,7 @@ bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Transform2D &p_sh return true; } -Physics2DDirectSpaceStateSW::Physics2DDirectSpaceStateSW() { +PhysicsDirectSpaceState2DSW::PhysicsDirectSpaceState2DSW() { space = NULL; } @@ -802,7 +802,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co //fix for moving platforms (kinematic and dynamic), margin is increased by how much it moved in the given direction Vector2 lv = b->get_linear_velocity(); //compute displacement from linear velocity - Vector2 motion = lv * Physics2DDirectBodyStateSW::singleton->step; + Vector2 motion = lv * PhysicsDirectBodyState2DSW::singleton->step; float motion_len = motion.length(); motion.normalize(); cbk.valid_depth += motion_len * MAX(motion.dot(-cbk.valid_dir), 0.0); @@ -1323,7 +1323,7 @@ bool Space2DSW::is_locked() const { return locked; } -Physics2DDirectSpaceStateSW *Space2DSW::get_direct_state() { +PhysicsDirectSpaceState2DSW *Space2DSW::get_direct_state() { return direct_access; } @@ -1353,7 +1353,7 @@ Space2DSW::Space2DSW() { broadphase->set_unpair_callback(_broadphase_unpair, this); area = NULL; - direct_access = memnew(Physics2DDirectSpaceStateSW); + direct_access = memnew(PhysicsDirectSpaceState2DSW); direct_access->space = this; for (int i = 0; i < ELAPSED_TIME_MAX; i++) diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h index f4971635b94..c6b324c928e 100644 --- a/servers/physics_2d/space_2d_sw.h +++ b/servers/physics_2d/space_2d_sw.h @@ -41,9 +41,9 @@ #include "core/project_settings.h" #include "core/typedefs.h" -class Physics2DDirectSpaceStateSW : public PhysicsDirectSpaceState2D { +class PhysicsDirectSpaceState2DSW : public PhysicsDirectSpaceState2D { - GDCLASS(Physics2DDirectSpaceStateSW, PhysicsDirectSpaceState2D); + GDCLASS(PhysicsDirectSpaceState2DSW, PhysicsDirectSpaceState2D); int _intersect_point_impl(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point, bool p_filter_by_canvas = false, ObjectID p_canvas_instance_id = ObjectID()); @@ -58,7 +58,7 @@ public: virtual bool collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set &p_exclude = Set(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false); virtual bool rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set &p_exclude = Set(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false); - Physics2DDirectSpaceStateSW(); + PhysicsDirectSpaceState2DSW(); }; class Space2DSW { @@ -83,7 +83,7 @@ private: uint64_t elapsed_time[ELAPSED_TIME_MAX]; - Physics2DDirectSpaceStateSW *direct_access; + PhysicsDirectSpaceState2DSW *direct_access; RID self; BroadPhase2DSW *broadphase; @@ -129,7 +129,7 @@ private: Vector contact_debug; int contact_debug_count; - friend class Physics2DDirectSpaceStateSW; + friend class PhysicsDirectSpaceState2DSW; public: _FORCE_INLINE_ void set_self(const RID &p_self) { self = p_self; } @@ -197,7 +197,7 @@ public: _FORCE_INLINE_ Vector get_debug_contacts() { return contact_debug; } _FORCE_INLINE_ int get_debug_contact_count() { return contact_debug_count; } - Physics2DDirectSpaceStateSW *get_direct_state(); + PhysicsDirectSpaceState2DSW *get_direct_state(); void set_elapsed_time(ElapsedTime p_time, uint64_t p_msec) { elapsed_time[p_time] = p_msec; } uint64_t get_elapsed_time(ElapsedTime p_time) const { return elapsed_time[p_time]; } diff --git a/servers/physics_3d/area_3d_sw.cpp b/servers/physics_3d/area_3d_sw.cpp index 99d4d2ec1b2..911a664a10d 100644 --- a/servers/physics_3d/area_3d_sw.cpp +++ b/servers/physics_3d/area_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* area_sw.cpp */ +/* area_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/area_3d_sw.h b/servers/physics_3d/area_3d_sw.h index bc57790206c..05e74e63dcb 100644 --- a/servers/physics_3d/area_3d_sw.h +++ b/servers/physics_3d/area_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* area_sw.h */ +/* area_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/area_pair_3d_sw.cpp b/servers/physics_3d/area_pair_3d_sw.cpp index 3300e9dedeb..e92a3a0dd13 100644 --- a/servers/physics_3d/area_pair_3d_sw.cpp +++ b/servers/physics_3d/area_pair_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* area_pair_sw.cpp */ +/* area_pair_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/area_pair_3d_sw.h b/servers/physics_3d/area_pair_3d_sw.h index 6f7e1ee3b5f..3490f41c268 100644 --- a/servers/physics_3d/area_pair_3d_sw.h +++ b/servers/physics_3d/area_pair_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* area_pair_sw.h */ +/* area_pair_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/body_3d_sw.cpp b/servers/physics_3d/body_3d_sw.cpp index dcdc373dc93..6a00e4f4712 100644 --- a/servers/physics_3d/body_3d_sw.cpp +++ b/servers/physics_3d/body_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* body_sw.cpp */ +/* body_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/body_3d_sw.h b/servers/physics_3d/body_3d_sw.h index 7020805af07..368dd59b068 100644 --- a/servers/physics_3d/body_3d_sw.h +++ b/servers/physics_3d/body_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* body_sw.h */ +/* body_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/body_pair_3d_sw.cpp b/servers/physics_3d/body_pair_3d_sw.cpp index 9c3c847afe3..245fb3449c0 100644 --- a/servers/physics_3d/body_pair_3d_sw.cpp +++ b/servers/physics_3d/body_pair_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* body_pair_sw.cpp */ +/* body_pair_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/body_pair_3d_sw.h b/servers/physics_3d/body_pair_3d_sw.h index 61c219657c6..7f4afb9dca1 100644 --- a/servers/physics_3d/body_pair_3d_sw.h +++ b/servers/physics_3d/body_pair_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* body_pair_sw.h */ +/* body_pair_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/broad_phase_3d_basic.cpp b/servers/physics_3d/broad_phase_3d_basic.cpp index bc0af98e4ad..bea87a45ca0 100644 --- a/servers/physics_3d/broad_phase_3d_basic.cpp +++ b/servers/physics_3d/broad_phase_3d_basic.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* broad_phase_basic.cpp */ +/* broad_phase_3d_basic.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/broad_phase_3d_basic.h b/servers/physics_3d/broad_phase_3d_basic.h index 00263dad0a4..9b20b7619ac 100644 --- a/servers/physics_3d/broad_phase_3d_basic.h +++ b/servers/physics_3d/broad_phase_3d_basic.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* broad_phase_basic.h */ +/* broad_phase_3d_basic.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/broad_phase_3d_sw.cpp b/servers/physics_3d/broad_phase_3d_sw.cpp index b15b08ddfe0..5e367a77365 100644 --- a/servers/physics_3d/broad_phase_3d_sw.cpp +++ b/servers/physics_3d/broad_phase_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* broad_phase_sw.cpp */ +/* broad_phase_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/broad_phase_3d_sw.h b/servers/physics_3d/broad_phase_3d_sw.h index dd6984cbca8..47d09a8b1d5 100644 --- a/servers/physics_3d/broad_phase_3d_sw.h +++ b/servers/physics_3d/broad_phase_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* broad_phase_sw.h */ +/* broad_phase_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/collision_object_3d_sw.cpp b/servers/physics_3d/collision_object_3d_sw.cpp index 34e1c0f736a..ba13d70e4f9 100644 --- a/servers/physics_3d/collision_object_3d_sw.cpp +++ b/servers/physics_3d/collision_object_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* collision_object_sw.cpp */ +/* collision_object_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/collision_object_3d_sw.h b/servers/physics_3d/collision_object_3d_sw.h index 582d447189e..c5773d0c612 100644 --- a/servers/physics_3d/collision_object_3d_sw.h +++ b/servers/physics_3d/collision_object_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* collision_object_sw.h */ +/* collision_object_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/collision_solver_3d_sat.cpp b/servers/physics_3d/collision_solver_3d_sat.cpp index ae205ceb48b..0a7a9caf912 100644 --- a/servers/physics_3d/collision_solver_3d_sat.cpp +++ b/servers/physics_3d/collision_solver_3d_sat.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* collision_solver_sat.cpp */ +/* collision_solver_3d_sat.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/collision_solver_3d_sat.h b/servers/physics_3d/collision_solver_3d_sat.h index ed564395ab3..c8ffd8e6605 100644 --- a/servers/physics_3d/collision_solver_3d_sat.h +++ b/servers/physics_3d/collision_solver_3d_sat.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* collision_solver_sat.h */ +/* collision_solver_3d_sat.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/collision_solver_3d_sw.cpp b/servers/physics_3d/collision_solver_3d_sw.cpp index 34ea836cd08..26de49c96fe 100644 --- a/servers/physics_3d/collision_solver_3d_sw.cpp +++ b/servers/physics_3d/collision_solver_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* collision_solver_sw.cpp */ +/* collision_solver_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/collision_solver_3d_sw.h b/servers/physics_3d/collision_solver_3d_sw.h index 5f60d94e7f9..ec76a4217ea 100644 --- a/servers/physics_3d/collision_solver_3d_sw.h +++ b/servers/physics_3d/collision_solver_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* collision_solver_sw.h */ +/* collision_solver_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/constraint_3d_sw.h b/servers/physics_3d/constraint_3d_sw.h index 23bc5d3b322..b9d3ac4f12f 100644 --- a/servers/physics_3d/constraint_3d_sw.h +++ b/servers/physics_3d/constraint_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* constraint_sw.h */ +/* constraint_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp b/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp index 782e8322fe5..a072c1f3a00 100644 --- a/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp +++ b/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* cone_twist_joint_sw.cpp */ +/* cone_twist_joint_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/cone_twist_joint_3d_sw.h b/servers/physics_3d/joints/cone_twist_joint_3d_sw.h index 5521419e895..c713d8cf175 100644 --- a/servers/physics_3d/joints/cone_twist_joint_3d_sw.h +++ b/servers/physics_3d/joints/cone_twist_joint_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* cone_twist_joint_sw.h */ +/* cone_twist_joint_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp index d28fafdb003..1f433ec6a54 100644 --- a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp +++ b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* generic_6dof_joint_sw.cpp */ +/* generic_6dof_joint_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h index ba6e6ffb014..f7aa6079018 100644 --- a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h +++ b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* generic_6dof_joint_sw.h */ +/* generic_6dof_joint_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/hinge_joint_3d_sw.cpp b/servers/physics_3d/joints/hinge_joint_3d_sw.cpp index 57605aac7ba..e76d3664222 100644 --- a/servers/physics_3d/joints/hinge_joint_3d_sw.cpp +++ b/servers/physics_3d/joints/hinge_joint_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* hinge_joint_sw.cpp */ +/* hinge_joint_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/hinge_joint_3d_sw.h b/servers/physics_3d/joints/hinge_joint_3d_sw.h index 8da32885bcf..eebead20b87 100644 --- a/servers/physics_3d/joints/hinge_joint_3d_sw.h +++ b/servers/physics_3d/joints/hinge_joint_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* hinge_joint_sw.h */ +/* hinge_joint_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/jacobian_entry_3d_sw.h b/servers/physics_3d/joints/jacobian_entry_3d_sw.h index e298d40d8df..7e605ab1730 100644 --- a/servers/physics_3d/joints/jacobian_entry_3d_sw.h +++ b/servers/physics_3d/joints/jacobian_entry_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* jacobian_entry_sw.h */ +/* jacobian_entry_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/pin_joint_3d_sw.cpp b/servers/physics_3d/joints/pin_joint_3d_sw.cpp index 67f2d78d54d..95c01bc4635 100644 --- a/servers/physics_3d/joints/pin_joint_3d_sw.cpp +++ b/servers/physics_3d/joints/pin_joint_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* pin_joint_sw.cpp */ +/* pin_joint_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/pin_joint_3d_sw.h b/servers/physics_3d/joints/pin_joint_3d_sw.h index 25876327a38..8e81ccf5e0b 100644 --- a/servers/physics_3d/joints/pin_joint_3d_sw.h +++ b/servers/physics_3d/joints/pin_joint_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* pin_joint_sw.h */ +/* pin_joint_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/slider_joint_3d_sw.cpp b/servers/physics_3d/joints/slider_joint_3d_sw.cpp index 01336e2d7cf..066c30e0f35 100644 --- a/servers/physics_3d/joints/slider_joint_3d_sw.cpp +++ b/servers/physics_3d/joints/slider_joint_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* slider_joint_sw.cpp */ +/* slider_joint_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints/slider_joint_3d_sw.h b/servers/physics_3d/joints/slider_joint_3d_sw.h index a70ba2597d4..18287db9c25 100644 --- a/servers/physics_3d/joints/slider_joint_3d_sw.h +++ b/servers/physics_3d/joints/slider_joint_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* slider_joint_sw.h */ +/* slider_joint_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/joints_3d_sw.h b/servers/physics_3d/joints_3d_sw.h index 097aeb22b94..435ee2301db 100644 --- a/servers/physics_3d/joints_3d_sw.h +++ b/servers/physics_3d/joints_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joints_sw.h */ +/* joints_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/physics_server_3d_sw.cpp b/servers/physics_3d/physics_server_3d_sw.cpp index 27fcedc45f3..da846300883 100644 --- a/servers/physics_3d/physics_server_3d_sw.cpp +++ b/servers/physics_3d/physics_server_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_server_sw.cpp */ +/* physics_server_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/physics_server_3d_sw.h b/servers/physics_3d/physics_server_3d_sw.h index 7f0cd0ba9fc..67123084c10 100644 --- a/servers/physics_3d/physics_server_3d_sw.h +++ b/servers/physics_3d/physics_server_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_server_sw.h */ +/* physics_server_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/shape_3d_sw.cpp b/servers/physics_3d/shape_3d_sw.cpp index 53b162636e2..52253d615aa 100644 --- a/servers/physics_3d/shape_3d_sw.cpp +++ b/servers/physics_3d/shape_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* shape_sw.cpp */ +/* shape_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/shape_3d_sw.h b/servers/physics_3d/shape_3d_sw.h index f10bd0771b3..dd29ec849be 100644 --- a/servers/physics_3d/shape_3d_sw.h +++ b/servers/physics_3d/shape_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* shape_sw.h */ +/* shape_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/space_3d_sw.cpp b/servers/physics_3d/space_3d_sw.cpp index e7b2c7bfd72..9bd507e1785 100644 --- a/servers/physics_3d/space_3d_sw.cpp +++ b/servers/physics_3d/space_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* space_sw.cpp */ +/* space_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/space_3d_sw.h b/servers/physics_3d/space_3d_sw.h index c32af5c5d4c..fb4fb6aa1f9 100644 --- a/servers/physics_3d/space_3d_sw.h +++ b/servers/physics_3d/space_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* space_sw.h */ +/* space_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/step_3d_sw.cpp b/servers/physics_3d/step_3d_sw.cpp index ef9015a61c4..dda88b45c6e 100644 --- a/servers/physics_3d/step_3d_sw.cpp +++ b/servers/physics_3d/step_3d_sw.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* step_sw.cpp */ +/* step_3d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_3d/step_3d_sw.h b/servers/physics_3d/step_3d_sw.h index dcd67fa1226..c735688a9ea 100644 --- a/servers/physics_3d/step_3d_sw.h +++ b/servers/physics_3d/step_3d_sw.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* step_sw.h */ +/* step_3d_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index d80a51ca360..11fa2acc1ab 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_2d_server.cpp */ +/* physics_server_2d.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -458,56 +458,56 @@ void PhysicsShapeQueryResult2D::_bind_methods() { /////////////////////////////// -Vector2 Physics2DTestMotionResult::get_motion() const { +Vector2 PhysicsTestMotionResult2D::get_motion() const { return result.motion; } -Vector2 Physics2DTestMotionResult::get_motion_remainder() const { +Vector2 PhysicsTestMotionResult2D::get_motion_remainder() const { return result.remainder; } -Vector2 Physics2DTestMotionResult::get_collision_point() const { +Vector2 PhysicsTestMotionResult2D::get_collision_point() const { return result.collision_point; } -Vector2 Physics2DTestMotionResult::get_collision_normal() const { +Vector2 PhysicsTestMotionResult2D::get_collision_normal() const { return result.collision_normal; } -Vector2 Physics2DTestMotionResult::get_collider_velocity() const { +Vector2 PhysicsTestMotionResult2D::get_collider_velocity() const { return result.collider_velocity; } -ObjectID Physics2DTestMotionResult::get_collider_id() const { +ObjectID PhysicsTestMotionResult2D::get_collider_id() const { return result.collider_id; } -RID Physics2DTestMotionResult::get_collider_rid() const { +RID PhysicsTestMotionResult2D::get_collider_rid() const { return result.collider; } -Object *Physics2DTestMotionResult::get_collider() const { +Object *PhysicsTestMotionResult2D::get_collider() const { return ObjectDB::get_instance(result.collider_id); } -int Physics2DTestMotionResult::get_collider_shape() const { +int PhysicsTestMotionResult2D::get_collider_shape() const { return result.collider_shape; } -void Physics2DTestMotionResult::_bind_methods() { +void PhysicsTestMotionResult2D::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_motion"), &Physics2DTestMotionResult::get_motion); - ClassDB::bind_method(D_METHOD("get_motion_remainder"), &Physics2DTestMotionResult::get_motion_remainder); - ClassDB::bind_method(D_METHOD("get_collision_point"), &Physics2DTestMotionResult::get_collision_point); - ClassDB::bind_method(D_METHOD("get_collision_normal"), &Physics2DTestMotionResult::get_collision_normal); - ClassDB::bind_method(D_METHOD("get_collider_velocity"), &Physics2DTestMotionResult::get_collider_velocity); - ClassDB::bind_method(D_METHOD("get_collider_id"), &Physics2DTestMotionResult::get_collider_id); - ClassDB::bind_method(D_METHOD("get_collider_rid"), &Physics2DTestMotionResult::get_collider_rid); - ClassDB::bind_method(D_METHOD("get_collider"), &Physics2DTestMotionResult::get_collider); - ClassDB::bind_method(D_METHOD("get_collider_shape"), &Physics2DTestMotionResult::get_collider_shape); + ClassDB::bind_method(D_METHOD("get_motion"), &PhysicsTestMotionResult2D::get_motion); + ClassDB::bind_method(D_METHOD("get_motion_remainder"), &PhysicsTestMotionResult2D::get_motion_remainder); + ClassDB::bind_method(D_METHOD("get_collision_point"), &PhysicsTestMotionResult2D::get_collision_point); + ClassDB::bind_method(D_METHOD("get_collision_normal"), &PhysicsTestMotionResult2D::get_collision_normal); + ClassDB::bind_method(D_METHOD("get_collider_velocity"), &PhysicsTestMotionResult2D::get_collider_velocity); + ClassDB::bind_method(D_METHOD("get_collider_id"), &PhysicsTestMotionResult2D::get_collider_id); + ClassDB::bind_method(D_METHOD("get_collider_rid"), &PhysicsTestMotionResult2D::get_collider_rid); + ClassDB::bind_method(D_METHOD("get_collider"), &PhysicsTestMotionResult2D::get_collider); + ClassDB::bind_method(D_METHOD("get_collider_shape"), &PhysicsTestMotionResult2D::get_collider_shape); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion"), "", "get_motion"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion_remainder"), "", "get_motion_remainder"); @@ -520,7 +520,7 @@ void Physics2DTestMotionResult::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape"), "", "get_collider_shape"); } -Physics2DTestMotionResult::Physics2DTestMotionResult() { +PhysicsTestMotionResult2D::PhysicsTestMotionResult2D() { colliding = false; @@ -529,7 +529,7 @@ Physics2DTestMotionResult::Physics2DTestMotionResult() { /////////////////////////////////////// -bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin, const Ref &p_result) { +bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin, const Ref &p_result) { MotionResult *r = NULL; if (p_result.is_valid()) diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h index 9fa3a7b71a3..632371565ca 100644 --- a/servers/physics_server_2d.h +++ b/servers/physics_server_2d.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_2d_server.h */ +/* physics_server_2d.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -227,7 +227,7 @@ public: PhysicsShapeQueryResult2D(); }; -class Physics2DTestMotionResult; +class PhysicsTestMotionResult2D; class PhysicsServer2D : public Object { @@ -235,7 +235,7 @@ class PhysicsServer2D : public Object { static PhysicsServer2D *singleton; - virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin = 0.08, const Ref &p_result = Ref()); + virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin = 0.08, const Ref &p_result = Ref()); protected: static void _bind_methods(); @@ -606,9 +606,9 @@ public: ~PhysicsServer2D(); }; -class Physics2DTestMotionResult : public Reference { +class PhysicsTestMotionResult2D : public Reference { - GDCLASS(Physics2DTestMotionResult, Reference); + GDCLASS(PhysicsTestMotionResult2D, Reference); PhysicsServer2D::MotionResult result; bool colliding; @@ -632,7 +632,7 @@ public: Object *get_collider() const; int get_collider_shape() const; - Physics2DTestMotionResult(); + PhysicsTestMotionResult2D(); }; typedef PhysicsServer2D *(*CreatePhysicsServer2DCallback)(); diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index ddc96d2722e..0ee471231b8 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_server.cpp */ +/* physics_server_3d.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index 9bb7bfe3f42..ddef8a9b209 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* physics_server.h */ +/* physics_server_3d.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index fa2a5f23dd1..c53ffcc7b57 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -70,7 +70,7 @@ ShaderTypes *shader_types = NULL; -PhysicsServer3D *_createGodotPhysicsCallback() { +PhysicsServer3D *_createGodotPhysics3DCallback() { return memnew(PhysicsServer3DSW); } @@ -162,7 +162,7 @@ void register_server_types() { ClassDB::register_virtual_class(); ClassDB::register_virtual_class(); ClassDB::register_virtual_class(); - ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); @@ -181,7 +181,7 @@ void register_server_types() { GLOBAL_DEF(PhysicsServer3DManager::setting_property_name, "DEFAULT"); ProjectSettings::get_singleton()->set_custom_property_info(PhysicsServer3DManager::setting_property_name, PropertyInfo(Variant::STRING, PhysicsServer3DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT")); - PhysicsServer3DManager::register_server("GodotPhysics", &_createGodotPhysicsCallback); + PhysicsServer3DManager::register_server("GodotPhysics", &_createGodotPhysics3DCallback); PhysicsServer3DManager::set_default_server("GodotPhysics"); } diff --git a/servers/rendering/rendering_server_canvas.cpp b/servers/rendering/rendering_server_canvas.cpp index 7b28c586b9c..261bd4c2752 100644 --- a/servers/rendering/rendering_server_canvas.cpp +++ b/servers/rendering/rendering_server_canvas.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_canvas.cpp */ +/* rendering_server_canvas.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_canvas.h b/servers/rendering/rendering_server_canvas.h index 579bcd36e79..c79b74f287d 100644 --- a/servers/rendering/rendering_server_canvas.h +++ b/servers/rendering/rendering_server_canvas.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_canvas.h */ +/* rendering_server_canvas.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_globals.cpp b/servers/rendering/rendering_server_globals.cpp index 60183956e08..251cf64184d 100644 --- a/servers/rendering/rendering_server_globals.cpp +++ b/servers/rendering/rendering_server_globals.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_globals.cpp */ +/* rendering_server_globals.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_globals.h b/servers/rendering/rendering_server_globals.h index 79abc55fea0..b33f328b694 100644 --- a/servers/rendering/rendering_server_globals.h +++ b/servers/rendering/rendering_server_globals.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_globals.h */ +/* rendering_server_globals.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_raster.cpp b/servers/rendering/rendering_server_raster.cpp index 9b769b46fcb..7cc06527e44 100644 --- a/servers/rendering/rendering_server_raster.cpp +++ b/servers/rendering/rendering_server_raster.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_raster.cpp */ +/* rendering_server_raster.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_raster.h b/servers/rendering/rendering_server_raster.h index 24fbe4577ac..d69968868e7 100644 --- a/servers/rendering/rendering_server_raster.h +++ b/servers/rendering/rendering_server_raster.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_raster.h */ +/* rendering_server_raster.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_scene.cpp b/servers/rendering/rendering_server_scene.cpp index 0530846e954..04e4b8daceb 100644 --- a/servers/rendering/rendering_server_scene.cpp +++ b/servers/rendering/rendering_server_scene.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_scene.cpp */ +/* rendering_server_scene.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_scene.h b/servers/rendering/rendering_server_scene.h index 6012a756605..9e09136216a 100644 --- a/servers/rendering/rendering_server_scene.h +++ b/servers/rendering/rendering_server_scene.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_scene.h */ +/* rendering_server_scene.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_viewport.cpp b/servers/rendering/rendering_server_viewport.cpp index 24b2379d977..f80b9147609 100644 --- a/servers/rendering/rendering_server_viewport.cpp +++ b/servers/rendering/rendering_server_viewport.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_viewport.cpp */ +/* rendering_server_viewport.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_viewport.h b/servers/rendering/rendering_server_viewport.h index 4ae7a7f5369..f574c58d96f 100644 --- a/servers/rendering/rendering_server_viewport.h +++ b/servers/rendering/rendering_server_viewport.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_viewport.h */ +/* rendering_server_viewport.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_wrap_mt.cpp b/servers/rendering/rendering_server_wrap_mt.cpp index d1bb7b67c62..5d6d5239017 100644 --- a/servers/rendering/rendering_server_wrap_mt.cpp +++ b/servers/rendering/rendering_server_wrap_mt.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_wrap_mt.cpp */ +/* rendering_server_wrap_mt.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering/rendering_server_wrap_mt.h b/servers/rendering/rendering_server_wrap_mt.h index 4d449ea9130..ee4065094b7 100644 --- a/servers/rendering/rendering_server_wrap_mt.h +++ b/servers/rendering/rendering_server_wrap_mt.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server_wrap_mt.h */ +/* rendering_server_wrap_mt.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 0c5b9a258f0..084b8f7952f 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server.cpp */ +/* rendering_server.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 92820aca219..76f16bd7f6b 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* rendering_server.h */ +/* rendering_server.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */