[cogl/wip/cogl-sharp: 32/51] cogl-sharp: Add a Matrix.ToString() method
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/cogl-sharp: 32/51] cogl-sharp: Add a Matrix.ToString() method
- Date: Sat, 5 Jan 2013 16:50:59 +0000 (UTC)
commit 0d966af4f10ffb388280604e2056ad78bf0f3494
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]