فهرست منبع

Bind MutableCompoundShape::AdjustCenterOfMass

Lucien Greathouse 4 ماه پیش
والد
کامیت
c55cb99aa1
2فایلهای تغییر یافته به همراه9 افزوده شده و 1 حذف شده
  1. 3 1
      JoltC/Functions.h
  2. 6 0
      JoltCImpl/JoltC.cpp

+ 3 - 1
JoltC/Functions.h

@@ -917,9 +917,11 @@ JPC_API uint JPC_MutableCompoundShape_AddShape(
 JPC_API void JPC_MutableCompoundShape_RemoveShape(JPC_MutableCompoundShape* self, uint inIndex);
 JPC_API void JPC_MutableCompoundShape_ModifyShape(JPC_MutableCompoundShape* self, uint inIndex, JPC_Vec3 inPosition, JPC_Quat inRotation);
 JPC_API void JPC_MutableCompoundShape_ModifyShape2(JPC_MutableCompoundShape* self, uint inIndex, JPC_Vec3 inPosition, JPC_Quat inRotation, const JPC_Shape* inShape);
+JPC_API void JPC_MutableCompoundShape_AdjustCenterOfMass(JPC_MutableCompoundShape* self);
 
 // TODO:
-// JPC_API void JPC_MutableCompoundShape_ModifyShapes(JPC_MutableCompoundShape* self);
+// JPC_API void JPC_MutableCompoundShape_ModifyShapes(JPC_MutableCompoundShape* self, ...);
+// JPC_API JPC_MutableCompoundShape* JPC_MutableCompoundShape_Clone(JPC_MutableCompoundShape* self);
 
 ////////////////////////////////////////////////////////////////////////////////
 // MutableCompoundShapeSettings -> CompoundShapeSettings -> ShapeSettings

+ 6 - 0
JoltCImpl/JoltC.cpp

@@ -1504,6 +1504,12 @@ JPC_API void JPC_MutableCompoundShape_ModifyShape2(JPC_MutableCompoundShape* sel
 	self_jph->ModifyShape(inIndex, to_jph(inPosition), to_jph(inRotation), to_jph(inShape));
 }
 
+JPC_API void JPC_MutableCompoundShape_AdjustCenterOfMass(JPC_MutableCompoundShape* self) {
+	JPH::MutableCompoundShape* self_jph = JPC_MutableCompoundShape_to_jph(self);
+
+	self_jph->AdjustCenterOfMass();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // MutableCompoundShapeSettings -> CompoundShapeSettings -> ShapeSettings