From 49063b079e3eccbbc3f5330ee3e5e88bb7796f70 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 6 Dec 2021 09:57:05 +0800 Subject: *misc --- Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj | 15 ++++++ .../VisualStudio/Phy2D/Phy2D.vcxproj.filters | 57 ++++++++++++++++++--- Client/Source/Phy2D/Collision/BoxCollider.cpp | 0 Client/Source/Phy2D/Collision/BoxCollider.h | 0 Client/Source/Phy2D/Collision/CapsuleCollider.cpp | 0 Client/Source/Phy2D/Collision/CapsuleCollider.h | 0 Client/Source/Phy2D/Collision/Collider.h | 0 Client/Source/Phy2D/Collision/PolygonCollider.cpp | 0 Client/Source/Phy2D/Collision/PolygonCollider.h | 0 Client/Source/Phy2D/Common/Type.h | 8 ++- Client/Source/Phy2D/Documents/Phy2D.xlsx | Bin 15199 -> 489741 bytes Client/Source/Phy2D/Dynamic/RigidBody.cpp | 0 Client/Source/Phy2D/Dynamic/RigidBody.h | 23 +++++++++ Client/Source/Phy2D/Dynamic/World.cpp | 0 Client/Source/Phy2D/Dynamic/World.h | 0 Client/Source/Phy2D/Joints/FixedJoint.cpp | 0 Client/Source/Phy2D/Joints/FixedJoint.h | 15 ++++++ Client/Source/Phy2D/Joints/Joint.cpp | 0 Client/Source/Phy2D/Joints/Joint.h | 11 ++++ Client/Source/Phy2D/Phy2D.h | 1 + 20 files changed, 122 insertions(+), 8 deletions(-) create mode 100644 Client/Source/Phy2D/Collision/BoxCollider.cpp create mode 100644 Client/Source/Phy2D/Collision/BoxCollider.h create mode 100644 Client/Source/Phy2D/Collision/CapsuleCollider.cpp create mode 100644 Client/Source/Phy2D/Collision/CapsuleCollider.h create mode 100644 Client/Source/Phy2D/Collision/Collider.h create mode 100644 Client/Source/Phy2D/Collision/PolygonCollider.cpp create mode 100644 Client/Source/Phy2D/Collision/PolygonCollider.h create mode 100644 Client/Source/Phy2D/Dynamic/RigidBody.cpp create mode 100644 Client/Source/Phy2D/Dynamic/RigidBody.h create mode 100644 Client/Source/Phy2D/Dynamic/World.cpp create mode 100644 Client/Source/Phy2D/Dynamic/World.h create mode 100644 Client/Source/Phy2D/Joints/FixedJoint.cpp create mode 100644 Client/Source/Phy2D/Joints/FixedJoint.h create mode 100644 Client/Source/Phy2D/Joints/Joint.cpp create mode 100644 Client/Source/Phy2D/Joints/Joint.h diff --git a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj index 5dd7295..1be97e2 100644 --- a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj +++ b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj @@ -136,7 +136,14 @@ + + + + + + + @@ -161,9 +168,17 @@ + + + + + + + + diff --git a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters index 79e95cb..73f22ca 100644 --- a/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters +++ b/Client/Project/VisualStudio/Phy2D/Phy2D.vcxproj.filters @@ -1,9 +1,6 @@  - - {62eaceb5-1503-4237-b8b9-5dcc05212dbd} - {c51efad7-946b-4948-957e-4f4d6737ed93} @@ -13,9 +10,6 @@ {b4d78560-5498-4b35-8f8d-f87db40a4e52} - - {596062aa-a263-4c8c-acf2-1267b28a0f97} - {e496beb9-5af2-42a7-afb5-29cf18b93f78} @@ -40,6 +34,12 @@ {ea4df851-7347-4fbd-a050-e7b4adf1bb68} + + {d0099037-a6dd-450a-bfb2-f83b15101ce3} + + + {94977a7c-15e5-4c9a-b99f-ae334df7ace0} + @@ -111,6 +111,27 @@ Math + + Dynamic + + + Dynamic + + + Collision + + + Collision + + + Collision + + + Joints + + + Joints + @@ -195,6 +216,30 @@ Math + + Dynamic + + + Dynamic + + + Collision + + + Collision + + + Collision + + + Collision + + + Joints + + + Joints + diff --git a/Client/Source/Phy2D/Collision/BoxCollider.cpp b/Client/Source/Phy2D/Collision/BoxCollider.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Collision/BoxCollider.h b/Client/Source/Phy2D/Collision/BoxCollider.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Collision/CapsuleCollider.cpp b/Client/Source/Phy2D/Collision/CapsuleCollider.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Collision/CapsuleCollider.h b/Client/Source/Phy2D/Collision/CapsuleCollider.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Collision/Collider.h b/Client/Source/Phy2D/Collision/Collider.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Collision/PolygonCollider.cpp b/Client/Source/Phy2D/Collision/PolygonCollider.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Collision/PolygonCollider.h b/Client/Source/Phy2D/Collision/PolygonCollider.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Common/Type.h b/Client/Source/Phy2D/Common/Type.h index c985d99..4c0088d 100644 --- a/Client/Source/Phy2D/Common/Type.h +++ b/Client/Source/Phy2D/Common/Type.h @@ -1,9 +1,13 @@ #include "fix32/fix32.hpp" +#include "libfixmath/libfixmath/fix16.hpp" namespace Phy2D { - using fixed = Fix32; + // Phy2DÀïµÄÊýÖµÀàÐÍÓÃreal±íʾ + using real = Fix32; -} + // constants + static real kPI = real(1ll); +} \ No newline at end of file diff --git a/Client/Source/Phy2D/Documents/Phy2D.xlsx b/Client/Source/Phy2D/Documents/Phy2D.xlsx index 5b6ba93..c03b2b7 100644 Binary files a/Client/Source/Phy2D/Documents/Phy2D.xlsx and b/Client/Source/Phy2D/Documents/Phy2D.xlsx differ diff --git a/Client/Source/Phy2D/Dynamic/RigidBody.cpp b/Client/Source/Phy2D/Dynamic/RigidBody.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Dynamic/RigidBody.h b/Client/Source/Phy2D/Dynamic/RigidBody.h new file mode 100644 index 0000000..0301a05 --- /dev/null +++ b/Client/Source/Phy2D/Dynamic/RigidBody.h @@ -0,0 +1,23 @@ +#pragma once + +namespace Phy2D +{ + class Collider; + class BoxCollider; + + enum RigidBodyType + { + BodyType_Static, + BodyType_Kinematic, + BodyType_Dynamic, + }; + + // ¿ÉÒÔ±»Ê©¼ÓÁ¦¡¢³åÁ¿¡¢Å¤¾Ø + class RigidBody + { + public: + + private: + + }; +} \ No newline at end of file diff --git a/Client/Source/Phy2D/Dynamic/World.cpp b/Client/Source/Phy2D/Dynamic/World.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Dynamic/World.h b/Client/Source/Phy2D/Dynamic/World.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Joints/FixedJoint.cpp b/Client/Source/Phy2D/Joints/FixedJoint.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Joints/FixedJoint.h b/Client/Source/Phy2D/Joints/FixedJoint.h new file mode 100644 index 0000000..585f502 --- /dev/null +++ b/Client/Source/Phy2D/Joints/FixedJoint.h @@ -0,0 +1,15 @@ +#pragma once + +#include "Joint.h" + + +namespace Phy2D +{ + + class FixedJoint : public Joint + { + public: + + }; + +} diff --git a/Client/Source/Phy2D/Joints/Joint.cpp b/Client/Source/Phy2D/Joints/Joint.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Phy2D/Joints/Joint.h b/Client/Source/Phy2D/Joints/Joint.h new file mode 100644 index 0000000..2a16888 --- /dev/null +++ b/Client/Source/Phy2D/Joints/Joint.h @@ -0,0 +1,11 @@ +#pragma once + +namespace Phy2D +{ + + class Joint + { + + }; + +} \ No newline at end of file diff --git a/Client/Source/Phy2D/Phy2D.h b/Client/Source/Phy2D/Phy2D.h index 2f41e80..723e729 100644 --- a/Client/Source/Phy2D/Phy2D.h +++ b/Client/Source/Phy2D/Phy2D.h @@ -1,5 +1,6 @@ #pragma once // ¶¨µãÊýµÄÎïÀíÒýÇæ +// ¦µ2D -- cgit v1.1-26-g67d0