From 9d87236662995928a1c267860307e15a529fe350 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Sun, 15 Oct 2023 14:58:12 -0400 Subject: [PATCH] Moved physics and application outside of core --- Editor/Editor.cpp | 6 +++--- Editor/src/EditorApplication.h | 2 +- Editor/src/EditorLayer.h | 2 +- Editor/src/Misc/GizmoDrawer.h | 2 +- Editor/src/Windows/EditorInterface.cpp | 2 +- Nuake/Engine.cpp | 2 +- Nuake/src/{Core => Application}/Application.cpp | 0 Nuake/src/{Core => Application}/Application.h | 2 +- Nuake/src/{Core => Application}/EntryPoint.h | 0 Nuake/src/{Core => Application}/IApplicationModule.h | 0 Nuake/src/{Core => Application}/Layer.h | 2 +- Nuake/src/{Core => Application}/LayerStack.cpp | 0 Nuake/src/{Core => Application}/LayerStack.h | 2 +- Nuake/src/{Core => }/Physics/CharacterController.cpp | 6 +++--- Nuake/src/{Core => }/Physics/CharacterController.h | 2 +- Nuake/src/{Core => }/Physics/DynamicWorld.cpp | 2 +- Nuake/src/{Core => }/Physics/DynamicWorld.h | 2 +- Nuake/src/{Core => }/Physics/GhostObject.cpp | 2 +- Nuake/src/{Core => }/Physics/GhostObject.h | 0 Nuake/src/{Core => }/Physics/KinematicBody.h | 0 Nuake/src/{Core => }/Physics/PhysicsManager.cpp | 0 Nuake/src/{Core => }/Physics/PhysicsManager.h | 0 Nuake/src/{Core => }/Physics/PhysicsShapes.cpp | 0 Nuake/src/{Core => }/Physics/PhysicsShapes.h | 0 Nuake/src/{Core => }/Physics/RaycastResult.h | 0 Nuake/src/{Core => }/Physics/RaycastResults.h | 0 Nuake/src/{Core => }/Physics/Rigibody.h | 0 Nuake/src/{Core => }/Physics/Rigidbody.cpp | 0 Nuake/src/Scene/Components/BSPBrushComponent.h | 2 +- Nuake/src/Scene/Components/BoxCollider.h | 2 +- Nuake/src/Scene/Components/CapsuleColliderComponent.h | 2 +- Nuake/src/Scene/Components/CharacterControllerComponent.h | 2 +- Nuake/src/Scene/Components/CylinderColliderComponent.h | 2 +- Nuake/src/Scene/Components/MeshCollider.h | 2 +- Nuake/src/Scene/Components/RigidbodyComponent.cpp | 4 ++-- Nuake/src/Scene/Components/SphereCollider.h | 2 +- Nuake/src/Scene/Components/TriggerZone.h | 2 +- Nuake/src/Scene/Scene.cpp | 4 ++-- Nuake/src/Scene/Systems/PhysicsSystem.cpp | 2 +- Nuake/src/Scripting/Modules/PhysicsModule.h | 2 +- Nuake/src/Scripting/Modules/SceneModule.h | 2 +- 41 files changed, 33 insertions(+), 33 deletions(-) rename Nuake/src/{Core => Application}/Application.cpp (100%) rename Nuake/src/{Core => Application}/Application.h (98%) rename Nuake/src/{Core => Application}/EntryPoint.h (100%) rename Nuake/src/{Core => Application}/IApplicationModule.h (100%) rename Nuake/src/{Core => Application}/Layer.h (96%) rename Nuake/src/{Core => Application}/LayerStack.cpp (100%) rename Nuake/src/{Core => Application}/LayerStack.h (95%) rename Nuake/src/{Core => }/Physics/CharacterController.cpp (86%) rename Nuake/src/{Core => }/Physics/CharacterController.h (96%) rename Nuake/src/{Core => }/Physics/DynamicWorld.cpp (99%) rename Nuake/src/{Core => }/Physics/DynamicWorld.h (97%) rename Nuake/src/{Core => }/Physics/GhostObject.cpp (94%) rename Nuake/src/{Core => }/Physics/GhostObject.h (100%) rename Nuake/src/{Core => }/Physics/KinematicBody.h (100%) rename Nuake/src/{Core => }/Physics/PhysicsManager.cpp (100%) rename Nuake/src/{Core => }/Physics/PhysicsManager.h (100%) rename Nuake/src/{Core => }/Physics/PhysicsShapes.cpp (100%) rename Nuake/src/{Core => }/Physics/PhysicsShapes.h (100%) rename Nuake/src/{Core => }/Physics/RaycastResult.h (100%) rename Nuake/src/{Core => }/Physics/RaycastResults.h (100%) rename Nuake/src/{Core => }/Physics/Rigibody.h (100%) rename Nuake/src/{Core => }/Physics/Rigidbody.cpp (100%) diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index fd39013b..d0909674 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include "src/Scene/Components/BoxCollider.h" #include @@ -33,9 +33,9 @@ #include #include "src/Misc/WindowTheming.h" -#include +#include -#include +#include #include "src/EditorApplication.h" diff --git a/Editor/src/EditorApplication.h b/Editor/src/EditorApplication.h index 19b05e7c..c9e788da 100644 --- a/Editor/src/EditorApplication.h +++ b/Editor/src/EditorApplication.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include "Windows/EditorInterface.h" diff --git a/Editor/src/EditorLayer.h b/Editor/src/EditorLayer.h index d974946d..1aedc4da 100644 --- a/Editor/src/EditorLayer.h +++ b/Editor/src/EditorLayer.h @@ -1,5 +1,5 @@ #pragma once -#include +#include namespace Nuake { diff --git a/Editor/src/Misc/GizmoDrawer.h b/Editor/src/Misc/GizmoDrawer.h index 95d17db1..887bd2d9 100644 --- a/Editor/src/Misc/GizmoDrawer.h +++ b/Editor/src/Misc/GizmoDrawer.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include "Gizmos/CapsuleGizmo.h" #include "Gizmos/CylinderGizmo.h" diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 297f24f4..99586a48 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -14,7 +14,7 @@ #include "src/Rendering/Textures/Texture.h" #include "src/Rendering/Textures/MaterialManager.h" -#include "src/Core/Physics/PhysicsManager.h" +#include "src/Physics/PhysicsManager.h" #include "src/Vendors/glm/gtc/type_ptr.hpp" #include "src/Vendors/glm/gtx/matrix_decompose.hpp" diff --git a/Nuake/Engine.cpp b/Nuake/Engine.cpp index 738b466e..f323daf7 100644 --- a/Nuake/Engine.cpp +++ b/Nuake/Engine.cpp @@ -1,5 +1,5 @@ #include "Engine.h" -#include "src/Core/Physics/PhysicsManager.h" +#include "src/Physics/PhysicsManager.h" #include #include "src/Core/Input.h" diff --git a/Nuake/src/Core/Application.cpp b/Nuake/src/Application/Application.cpp similarity index 100% rename from Nuake/src/Core/Application.cpp rename to Nuake/src/Application/Application.cpp diff --git a/Nuake/src/Core/Application.h b/Nuake/src/Application/Application.h similarity index 98% rename from Nuake/src/Core/Application.h rename to Nuake/src/Application/Application.h index 20832369..5469e837 100644 --- a/Nuake/src/Core/Application.h +++ b/Nuake/src/Application/Application.h @@ -1,6 +1,6 @@ #pragma once #include "IApplicationModule.h" -#include "Core.h" +#include "src/Core/Core.h" #include "LayerStack.h" #include diff --git a/Nuake/src/Core/EntryPoint.h b/Nuake/src/Application/EntryPoint.h similarity index 100% rename from Nuake/src/Core/EntryPoint.h rename to Nuake/src/Application/EntryPoint.h diff --git a/Nuake/src/Core/IApplicationModule.h b/Nuake/src/Application/IApplicationModule.h similarity index 100% rename from Nuake/src/Core/IApplicationModule.h rename to Nuake/src/Application/IApplicationModule.h diff --git a/Nuake/src/Core/Layer.h b/Nuake/src/Application/Layer.h similarity index 96% rename from Nuake/src/Core/Layer.h rename to Nuake/src/Application/Layer.h index 86ffd398..3cd68f04 100644 --- a/Nuake/src/Core/Layer.h +++ b/Nuake/src/Application/Layer.h @@ -1,5 +1,5 @@ #pragma once -#include "Core.h" +#include "src/Core/Core.h" #include "Application.h" diff --git a/Nuake/src/Core/LayerStack.cpp b/Nuake/src/Application/LayerStack.cpp similarity index 100% rename from Nuake/src/Core/LayerStack.cpp rename to Nuake/src/Application/LayerStack.cpp diff --git a/Nuake/src/Core/LayerStack.h b/Nuake/src/Application/LayerStack.h similarity index 95% rename from Nuake/src/Core/LayerStack.h rename to Nuake/src/Application/LayerStack.h index 73ae7e98..0b8d525c 100644 --- a/Nuake/src/Core/LayerStack.h +++ b/Nuake/src/Application/LayerStack.h @@ -1,5 +1,5 @@ #pragma once -#include "Core.h" +#include "src/Core/Core.h" #include diff --git a/Nuake/src/Core/Physics/CharacterController.cpp b/Nuake/src/Physics/CharacterController.cpp similarity index 86% rename from Nuake/src/Core/Physics/CharacterController.cpp rename to Nuake/src/Physics/CharacterController.cpp index 0ebb728c..6e0812b7 100644 --- a/Nuake/src/Core/Physics/CharacterController.cpp +++ b/Nuake/src/Physics/CharacterController.cpp @@ -1,8 +1,8 @@ #include "CharacterController.h" -#include "src/Core/Physics/PhysicsManager.h" -#include "src/Core/Physics/RaycastResult.h" +#include "src/Physics/PhysicsManager.h" +#include "src/Physics/RaycastResult.h" -#include "src/Core/Physics/PhysicsManager.h" +#include "src/Physics/PhysicsManager.h" namespace Nuake { diff --git a/Nuake/src/Core/Physics/CharacterController.h b/Nuake/src/Physics/CharacterController.h similarity index 96% rename from Nuake/src/Core/Physics/CharacterController.h rename to Nuake/src/Physics/CharacterController.h index 80e0df4d..c3e751a8 100644 --- a/Nuake/src/Core/Physics/CharacterController.h +++ b/Nuake/src/Physics/CharacterController.h @@ -1,7 +1,7 @@ #pragma once #include "src/Core/Core.h" #include "src/Core/Maths.h" -#include "src/Core/Physics/PhysicsShapes.h" +#include "src/Physics/PhysicsShapes.h" #include "src/Scene/Entities/Entity.h" namespace Nuake diff --git a/Nuake/src/Core/Physics/DynamicWorld.cpp b/Nuake/src/Physics/DynamicWorld.cpp similarity index 99% rename from Nuake/src/Core/Physics/DynamicWorld.cpp rename to Nuake/src/Physics/DynamicWorld.cpp index e43e71d7..2b65b61a 100644 --- a/Nuake/src/Core/Physics/DynamicWorld.cpp +++ b/Nuake/src/Physics/DynamicWorld.cpp @@ -4,7 +4,7 @@ #include "src/Core/Core.h" #include "src/Core/Logger.h" #include "src/Core/Maths.h" -#include +#include #include "src/Scene/Components/TransformComponent.h" #include "src/Scene/Components/CharacterControllerComponent.h" diff --git a/Nuake/src/Core/Physics/DynamicWorld.h b/Nuake/src/Physics/DynamicWorld.h similarity index 97% rename from Nuake/src/Core/Physics/DynamicWorld.h rename to Nuake/src/Physics/DynamicWorld.h index 2f0b6dad..5569b799 100644 --- a/Nuake/src/Core/Physics/DynamicWorld.h +++ b/Nuake/src/Physics/DynamicWorld.h @@ -7,7 +7,7 @@ #include #include "RaycastResult.h" -#include +#include #include "CharacterController.h" #include "Jolt/Jolt.h" diff --git a/Nuake/src/Core/Physics/GhostObject.cpp b/Nuake/src/Physics/GhostObject.cpp similarity index 94% rename from Nuake/src/Core/Physics/GhostObject.cpp rename to Nuake/src/Physics/GhostObject.cpp index 7a969226..73dcb821 100644 --- a/Nuake/src/Core/Physics/GhostObject.cpp +++ b/Nuake/src/Physics/GhostObject.cpp @@ -1,6 +1,6 @@ #include "GhostObject.h" -#include +#include "src/Physics/PhysicsManager.h" namespace Nuake { diff --git a/Nuake/src/Core/Physics/GhostObject.h b/Nuake/src/Physics/GhostObject.h similarity index 100% rename from Nuake/src/Core/Physics/GhostObject.h rename to Nuake/src/Physics/GhostObject.h diff --git a/Nuake/src/Core/Physics/KinematicBody.h b/Nuake/src/Physics/KinematicBody.h similarity index 100% rename from Nuake/src/Core/Physics/KinematicBody.h rename to Nuake/src/Physics/KinematicBody.h diff --git a/Nuake/src/Core/Physics/PhysicsManager.cpp b/Nuake/src/Physics/PhysicsManager.cpp similarity index 100% rename from Nuake/src/Core/Physics/PhysicsManager.cpp rename to Nuake/src/Physics/PhysicsManager.cpp diff --git a/Nuake/src/Core/Physics/PhysicsManager.h b/Nuake/src/Physics/PhysicsManager.h similarity index 100% rename from Nuake/src/Core/Physics/PhysicsManager.h rename to Nuake/src/Physics/PhysicsManager.h diff --git a/Nuake/src/Core/Physics/PhysicsShapes.cpp b/Nuake/src/Physics/PhysicsShapes.cpp similarity index 100% rename from Nuake/src/Core/Physics/PhysicsShapes.cpp rename to Nuake/src/Physics/PhysicsShapes.cpp diff --git a/Nuake/src/Core/Physics/PhysicsShapes.h b/Nuake/src/Physics/PhysicsShapes.h similarity index 100% rename from Nuake/src/Core/Physics/PhysicsShapes.h rename to Nuake/src/Physics/PhysicsShapes.h diff --git a/Nuake/src/Core/Physics/RaycastResult.h b/Nuake/src/Physics/RaycastResult.h similarity index 100% rename from Nuake/src/Core/Physics/RaycastResult.h rename to Nuake/src/Physics/RaycastResult.h diff --git a/Nuake/src/Core/Physics/RaycastResults.h b/Nuake/src/Physics/RaycastResults.h similarity index 100% rename from Nuake/src/Core/Physics/RaycastResults.h rename to Nuake/src/Physics/RaycastResults.h diff --git a/Nuake/src/Core/Physics/Rigibody.h b/Nuake/src/Physics/Rigibody.h similarity index 100% rename from Nuake/src/Core/Physics/Rigibody.h rename to Nuake/src/Physics/Rigibody.h diff --git a/Nuake/src/Core/Physics/Rigidbody.cpp b/Nuake/src/Physics/Rigidbody.cpp similarity index 100% rename from Nuake/src/Core/Physics/Rigidbody.cpp rename to Nuake/src/Physics/Rigidbody.cpp diff --git a/Nuake/src/Scene/Components/BSPBrushComponent.h b/Nuake/src/Scene/Components/BSPBrushComponent.h index efdf46ca..dcae95ce 100644 --- a/Nuake/src/Scene/Components/BSPBrushComponent.h +++ b/Nuake/src/Scene/Components/BSPBrushComponent.h @@ -4,7 +4,7 @@ #include "src/Rendering/Textures/Material.h" #include "src/Rendering/Mesh/Mesh.h" -#include "src/Core/Physics/Rigibody.h" +#include "src/Physics/Rigibody.h" namespace Nuake { class BSPBrushComponent diff --git a/Nuake/src/Scene/Components/BoxCollider.h b/Nuake/src/Scene/Components/BoxCollider.h index f1fb1f84..44223399 100644 --- a/Nuake/src/Scene/Components/BoxCollider.h +++ b/Nuake/src/Scene/Components/BoxCollider.h @@ -1,5 +1,5 @@ #pragma once -#include "src/Core/Physics/PhysicsShapes.h" +#include "src/Physics/PhysicsShapes.h" #include "src/Core/Core.h" namespace Nuake { diff --git a/Nuake/src/Scene/Components/CapsuleColliderComponent.h b/Nuake/src/Scene/Components/CapsuleColliderComponent.h index 824cbfc9..4e2170ea 100644 --- a/Nuake/src/Scene/Components/CapsuleColliderComponent.h +++ b/Nuake/src/Scene/Components/CapsuleColliderComponent.h @@ -1,5 +1,5 @@ #pragma once -#include "src/Core/Physics/PhysicsShapes.h" +#include "src/Physics/PhysicsShapes.h" #include "src/Core/Core.h" namespace Nuake diff --git a/Nuake/src/Scene/Components/CharacterControllerComponent.h b/Nuake/src/Scene/Components/CharacterControllerComponent.h index 828ac891..621f7f66 100644 --- a/Nuake/src/Scene/Components/CharacterControllerComponent.h +++ b/Nuake/src/Scene/Components/CharacterControllerComponent.h @@ -1,5 +1,5 @@ #pragma once -#include "src/Core/Physics/CharacterController.h" +#include "src/Physics/CharacterController.h" namespace Nuake { diff --git a/Nuake/src/Scene/Components/CylinderColliderComponent.h b/Nuake/src/Scene/Components/CylinderColliderComponent.h index df530f68..d9a71217 100644 --- a/Nuake/src/Scene/Components/CylinderColliderComponent.h +++ b/Nuake/src/Scene/Components/CylinderColliderComponent.h @@ -1,5 +1,5 @@ #pragma once -#include "src/Core/Physics/PhysicsShapes.h" +#include "src/Physics/PhysicsShapes.h" #include "src/Core/Core.h" namespace Nuake diff --git a/Nuake/src/Scene/Components/MeshCollider.h b/Nuake/src/Scene/Components/MeshCollider.h index 6d4d5338..0d93fc86 100644 --- a/Nuake/src/Scene/Components/MeshCollider.h +++ b/Nuake/src/Scene/Components/MeshCollider.h @@ -1,5 +1,5 @@ #pragma once -#include "src/Core/Physics/PhysicsShapes.h" +#include "src/Physics/PhysicsShapes.h" #include "src/Core/Core.h" namespace Nuake { diff --git a/Nuake/src/Scene/Components/RigidbodyComponent.cpp b/Nuake/src/Scene/Components/RigidbodyComponent.cpp index 39862b53..0e045f07 100644 --- a/Nuake/src/Scene/Components/RigidbodyComponent.cpp +++ b/Nuake/src/Scene/Components/RigidbodyComponent.cpp @@ -1,8 +1,8 @@ #pragma once #include "RigidbodyComponent.h" -#include "src/Core/Physics/Rigibody.h" -#include "src/Core/Physics/PhysicsManager.h" +#include "src/Physics/Rigibody.h" +#include "src/Physics/PhysicsManager.h" #include "src/Rendering/Renderer.h" namespace Nuake { diff --git a/Nuake/src/Scene/Components/SphereCollider.h b/Nuake/src/Scene/Components/SphereCollider.h index 664080f9..52f44786 100644 --- a/Nuake/src/Scene/Components/SphereCollider.h +++ b/Nuake/src/Scene/Components/SphereCollider.h @@ -1,5 +1,5 @@ #pragma once -#include "src/Core/Physics/PhysicsShapes.h" +#include "src/Physics/PhysicsShapes.h" #include "src/Core/Core.h" namespace Nuake { diff --git a/Nuake/src/Scene/Components/TriggerZone.h b/Nuake/src/Scene/Components/TriggerZone.h index ed1aea09..f2d27cf8 100644 --- a/Nuake/src/Scene/Components/TriggerZone.h +++ b/Nuake/src/Scene/Components/TriggerZone.h @@ -1,5 +1,5 @@ #pragma once -#include "src/Core/Physics/GhostObject.h" +#include "src/Physics/GhostObject.h" #include namespace Nuake { diff --git a/Nuake/src/Scene/Scene.cpp b/Nuake/src/Scene/Scene.cpp index 092a53ac..a359ba39 100644 --- a/Nuake/src/Scene/Scene.cpp +++ b/Nuake/src/Scene/Scene.cpp @@ -4,7 +4,7 @@ #include "src/Core/Core.h" #include "src/Core/OS.h" -#include "src/Core/Physics/PhysicsManager.h" +#include "src/Physics/PhysicsManager.h" #include "src/Scene/Systems/ScriptingSystem.h" #include "src/Scene/Systems/PhysicsSystem.h" @@ -524,7 +524,7 @@ namespace Nuake transformComponent.SetLocalRotation(boneRotation); transformComponent.SetLocalScale(boneScale); transformComponent.SetLocalTransform(c.Transform); - transformComponent.Dirty = false; + //transformComponent.Dirty = false; CreateSkeletonTraverse(boneEntity, c); } diff --git a/Nuake/src/Scene/Systems/PhysicsSystem.cpp b/Nuake/src/Scene/Systems/PhysicsSystem.cpp index 7c0d6434..e0bd94c7 100644 --- a/Nuake/src/Scene/Systems/PhysicsSystem.cpp +++ b/Nuake/src/Scene/Systems/PhysicsSystem.cpp @@ -7,7 +7,7 @@ #include "src/Scene/Components/ModelComponent.h" #include #include "src/Scene/Entities/Entity.h" -#include +#include #include #include #include diff --git a/Nuake/src/Scripting/Modules/PhysicsModule.h b/Nuake/src/Scripting/Modules/PhysicsModule.h index 5d3e4ad5..a18e87f9 100644 --- a/Nuake/src/Scripting/Modules/PhysicsModule.h +++ b/Nuake/src/Scripting/Modules/PhysicsModule.h @@ -6,7 +6,7 @@ #include "ScriptModule.h" #include #include -#include "../Core/Physics/PhysicsManager.h" +#include "src/Physics/PhysicsManager.h" namespace Nuake { diff --git a/Nuake/src/Scripting/Modules/SceneModule.h b/Nuake/src/Scripting/Modules/SceneModule.h index 26f7fa3e..bd0cd224 100644 --- a/Nuake/src/Scripting/Modules/SceneModule.h +++ b/Nuake/src/Scripting/Modules/SceneModule.h @@ -9,7 +9,7 @@ #include #include "Engine.h" -#include "src/Core/Physics/PhysicsManager.h" +#include "src/Physics/PhysicsManager.h" #include "../Scene/Entities/Entity.h" #include