]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/RigidBody.cpp
FGPUIDialog: fix reading from already free'd memory.
[flightgear.git] / src / FDM / YASim / RigidBody.cpp
index 5456aa56b0a15fadfe22ec03d1e7b0b6c9f5f796..7f530305b2c42bd4723e56c798ca8289696805f7 100644 (file)
@@ -204,4 +204,14 @@ void RigidBody::getAngularAccel(float* accelOut)
     Math::vmul33(_invI, v, v);   // v = invI*(tau + (omega X I*omega))
 }
 
+void RigidBody::getInertiaMatrix(float* inertiaOut)
+{
+    // valid only after a call to RigidBody::recalc()
+    // See comment at top of RigidBody.hpp on units.
+    for(int i=0;i<9;i++)
+    {
+       inertiaOut[i] = _tI[i];
+    }
+}
+
 }; // namespace yasim