|
@@ -117,6 +117,12 @@ public:
|
|
|
// Get the total amount of torque applied to the center of mass this time step (through Body::AddForce/Body::AddTorque calls). Note that it will reset to zero after PhysicsSimulation::Update.
|
|
|
JPH_INLINE Vec3 GetAccumulatedTorque() const { return Vec3::sLoadFloat3Unsafe(mTorque); }
|
|
|
|
|
|
+ // Reset the total accumulated force, not that this will be done automatically after every time step.
|
|
|
+ JPH_INLINE void ResetForce() { mForce = Float3(0, 0, 0); }
|
|
|
+
|
|
|
+ // Reset the total accumulated torque, not that this will be done automatically after every time step.
|
|
|
+ JPH_INLINE void ResetTorque() { mTorque = Float3(0, 0, 0); }
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////
|
|
|
// FUNCTIONS BELOW THIS LINE ARE FOR INTERNAL USE ONLY
|
|
|
////////////////////////////////////////////////////////////
|
|
@@ -132,9 +138,6 @@ public:
|
|
|
/// Apply all accumulated forces, torques and drag (should only be called by the PhysicsSystem)
|
|
|
inline void ApplyForceTorqueAndDragInternal(QuatArg inBodyRotation, Vec3Arg inGravity, float inDeltaTime);
|
|
|
|
|
|
- /// At the end of a simulation update the forces and torques need to be reset for the next frame
|
|
|
- inline void ResetForceAndTorqueInternal() { mForce = Float3(0, 0, 0); mTorque = Float3(0, 0, 0); }
|
|
|
-
|
|
|
/// Access to the island index
|
|
|
uint32 GetIslandIndexInternal() const { return mIslandIndex; }
|
|
|
void SetIslandIndexInternal(uint32 inIndex) { mIslandIndex = inIndex; }
|