瀏覽代碼

Upgrade to Jolt Physics 5.1.0

Closes #12
Lucien Greathouse 11 月之前
父節點
當前提交
b9e92b5c21
共有 4 個文件被更改,包括 20 次插入3 次删除
  1. 10 1
      JoltC/Enums.h
  2. 1 0
      JoltC/Functions.h
  3. 1 1
      JoltPhysics
  4. 8 1
      README.md

+ 10 - 1
JoltC/Enums.h

@@ -300,4 +300,13 @@ ENSURE_ENUM_EQ(JPC_SHAPE_COLOR_SHAPE_TYPE_COLOR, JPH::BodyManager::EShapeColor::
 ENSURE_ENUM_EQ(JPC_SHAPE_COLOR_MOTION_TYPE_COLOR, JPH::BodyManager::EShapeColor::MotionTypeColor)
 ENSURE_ENUM_EQ(JPC_SHAPE_COLOR_SLEEP_COLOR, JPH::BodyManager::EShapeColor::SleepColor)
 ENSURE_ENUM_EQ(JPC_SHAPE_COLOR_ISLAND_COLOR, JPH::BodyManager::EShapeColor::IslandColor)
-ENSURE_ENUM_EQ(JPC_SHAPE_COLOR_MATERIAL_COLOR, JPH::BodyManager::EShapeColor::MaterialColor)
+ENSURE_ENUM_EQ(JPC_SHAPE_COLOR_MATERIAL_COLOR, JPH::BodyManager::EShapeColor::MaterialColor)
+
+typedef int JPC_SoftBodyConstraintColor;
+const JPC_SoftBodyConstraintColor JPC_SOFT_BODY_CONSTRAINT_COLOR_CONSTRAINT_TYPE = 0;
+const JPC_SoftBodyConstraintColor JPC_SOFT_BODY_CONSTRAINT_COLOR_CONSTRAINT_GROUP = 1;
+const JPC_SoftBodyConstraintColor JPC_SOFT_BODY_CONSTRAINT_COLOR_CONSTRAINT_ORDER = 2;
+
+ENSURE_ENUM_EQ(JPC_SOFT_BODY_CONSTRAINT_COLOR_CONSTRAINT_TYPE, JPH::ESoftBodyConstraintColor::ConstraintType);
+ENSURE_ENUM_EQ(JPC_SOFT_BODY_CONSTRAINT_COLOR_CONSTRAINT_GROUP, JPH::ESoftBodyConstraintColor::ConstraintGroup);
+ENSURE_ENUM_EQ(JPC_SOFT_BODY_CONSTRAINT_COLOR_CONSTRAINT_ORDER, JPH::ESoftBodyConstraintColor::ConstraintOrder);

+ 1 - 0
JoltC/Functions.h

@@ -349,6 +349,7 @@ typedef struct JPC_BodyManager_DrawSettings {
 	bool mDrawSoftBodySkinConstraints;
 	bool mDrawSoftBodyLRAConstraints;
 	bool mDrawSoftBodyPredictedBounds;
+	JPC_SoftBodyConstraintColor DrawSoftBodyConstraintColor;
 } JPC_BodyManager_DrawSettings;
 
 ENSURE_SIZE_ALIGN(JPC_BodyManager_DrawSettings, JPH::BodyManager::DrawSettings)

+ 1 - 1
JoltPhysics

@@ -1 +1 @@
-Subproject commit f2d1175432f8225450dea252322ba2dbaa83a370
+Subproject commit cede24d2733a4a473c6d486650ca9b6d0481681a

+ 8 - 1
README.md

@@ -1,5 +1,5 @@
 # JoltC
-C wrapper for [Jolt Physics](https://github.com/jrouwe/JoltPhysics) 5.0.0.
+C wrapper for [Jolt Physics](https://github.com/jrouwe/JoltPhysics) 5.1.0.
 
 Currently a work in progress. Bindings contain functions that we've needed as part of our game or the Rust bindings we're working on in [jolt-rust](https://github.com/SecondHalfGames/jolt-rust).
 
@@ -11,7 +11,14 @@ Currently a work in progress. Bindings contain functions that we've needed as pa
 Use CMake:
 
 ```bash
+# Configure the build
 cmake -B build
+
+# Optionally, you can enable double precision, or make ObjectLayer use 32 bits
+# We aim to support most of the configuration of Jolt's C++ API.
+cmake -B build -DDOUBLE_PRECISION=ON -DOBJECT_LAYER_BITS=32
+
+# Build
 cmake --build build
 ```