[cogl/wip/cogl-sharp] cogl-sharp: Add a Matrix.ToString() method



commit 3a76ea6c0225397577a8ba0df44e53b67234b291
Author: Damien Lespiau <damien lespiau intel com>
Date:   Sun Oct 14 23:05:35 2012 +0100

    cogl-sharp: Add a Matrix.ToString() method
    
    Very handy when debugging.

 cogl-sharp/Matrix.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/cogl-sharp/Matrix.cs b/cogl-sharp/Matrix.cs
index 50d76e7..5db56c7 100644
--- a/cogl-sharp/Matrix.cs
+++ b/cogl-sharp/Matrix.cs
@@ -169,5 +169,14 @@ namespace Cogl
         {
            return  cogl_matrix_get_inverse(ref this, ref inverse) == 0 ? false : true;
         }
+
+        public override string ToString()
+        {
+            return String.Format("{0} {1} {2} {3}\n{4} {5} {6} {7}\n" +
+                                 "{8} {9} {10} {11}\n{12} {13} {14} {15}\n",
+                                xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw,
+                                wx, wy, wz, ww);
+
+        }
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]