Skip to content

Commit

Permalink
Body->AddImpulse
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed May 13, 2024
1 parent 75383d7 commit bf21e6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions JoltC/Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,7 @@ JPC_API void JPC_Body_ResetTorque(JPC_Body* self);
JPC_API void JPC_Body_ResetMotion(JPC_Body* self);
JPC_API void JPC_Body_GetInverseInertia(const JPC_Body* self, JPC_Mat44* outMatrix);
JPC_API void JPC_Body_AddImpulse(JPC_Body* self, JPC_Vec3 inImpulse);

// JPC_API void JPC_Body_AddImpulse(JPC_Body* self, JPC_Vec3 inImpulse, JPC_RVec3 inPosition);

JPC_API void JPC_Body_AddImpulse2(JPC_Body* self, JPC_Vec3 inImpulse, JPC_RVec3 inPosition);
JPC_API void JPC_Body_AddAngularImpulse(JPC_Body* self, JPC_Vec3 inAngularImpulse);
JPC_API void JPC_Body_MoveKinematic(JPC_Body* self, JPC_RVec3 inTargetPosition, JPC_Quat inTargetRotation, float inDeltaTime);
JPC_API bool JPC_Body_ApplyBuoyancyImpulse(JPC_Body* self, JPC_RVec3 inSurfacePosition, JPC_Vec3 inSurfaceNormal, float inBuoyancy, float inLinearDrag, float inAngularDrag, JPC_Vec3 inFluidVelocity, JPC_Vec3 inGravity, float inDeltaTime);
Expand Down
9 changes: 7 additions & 2 deletions JoltC/JoltC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,13 @@ JPC_API void JPC_Body_GetInverseInertia(const JPC_Body* self, JPC_Mat44* outMatr
to_jph(self)->GetInverseInertia().StoreFloat4x4(reinterpret_cast<JPH::Float4*>(outMatrix));
}

// JPC_API void JPC_Body_AddImpulse(JPC_Body* self, JPC_Vec3 inImpulse);
// JPC_API void JPC_Body_AddImpulse(JPC_Body* self, JPC_Vec3 inImpulse, JPC_RVec3 inPosition);
JPC_API void JPC_Body_AddImpulse(JPC_Body* self, JPC_Vec3 inImpulse) {
to_jph(self)->AddImpulse(to_jph(inImpulse));
}

JPC_API void JPC_Body_AddImpulse2(JPC_Body* self, JPC_Vec3 inImpulse, JPC_RVec3 inPosition) {
to_jph(self)->AddImpulse(to_jph(inImpulse), to_jph(inPosition));
}

JPC_API void JPC_Body_AddAngularImpulse(JPC_Body* self, JPC_Vec3 inAngularImpulse) {
return to_jph(self)->AddAngularImpulse(to_jph(inAngularImpulse));
Expand Down

0 comments on commit bf21e6e

Please sign in to comment.