Final merge of HEAD (bf-blender) into the orange branch.
[blender.git] / intern / iksolver / intern / TNT / fmat.h
index daba50c993f9774a9c981a8a2501ed6d4b6e2b2a..eb5531815eb161ef2a12fd675f00d7762a872055 100644 (file)
@@ -38,6 +38,7 @@
 #include <cstdlib>
 #include <cassert>
 #include <iostream>
+#include <strstream>
 #ifdef TNT_USE_REGIONS
 #include "region2d.h"
 #endif
@@ -197,6 +198,18 @@ class Fortran_Matrix
     }
 
 
+    Fortran_Matrix(Subscript M, Subscript N, char *s)
+    {
+        initialize(M,N);
+        std::istrstream ins(s);
+
+        Subscript i, j;
+
+        for (i=1; i<=M; i++)
+            for (j=1; j<=N; j++)
+                ins >> (*this)(i,j);
+    }
+
     // destructor
     ~Fortran_Matrix()
     {