소스 검색

Bind Shape::GetVolume

Lucien Greathouse 3 달 전
부모
커밋
8598144dc9
2개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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