Browse Source

Bind Shape::GetVolume

Lucien Greathouse 3 tháng trước cách đây
mục cha
commit
8598144dc9
2 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 1 0
      JoltC/Functions.h
  2. 4 0
      JoltCImpl/JoltC.cpp

+ 1 - 0
JoltC/Functions.h

@@ -226,6 +226,7 @@ JPC_API JPC_ShapeSubType JPC_Shape_GetSubType(const JPC_Shape* self);
 JPC_API uint64_t JPC_Shape_GetSubShapeUserData(const JPC_Shape* self, JPC_SubShapeID inSubShapeID);
 
 JPC_API JPC_Vec3 JPC_Shape_GetCenterOfMass(const JPC_Shape* self);
+JPC_API float JPC_Shape_GetVolume(const JPC_Shape* self);
 
 ////////////////////////////////////////////////////////////////////////////////
 // CompoundShape -> Shape -> RefTarget<Shape>

+ 4 - 0
JoltCImpl/JoltC.cpp

@@ -1548,6 +1548,10 @@ JPC_API JPC_Vec3 JPC_Shape_GetCenterOfMass(const JPC_Shape* self) {
 	return to_jpc(to_jph(self)->GetCenterOfMass());
 }
 
+JPC_API float JPC_Shape_GetVolume(const JPC_Shape* self) {
+	return to_jph(self)->GetVolume();
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // CompoundShape