aboutsummaryrefslogtreecommitdiff
path: root/Client/Source/Phy2D
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Source/Phy2D')
-rw-r--r--Client/Source/Phy2D/Collision/BoxCollider.cpp0
-rw-r--r--Client/Source/Phy2D/Collision/BoxCollider.h0
-rw-r--r--Client/Source/Phy2D/Collision/CapsuleCollider.cpp0
-rw-r--r--Client/Source/Phy2D/Collision/CapsuleCollider.h0
-rw-r--r--Client/Source/Phy2D/Collision/Collider.h0
-rw-r--r--Client/Source/Phy2D/Collision/PolygonCollider.cpp0
-rw-r--r--Client/Source/Phy2D/Collision/PolygonCollider.h0
-rw-r--r--Client/Source/Phy2D/Common/Type.h8
-rw-r--r--Client/Source/Phy2D/Documents/Phy2D.xlsxbin15199 -> 489741 bytes
-rw-r--r--Client/Source/Phy2D/Dynamic/RigidBody.cpp0
-rw-r--r--Client/Source/Phy2D/Dynamic/RigidBody.h23
-rw-r--r--Client/Source/Phy2D/Dynamic/World.cpp0
-rw-r--r--Client/Source/Phy2D/Dynamic/World.h0
-rw-r--r--Client/Source/Phy2D/Joints/FixedJoint.cpp0
-rw-r--r--Client/Source/Phy2D/Joints/FixedJoint.h15
-rw-r--r--Client/Source/Phy2D/Joints/Joint.cpp0
-rw-r--r--Client/Source/Phy2D/Joints/Joint.h11
-rw-r--r--Client/Source/Phy2D/Phy2D.h1
18 files changed, 56 insertions, 2 deletions
diff --git a/Client/Source/Phy2D/Collision/BoxCollider.cpp b/Client/Source/Phy2D/Collision/BoxCollider.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Collision/BoxCollider.cpp
diff --git a/Client/Source/Phy2D/Collision/BoxCollider.h b/Client/Source/Phy2D/Collision/BoxCollider.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Collision/BoxCollider.h
diff --git a/Client/Source/Phy2D/Collision/CapsuleCollider.cpp b/Client/Source/Phy2D/Collision/CapsuleCollider.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Collision/CapsuleCollider.cpp
diff --git a/Client/Source/Phy2D/Collision/CapsuleCollider.h b/Client/Source/Phy2D/Collision/CapsuleCollider.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Collision/CapsuleCollider.h
diff --git a/Client/Source/Phy2D/Collision/Collider.h b/Client/Source/Phy2D/Collision/Collider.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Collision/Collider.h
diff --git a/Client/Source/Phy2D/Collision/PolygonCollider.cpp b/Client/Source/Phy2D/Collision/PolygonCollider.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Collision/PolygonCollider.cpp
diff --git a/Client/Source/Phy2D/Collision/PolygonCollider.h b/Client/Source/Phy2D/Collision/PolygonCollider.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Collision/PolygonCollider.h
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
--- a/Client/Source/Phy2D/Documents/Phy2D.xlsx
+++ b/Client/Source/Phy2D/Documents/Phy2D.xlsx
Binary files differ
diff --git a/Client/Source/Phy2D/Dynamic/RigidBody.cpp b/Client/Source/Phy2D/Dynamic/RigidBody.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Dynamic/RigidBody.cpp
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
--- /dev/null
+++ b/Client/Source/Phy2D/Dynamic/World.cpp
diff --git a/Client/Source/Phy2D/Dynamic/World.h b/Client/Source/Phy2D/Dynamic/World.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Dynamic/World.h
diff --git a/Client/Source/Phy2D/Joints/FixedJoint.cpp b/Client/Source/Phy2D/Joints/FixedJoint.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Client/Source/Phy2D/Joints/FixedJoint.cpp
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
--- /dev/null
+++ b/Client/Source/Phy2D/Joints/Joint.cpp
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