|
@@ -111,6 +111,12 @@ public:
|
|
|
/// Velocity of point inPoint (in center of mass space, e.g. on the surface of the body) of the body (unit: m/s)
|
|
|
JPH_INLINE Vec3 GetPointVelocityCOM(Vec3Arg inPointRelativeToCOM) const { return mLinearVelocity + mAngularVelocity.Cross(inPointRelativeToCOM); }
|
|
|
|
|
|
+ // Get the total amount of force applied to the center of mass this time step (through Body::AddForce calls). Note that it will reset to zero after PhysicsSimulation::Update.
|
|
|
+ JPH_INLINE Vec3 GetAccumulatedForce() const { return Vec3::sLoadFloat3Unsafe(mForce); }
|
|
|
+
|
|
|
+ // 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); }
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////
|
|
|
// FUNCTIONS BELOW THIS LINE ARE FOR INTERNAL USE ONLY
|
|
|
////////////////////////////////////////////////////////////
|