33using System.Runtime.InteropServices;
35using System.Xml.Serialization;
39 [StructLayout(LayoutKind.Sequential, Size = Matrix4x4.Size)]
40 [AdvBrowsableOrder(
"Rx,Ry,Rz,Rw")]
41#if !CompactFramework && !WindowsCE && !PocketPC && !XBOX360 && !SILVERLIGHT && !WINDOWS_PHONE && !NETFX_CORE && !NETFX_CORE
81 #region static methods
85 Copy(ref matrix, destArray, 0);
91 destArray[index] = matrix.m00;
92 destArray[++index] = matrix.m01;
93 destArray[++index] = matrix.m02;
94 destArray[++index] = matrix.m03;
96 destArray[++index] = matrix.m10;
97 destArray[++index] = matrix.m11;
98 destArray[++index] = matrix.m12;
99 destArray[++index] = matrix.m13;
101 destArray[++index] = matrix.m20;
102 destArray[++index] = matrix.m21;
103 destArray[++index] = matrix.m22;
104 destArray[++index] = matrix.m23;
106 destArray[++index] = matrix.m30;
107 destArray[++index] = matrix.m31;
108 destArray[++index] = matrix.m32;
109 destArray[++index] = matrix.m33;
113 Copy(sourceArray, 0, out result);
119 result.m00 = sourceArray[index];
120 result.m01 = sourceArray[++index];
121 result.m02 = sourceArray[++index];
122 result.m03 = sourceArray[++index];
124 result.m10 = sourceArray[++index];
125 result.m11 = sourceArray[++index];
126 result.m12 = sourceArray[++index];
127 result.m13 = sourceArray[++index];
129 result.m20 = sourceArray[++index];
130 result.m21 = sourceArray[++index];
131 result.m22 = sourceArray[++index];
132 result.m23 = sourceArray[++index];
134 result.m30 = sourceArray[++index];
135 result.m31 = sourceArray[++index];
136 result.m32 = sourceArray[++index];
137 result.m33 = sourceArray[++index];
147 destArray[index] = matrix.m00;
148 destArray[++index] = matrix.m10;
149 destArray[++index] = matrix.m20;
150 destArray[++index] = matrix.m30;
152 destArray[++index] = matrix.m01;
153 destArray[++index] = matrix.m11;
154 destArray[++index] = matrix.m21;
155 destArray[++index] = matrix.m31;
157 destArray[++index] = matrix.m02;
158 destArray[++index] = matrix.m12;
159 destArray[++index] = matrix.m22;
160 destArray[++index] = matrix.m32;
162 destArray[++index] = matrix.m03;
163 destArray[++index] = matrix.m13;
164 destArray[++index] = matrix.m23;
165 destArray[++index] = matrix.m33;
175 result.m00 = sourceArray[index];
176 result.m10 = sourceArray[++index];
177 result.m20 = sourceArray[++index];
178 result.m30 = sourceArray[++index];
180 result.m01 = sourceArray[++index];
181 result.m11 = sourceArray[++index];
182 result.m21 = sourceArray[++index];
183 result.m31 = sourceArray[++index];
185 result.m02 = sourceArray[++index];
186 result.m12 = sourceArray[++index];
187 result.m22 = sourceArray[++index];
188 result.m32 = sourceArray[++index];
190 result.m03 = sourceArray[++index];
191 result.m13 = sourceArray[++index];
192 result.m23 = sourceArray[++index];
193 result.m33 = sourceArray[++index];
197 dest.m00 = source.m00;
198 dest.m01 = source.m01;
199 dest.m02 = source.m02;
201 dest.m10 = source.m10;
202 dest.m11 = source.m11;
203 dest.m12 = source.m12;
205 dest.m20 = source.m20;
206 dest.m21 = source.m21;
207 dest.m22 = source.m22;
211 dest.m00 = source.m00;
212 dest.m01 = source.m01;
214 dest.m10 = source.m10;
215 dest.m11 = source.m11;
221 Lerp(ref left, ref right, ref amount, out result);
226 result.m00 = (right.m00 - left.m00) * amount + left.m00;
227 result.m01 = (right.m01 - left.m01) * amount + left.m01;
228 result.m02 = (right.m02 - left.m02) * amount + left.m02;
229 result.m03 = (right.m03 - left.m03) * amount + left.m03;
231 result.m10 = (right.m10 - left.m10) * amount + left.m10;
232 result.m11 = (right.m11 - left.m11) * amount + left.m11;
233 result.m12 = (right.m12 - left.m12) * amount + left.m12;
234 result.m13 = (right.m13 - left.m13) * amount + left.m13;
236 result.m20 = (right.m20 - left.m20) * amount + left.m20;
237 result.m21 = (right.m21 - left.m21) * amount + left.m21;
238 result.m22 = (right.m22 - left.m22) * amount + left.m22;
239 result.m23 = (right.m23 - left.m23) * amount + left.m23;
241 result.m30 = (right.m30 - left.m30) * amount + left.m30;
242 result.m31 = (right.m31 - left.m31) * amount + left.m31;
243 result.m32 = (right.m32 - left.m32) * amount + left.m32;
244 result.m33 = (right.m33 - left.m33) * amount + left.m33;
252 Copy(array, 0, out result);
269 result.
m03 = translation.
X;
274 result.
m13 = translation.
Y;
279 result.
m23 = translation.
Z;
293 result.m03 = translation.X;
298 result.m13 = translation.Y;
303 result.m23 = translation.Z;
313 result.
m00 = scale.
X;
319 result.
m11 = scale.
Y;
325 result.
m22 = scale.
Z;
336 result.m00 = scale.X;
342 result.m11 = scale.Y;
348 result.m22 = scale.Z;
368 result.
m00 = 2 / (right - left);
371 result.
m03 = -(right + left) / (right - left);
374 result.
m11 = 2 / (top - bottom);
376 result.
m13 = -(top + bottom) / (top - bottom);
380 result.
m22 = -2 / (far - near);
381 result.
m23 = (far + near) / (far - near);
398 result.m00 = source.m00;
399 result.m01 = source.m01;
401 result.m03 = source.m02;
403 result.m10 = source.m10;
404 result.m11 = source.m11;
406 result.m13 = source.m12;
413 result.m30 = source.m20;
414 result.m31 = source.m21;
416 result.m33 = source.m22;
427 result.m00 = source.m00;
428 result.m01 = source.m01;
430 result.m03 = source.m02;
432 result.m10 = source.m10;
433 result.m11 = source.m11;
435 result.m13 = source.m12;
478 Scalar m00 = left.m00 * right.m00 + left.m01 * right.m10 + left.m02 * right.m20 + left.m03 * right.m30;
479 Scalar m01 = left.m00 * right.m01 + left.m01 * right.m11 + left.m02 * right.m21 + left.m03 * right.m31;
480 Scalar m02 = left.m00 * right.m02 + left.m01 * right.m12 + left.m02 * right.m22 + left.m03 * right.m32;
481 Scalar m03 = left.m00 * right.m03 + left.m01 * right.m13 + left.m02 * right.m23 + left.m03 * right.m33;
483 Scalar m10 = left.m10 * right.m00 + left.m11 * right.m10 + left.m12 * right.m20 + left.m13 * right.m30;
484 Scalar m11 = left.m10 * right.m01 + left.m11 * right.m11 + left.m12 * right.m21 + left.m13 * right.m31;
485 Scalar m12 = left.m10 * right.m02 + left.m11 * right.m12 + left.m12 * right.m22 + left.m13 * right.m32;
486 Scalar m13 = left.m10 * right.m03 + left.m11 * right.m13 + left.m12 * right.m23 + left.m13 * right.m33;
488 Scalar m20 = left.m20 * right.m00 + left.m21 * right.m10 + left.m22 * right.m20 + left.m23 * right.m30;
489 Scalar m21 = left.m20 * right.m01 + left.m21 * right.m11 + left.m22 * right.m21 + left.m23 * right.m31;
490 Scalar m22 = left.m20 * right.m02 + left.m21 * right.m12 + left.m22 * right.m22 + left.m23 * right.m32;
491 Scalar m23 = left.m20 * right.m03 + left.m21 * right.m13 + left.m22 * right.m23 + left.m23 * right.m33;
493 Scalar m30 = left.m30 * right.m00 + left.m31 * right.m10 + left.m32 * right.m20 + left.m33 * right.m30;
494 Scalar m31 = left.m30 * right.m01 + left.m31 * right.m11 + left.m32 * right.m21 + left.m33 * right.m31;
495 Scalar m32 = left.m30 * right.m02 + left.m31 * right.m12 + left.m32 * right.m22 + left.m33 * right.m32;
496 Scalar m33 = left.m30 * right.m03 + left.m31 * right.m13 + left.m32 * right.m23 + left.m33 * right.m33;
526 result.
m00 = left.
m00 * scalar;
527 result.
m01 = left.
m01 * scalar;
528 result.
m02 = left.
m02 * scalar;
529 result.
m03 = left.
m03 * scalar;
531 result.
m10 = left.
m10 * scalar;
532 result.
m11 = left.
m11 * scalar;
533 result.
m12 = left.
m12 * scalar;
534 result.
m13 = left.
m13 * scalar;
536 result.
m20 = left.
m20 * scalar;
537 result.
m21 = left.
m21 * scalar;
538 result.
m22 = left.
m22 * scalar;
539 result.
m23 = left.
m23 * scalar;
541 result.
m30 = left.
m30 * scalar;
542 result.
m31 = left.
m31 * scalar;
543 result.
m32 = left.
m32 * scalar;
544 result.
m33 = left.
m33 * scalar;
551 result.m00 = left.m00 * scalar;
552 result.m01 = left.m01 * scalar;
553 result.m02 = left.m02 * scalar;
554 result.m03 = left.m03 * scalar;
556 result.m10 = left.m10 * scalar;
557 result.m11 = left.m11 * scalar;
558 result.m12 = left.m12 * scalar;
559 result.m13 = left.m13 * scalar;
561 result.m20 = left.m20 * scalar;
562 result.m21 = left.m21 * scalar;
563 result.m22 = left.m22 * scalar;
564 result.m23 = left.m23 * scalar;
566 result.m30 = left.m30 * scalar;
567 result.m31 = left.m31 * scalar;
568 result.m32 = left.m32 * scalar;
569 result.m33 = left.m33 * scalar;
600 Scalar m00 = left.m00 * right.m00 + left.m01 * right.m10 + left.m02 * right.m20;
601 Scalar m01 = left.m00 * right.m01 + left.m01 * right.m11 + left.m02 * right.m21;
602 Scalar m02 = left.m00 * right.m02 + left.m01 * right.m12 + left.m02 * right.m22;
604 Scalar m10 = left.m10 * right.m00 + left.m11 * right.m10 + left.m12 * right.m20;
605 Scalar m11 = left.m10 * right.m01 + left.m11 * right.m11 + left.m12 * right.m21;
606 Scalar m12 = left.m10 * right.m02 + left.m11 * right.m12 + left.m12 * right.m22;
608 Scalar m20 = left.m20 * right.m00 + left.m21 * right.m10 + left.m22 * right.m20;
609 Scalar m21 = left.m20 * right.m01 + left.m21 * right.m11 + left.m22 * right.m21;
610 Scalar m22 = left.m20 * right.m02 + left.m21 * right.m12 + left.m22 * right.m22;
612 Scalar m30 = left.m30 * right.m00 + left.m31 * right.m10 + left.m32 * right.m20;
613 Scalar m31 = left.m30 * right.m01 + left.m31 * right.m11 + left.m32 * right.m21;
614 Scalar m32 = left.m30 * right.m02 + left.m31 * right.m12 + left.m32 * right.m22;
620 result.m03 = left.m03;
625 result.m13 = left.m13;
630 result.m23 = left.m23;
635 result.m33 = left.m33;
666 Scalar m00 = left.m00 * right.m00 + left.m01 * right.m10 + left.m02 * right.m20;
667 Scalar m01 = left.m00 * right.m01 + left.m01 * right.m11 + left.m02 * right.m21;
668 Scalar m02 = left.m00 * right.m02 + left.m01 * right.m12 + left.m02 * right.m22;
669 Scalar m03 = left.m00 * right.m03 + left.m01 * right.m13 + left.m02 * right.m23;
671 Scalar m10 = left.m10 * right.m00 + left.m11 * right.m10 + left.m12 * right.m20;
672 Scalar m11 = left.m10 * right.m01 + left.m11 * right.m11 + left.m12 * right.m21;
673 Scalar m12 = left.m10 * right.m02 + left.m11 * right.m12 + left.m12 * right.m22;
674 Scalar m13 = left.m10 * right.m03 + left.m11 * right.m13 + left.m12 * right.m23;
676 Scalar m20 = left.m20 * right.m00 + left.m21 * right.m10 + left.m22 * right.m20;
677 Scalar m21 = left.m20 * right.m01 + left.m21 * right.m11 + left.m22 * right.m21;
678 Scalar m22 = left.m20 * right.m02 + left.m21 * right.m12 + left.m22 * right.m22;
679 Scalar m23 = left.m20 * right.m03 + left.m21 * right.m13 + left.m22 * right.m23;
696 result.m30 = right.m30;
697 result.m31 = right.m31;
698 result.m32 = right.m32;
699 result.m33 = right.m33;
730 Scalar m00 = left.m00 * right.m00 + left.m01 * right.m10;
731 Scalar m01 = left.m00 * right.m01 + left.m01 * right.m11;
732 Scalar m02 = left.m00 * right.m02 + left.m01 * right.m12 + left.m02;
734 Scalar m10 = left.m10 * right.m00 + left.m11 * right.m10;
735 Scalar m11 = left.m10 * right.m01 + left.m11 * right.m11;
736 Scalar m12 = left.m10 * right.m02 + left.m11 * right.m12 + left.m12;
738 Scalar m20 = left.m20 * right.m00 + left.m21 * right.m10;
739 Scalar m21 = left.m20 * right.m01 + left.m21 * right.m11;
740 Scalar m22 = left.m20 * right.m02 + left.m21 * right.m12 + left.m22;
742 Scalar m30 = left.m30 * right.m00 + left.m31 * right.m10;
743 Scalar m31 = left.m30 * right.m01 + left.m31 * right.m11;
744 Scalar m32 = left.m30 * right.m02 + left.m31 * right.m12 + left.m32;
750 result.m03 = left.m03;
755 result.m13 = left.m13;
760 result.m23 = left.m23;
765 result.m33 = left.m33;
796 Scalar m00 = left.m00 * right.m00 + left.m01 * right.m10 + left.m02 * right.m20;
797 Scalar m01 = left.m00 * right.m01 + left.m01 * right.m11 + left.m02 * right.m21;
798 Scalar m02 = left.m00 * right.m02 + left.m01 * right.m12 + left.m02 * right.m22;
799 Scalar m03 = left.m00 * right.m03 + left.m01 * right.m13 + left.m02 * right.m23;
801 Scalar m10 = left.m10 * right.m00 + left.m11 * right.m10 + left.m12 * right.m20;
802 Scalar m11 = left.m10 * right.m01 + left.m11 * right.m11 + left.m12 * right.m21;
803 Scalar m12 = left.m10 * right.m02 + left.m11 * right.m12 + left.m12 * right.m22;
804 Scalar m13 = left.m10 * right.m03 + left.m11 * right.m13 + left.m12 * right.m23;
816 result.m20 = right.m20;
817 result.m21 = right.m21;
818 result.m22 = right.m22;
819 result.m23 = right.m23;
821 result.m30 = right.m30;
822 result.m31 = right.m31;
823 result.m32 = right.m32;
824 result.m33 = right.m33;
855 Scalar m00 = left.m00 * right.m00 + left.m01 * right.m10;
856 Scalar m01 = left.m00 * right.m01 + left.m01 * right.m11;
859 Scalar m10 = left.m10 * right.m00 + left.m11 * right.m10;
860 Scalar m11 = left.m10 * right.m01 + left.m11 * right.m11;
863 Scalar m20 = left.m20 * right.m00 + left.m21 * right.m10;
864 Scalar m21 = left.m20 * right.m01 + left.m21 * right.m11;
867 Scalar m30 = left.m30 * right.m00 + left.m31 * right.m10;
868 Scalar m31 = left.m30 * right.m01 + left.m31 * right.m11;
873 result.m02 = left.m02;
874 result.m03 = left.m03;
878 result.m12 = left.m12;
879 result.m13 = left.m13;
883 result.m22 = left.m22;
884 result.m23 = left.m23;
888 result.m32 = left.m32;
889 result.m33 = left.m33;
922 Scalar m00 = left.m00 * right.m00 + left.m01 * right.m10;
923 Scalar m01 = left.m00 * right.m01 + left.m01 * right.m11;
924 Scalar m02 = left.m00 * right.m02 + left.m01 * right.m12;
925 Scalar m03 = left.m00 * right.m03 + left.m01 * right.m13;
927 Scalar m10 = left.m10 * right.m00 + left.m11 * right.m10;
928 Scalar m11 = left.m10 * right.m01 + left.m11 * right.m11;
929 Scalar m12 = left.m10 * right.m02 + left.m11 * right.m12;
930 Scalar m13 = left.m10 * right.m03 + left.m11 * right.m13;
942 result.m20 = right.m20;
943 result.m21 = right.m21;
944 result.m22 = right.m22;
945 result.m23 = right.m23;
947 result.m30 = right.m30;
948 result.m31 = right.m31;
949 result.m32 = right.m32;
950 result.m33 = right.m33;
982 result.m00 = left.m00 + right.m00;
983 result.m01 = left.m01 + right.m01;
984 result.m02 = left.m02 + right.m02;
985 result.m03 = left.m03 + right.m03;
987 result.m10 = left.m10 + right.m10;
988 result.m11 = left.m11 + right.m11;
989 result.m12 = left.m12 + right.m12;
990 result.m13 = left.m13 + right.m13;
992 result.m20 = left.m20 + right.m20;
993 result.m21 = left.m21 + right.m21;
994 result.m22 = left.m22 + right.m22;
995 result.m23 = left.m23 + right.m23;
997 result.m30 = left.m30 + right.m30;
998 result.m31 = left.m31 + right.m31;
999 result.m32 = left.m32 + right.m32;
1000 result.m33 = left.m33 + right.m33;
1006 Add(ref left, ref right, out result);
1011 result.m00 = left.m00 + right.m00;
1012 result.m01 = left.m01 + right.m01;
1013 result.m02 = left.m02 + right.m02;
1014 result.m03 = right.m03;
1016 result.m10 = left.m10 + right.m10;
1017 result.m11 = left.m11 + right.m11;
1018 result.m12 = left.m12 + right.m12;
1019 result.m13 = right.m13;
1021 result.m20 = left.m20 + right.m20;
1022 result.m21 = left.m21 + right.m21;
1023 result.m22 = left.m22 + right.m22;
1024 result.m23 = right.m23;
1026 result.m30 = right.m30;
1027 result.m31 = right.m31;
1028 result.m32 = right.m32;
1029 result.m33 = 1 + right.m33;
1034 Add(ref left, ref right, out result);
1039 result.m00 = left.m00 + right.m00;
1040 result.m01 = left.m01 + right.m01;
1041 result.m02 = left.m02 + right.m02;
1042 result.m03 = left.m03;
1044 result.m10 = left.m10 + right.m10;
1045 result.m11 = left.m11 + right.m11;
1046 result.m12 = left.m12 + right.m12;
1047 result.m13 = left.m13;
1049 result.m20 = left.m20 + right.m20;
1050 result.m21 = left.m21 + right.m21;
1051 result.m22 = left.m22 + right.m22;
1052 result.m23 = left.m23;
1054 result.m30 = left.m30;
1055 result.m31 = left.m31;
1056 result.m32 = left.m32;
1057 result.m33 = left.m33 + 1;
1063 Add(ref left, ref right, out result);
1068 result.m00 = left.m00 + right.m00;
1069 result.m01 = left.m01 + right.m01;
1070 result.m02 = left.m02 + right.m02;
1071 result.m03 = right.m03;
1073 result.m10 = left.m10 + right.m10;
1074 result.m11 = left.m11 + right.m11;
1075 result.m12 = left.m12 + right.m12;
1076 result.m13 = right.m13;
1078 result.m20 = right.m20;
1079 result.m21 = right.m21;
1080 result.m22 = 1 + right.m22;
1081 result.m23 = right.m23;
1083 result.m30 = right.m30;
1084 result.m31 = right.m31;
1085 result.m32 = right.m32;
1086 result.m33 = 1 + right.m33;
1091 Add(ref left, ref right, out result);
1096 result.m00 = left.m00 + right.m00;
1097 result.m01 = left.m01 + right.m01;
1098 result.m02 = left.m02 + right.m02;
1099 result.m03 = left.m03;
1101 result.m10 = left.m10 + right.m10;
1102 result.m11 = left.m11 + right.m11;
1103 result.m12 = left.m12 + right.m12;
1104 result.m13 = left.m13;
1106 result.m20 = left.m20;
1107 result.m21 = left.m21;
1108 result.m22 = left.m22 + 1;
1109 result.m23 = left.m23;
1111 result.m30 = left.m30;
1112 result.m31 = left.m31;
1113 result.m32 = left.m32;
1114 result.m33 = left.m33 + 1;
1120 Add(ref left, ref right, out result);
1125 result.m00 = left.m00 + right.m00;
1126 result.m01 = left.m01 + right.m01;
1127 result.m02 = right.m02;
1128 result.m03 = right.m03;
1130 result.m10 = left.m10 + right.m10;
1131 result.m11 = left.m11 + right.m11;
1132 result.m12 = right.m12;
1133 result.m13 = right.m13;
1135 result.m20 = right.m20;
1136 result.m21 = right.m21;
1137 result.m22 = 1 + right.m22;
1138 result.m23 = right.m23;
1140 result.m30 = right.m30;
1141 result.m31 = right.m31;
1142 result.m32 = right.m32;
1143 result.m33 = 1 + right.m33;
1148 Add(ref left, ref right, out result);
1153 result.m00 = left.m00 + right.m00;
1154 result.m01 = left.m01 + right.m01;
1155 result.m02 = left.m02;
1156 result.m03 = left.m03;
1158 result.m10 = left.m10 + right.m10;
1159 result.m11 = left.m11 + right.m11;
1160 result.m12 = left.m12;
1161 result.m13 = left.m13;
1163 result.m20 = left.m20;
1164 result.m21 = left.m21;
1165 result.m22 = left.m22 + 1;
1166 result.m23 = left.m23;
1168 result.m30 = left.m30;
1169 result.m31 = left.m31;
1170 result.m32 = left.m32;
1171 result.m33 = left.m33 + 1;
1203 result.m00 = left.m00 - right.m00;
1204 result.m01 = left.m01 - right.m01;
1205 result.m02 = left.m02 - right.m02;
1206 result.m03 = left.m03 - right.m03;
1208 result.m10 = left.m10 - right.m10;
1209 result.m11 = left.m11 - right.m11;
1210 result.m12 = left.m12 - right.m12;
1211 result.m13 = left.m13 - right.m13;
1213 result.m20 = left.m20 - right.m20;
1214 result.m21 = left.m21 - right.m21;
1215 result.m22 = left.m22 - right.m22;
1216 result.m23 = left.m23 - right.m23;
1218 result.m30 = left.m30 - right.m30;
1219 result.m31 = left.m31 - right.m31;
1220 result.m32 = left.m32 - right.m32;
1221 result.m33 = left.m33 - right.m33;
1227 Subtract(ref left, ref right, out result);
1232 result.m00 = left.m00 - right.m00;
1233 result.m01 = left.m01 - right.m01;
1234 result.m02 = left.m02 - right.m02;
1235 result.m03 = -right.m03;
1237 result.m10 = left.m10 - right.m10;
1238 result.m11 = left.m11 - right.m11;
1239 result.m12 = left.m12 - right.m12;
1240 result.m13 = -right.m13;
1242 result.m20 = left.m20 - right.m20;
1243 result.m21 = left.m21 - right.m21;
1244 result.m22 = left.m22 - right.m22;
1245 result.m23 = -right.m23;
1247 result.m30 = -right.m30;
1248 result.m31 = -right.m31;
1249 result.m32 = -right.m32;
1250 result.m33 = 1 - right.m33;
1255 Subtract(ref left, ref right, out result);
1260 result.m00 = left.m00 - right.m00;
1261 result.m01 = left.m01 - right.m01;
1262 result.m02 = left.m02 - right.m02;
1263 result.m03 = left.m03;
1265 result.m10 = left.m10 - right.m10;
1266 result.m11 = left.m11 - right.m11;
1267 result.m12 = left.m12 - right.m12;
1268 result.m13 = left.m13;
1270 result.m20 = left.m20 - right.m20;
1271 result.m21 = left.m21 - right.m21;
1272 result.m22 = left.m22 - right.m22;
1273 result.m23 = left.m23;
1275 result.m30 = left.m30;
1276 result.m31 = left.m31;
1277 result.m32 = left.m32;
1278 result.m33 = left.m33 - 1;
1284 Subtract(ref left, ref right, out result);
1289 result.m00 = left.m00 - right.m00;
1290 result.m01 = left.m01 - right.m01;
1291 result.m02 = left.m02 - right.m02;
1292 result.m03 = -right.m03;
1294 result.m10 = left.m10 - right.m10;
1295 result.m11 = left.m11 - right.m11;
1296 result.m12 = left.m12 - right.m12;
1297 result.m13 = -right.m13;
1299 result.m20 = -right.m20;
1300 result.m21 = -right.m21;
1301 result.m22 = 1 - right.m22;
1302 result.m23 = -right.m23;
1304 result.m30 = -right.m30;
1305 result.m31 = -right.m31;
1306 result.m32 = -right.m32;
1307 result.m33 = 1 - right.m33;
1312 Subtract(ref left, ref right, out result);
1317 result.m00 = left.m00 - right.m00;
1318 result.m01 = left.m01 - right.m01;
1319 result.m02 = left.m02 - right.m02;
1320 result.m03 = left.m03;
1322 result.m10 = left.m10 - right.m10;
1323 result.m11 = left.m11 - right.m11;
1324 result.m12 = left.m12 - right.m12;
1325 result.m13 = left.m13;
1327 result.m20 = left.m20;
1328 result.m21 = left.m21;
1329 result.m22 = left.m22 - 1;
1330 result.m23 = left.m23;
1332 result.m30 = left.m30;
1333 result.m31 = left.m31;
1334 result.m32 = left.m32;
1335 result.m33 = left.m33 - 1;
1341 Subtract(ref left, ref right, out result);
1346 result.m00 = left.m00 - right.m00;
1347 result.m01 = left.m01 - right.m01;
1348 result.m02 = -right.m02;
1349 result.m03 = -right.m03;
1351 result.m10 = left.m10 - right.m10;
1352 result.m11 = left.m11 - right.m11;
1353 result.m12 = -right.m12;
1354 result.m13 = -right.m13;
1356 result.m20 = -right.m20;
1357 result.m21 = -right.m21;
1358 result.m22 = 1 - right.m22;
1359 result.m23 = -right.m23;
1361 result.m30 = -right.m30;
1362 result.m31 = -right.m31;
1363 result.m32 = -right.m32;
1364 result.m33 = 1 - right.m33;
1369 Subtract(ref left, ref right, out result);
1374 result.m00 = left.m00 - right.m00;
1375 result.m01 = left.m01 - right.m01;
1376 result.m02 = left.m02;
1377 result.m03 = left.m03;
1379 result.m10 = left.m10 - right.m10;
1380 result.m11 = left.m11 - right.m11;
1381 result.m12 = left.m12;
1382 result.m13 = left.m13;
1384 result.m20 = left.m20;
1385 result.m21 = left.m21;
1386 result.m22 = left.m22 - 1;
1387 result.m23 = left.m23;
1389 result.m30 = left.m30;
1390 result.m31 = left.m31;
1391 result.m32 = left.m32;
1392 result.m33 = left.m33 - 1;
1399 result.
m00 = -source.
m00;
1400 result.
m01 = -source.
m01;
1401 result.
m02 = -source.
m02;
1402 result.
m03 = -source.
m03;
1404 result.
m10 = -source.
m10;
1405 result.
m11 = -source.
m11;
1406 result.
m12 = -source.
m12;
1407 result.
m13 = -source.
m13;
1409 result.
m20 = -source.
m20;
1410 result.
m21 = -source.
m21;
1411 result.
m22 = -source.
m22;
1412 result.
m23 = -source.
m23;
1414 result.
m30 = -source.
m30;
1415 result.
m31 = -source.
m31;
1416 result.
m32 = -source.
m32;
1417 result.
m33 = -source.
m33;
1423 Negate(ref source, out source);
1427 result.m00 = -source.m00;
1428 result.m01 = -source.m01;
1429 result.m02 = -source.m02;
1430 result.m03 = -source.m03;
1432 result.m10 = -source.m10;
1433 result.m11 = -source.m11;
1434 result.m12 = -source.m12;
1435 result.m13 = -source.m13;
1437 result.m20 = -source.m20;
1438 result.m21 = -source.m21;
1439 result.m22 = -source.m22;
1440 result.m23 = -source.m23;
1442 result.m30 = -source.m30;
1443 result.m31 = -source.m31;
1444 result.m32 = -source.m32;
1445 result.m33 = -source.m33;
1451 Invert(ref source, out result);
1466 Scalar m22m33m32m23 = (source.m22 * source.m33 - source.m32 * source.m23);
1467 Scalar m21m33m31m23 = (source.m21 * source.m33 - source.m31 * source.m23);
1468 Scalar m21m32m31m22 = (source.m21 * source.m32 - source.m31 * source.m22);
1470 Scalar m12m33m32m13 = (
m12 * source.m33 - source.m32 *
m13);
1471 Scalar m11m33m31m13 = (
m11 * source.m33 - source.m31 *
m13);
1472 Scalar m11m32m31m12 = (
m11 * source.m32 - source.m31 *
m12);
1474 Scalar m12m23m22m13 = (
m12 * source.m23 - source.m22 *
m13);
1475 Scalar m11m23m21m13 = (
m11 * source.m23 - source.m21 *
m13);
1476 Scalar m11m22m21m12 = (
m11 * source.m22 - source.m21 *
m12);
1478 Scalar m20m33m30m23 = (source.m20 * source.m33 - source.m30 * source.m23);
1479 Scalar m20m32m30m22 = (source.m20 * source.m32 - source.m30 * source.m22);
1480 Scalar m10m33m30m13 = (
m10 * source.m33 - source.m30 *
m13);
1482 Scalar m10m32m30m12 = (
m10 * source.m32 - source.m30 *
m12);
1483 Scalar m10m23m20m13 = (
m10 * source.m23 - source.m20 *
m13);
1484 Scalar m10m22m20m12 = (
m10 * source.m22 - source.m20 *
m12);
1486 Scalar m20m31m30m21 = (source.m20 * source.m31 - source.m30 * source.m21);
1487 Scalar m10m31m30m11 = (
m10 * source.m31 - source.m30 *
m11);
1488 Scalar m10m21m20m11 = (
m10 * source.m21 - source.m20 *
m11);
1492 (
m00 * (
m11 * m22m33m32m23 -
m12 * m21m33m31m23 +
m13 * m21m32m31m22) -
1493 m01 * (
m10 * m22m33m32m23 -
m12 * m20m33m30m23 +
m13 * m20m32m30m22) +
1494 m02 * (
m10 * m21m33m31m23 -
m11 * m20m33m30m23 +
m13 * m20m31m30m21) -
1495 m03 * (
m10 * m21m32m31m22 -
m11 * m20m32m30m22 +
m12 * m20m31m30m21));
1498 result.m00 = detInv * (
m11 * m22m33m32m23 -
m12 * m21m33m31m23 +
m13 * m21m32m31m22);
1499 result.m01 = detInv * (-(
m01 * m22m33m32m23 -
m02 * m21m33m31m23 +
m03 * m21m32m31m22));
1500 result.m02 = detInv * (
m01 * m12m33m32m13 -
m02 * m11m33m31m13 +
m03 * m11m32m31m12);
1501 result.m03 = detInv * (-(
m01 * m12m23m22m13 -
m02 * m11m23m21m13 +
m03 * m11m22m21m12));
1503 result.m10 = detInv * (-(
m10 * m22m33m32m23 -
m12 * m20m33m30m23 +
m13 * m20m32m30m22));
1504 result.m11 = detInv * (
m00 * m22m33m32m23 -
m02 * m20m33m30m23 +
m03 * m20m32m30m22);
1505 result.m12 = detInv * (-(
m00 * m12m33m32m13 -
m02 * m10m33m30m13 +
m03 * m10m32m30m12));
1506 result.m13 = detInv * (
m00 * m12m23m22m13 -
m02 * m10m23m20m13 +
m03 * m10m22m20m12);
1508 result.m20 = detInv * (
m10 * m21m33m31m23 -
m11 * m20m33m30m23 +
m13 * m20m31m30m21);
1509 result.m21 = detInv * (-(
m00 * m21m33m31m23 -
m01 * m20m33m30m23 +
m03 * m20m31m30m21));
1510 result.m22 = detInv * (
m00 * m11m33m31m13 -
m01 * m10m33m30m13 +
m03 * m20m31m30m21);
1511 result.m23 = detInv * (-(
m00 * m11m23m21m13 -
m01 * m10m23m20m13 +
m03 * m10m21m20m11));
1513 result.m30 = detInv * (-(
m10 * m21m32m31m22 -
m11 * m20m32m30m22 +
m12 * m20m31m30m21));
1514 result.m31 = detInv * (
m00 * m21m32m31m22 -
m01 * m20m32m30m22 +
m02 * m20m31m30m21);
1515 result.m32 = detInv * (-(
m00 * m11m32m31m12 -
m01 * m10m32m30m12 +
m02 * m10m31m30m11));
1516 result.m33 = detInv * (
m00 * m11m22m21m12 -
m01 * m10m22m20m12 +
m02 * m10m21m20m11);
1528 Scalar m22m33m32m23 = (source.m22 * source.m33 - source.m32 * source.m23);
1529 Scalar m21m33m31m23 = (source.m21 * source.m33 - source.m31 * source.m23);
1530 Scalar m21m32m31m22 = (source.m21 * source.m32 - source.m31 * source.m22);
1532 Scalar m20m33m30m23 = (source.m20 * source.m33 - source.m30 * source.m23);
1533 Scalar m20m32m30m22 = (source.m20 * source.m32 - source.m30 * source.m22);
1534 Scalar m20m31m30m21 = (source.m20 * source.m31 - source.m30 * source.m21);
1537 source.m00 * (source.m11 * m22m33m32m23 - source.m12 * m21m33m31m23 + source.m13 * m21m32m31m22) -
1538 source.m01 * (source.m10 * m22m33m32m23 - source.m12 * m20m33m30m23 + source.m13 * m20m32m30m22) +
1539 source.m02 * (source.m10 * m21m33m31m23 - source.m11 * m20m33m30m23 + source.m13 * m20m31m30m21) -
1540 source.m03 * (source.m10 * m21m32m31m22 - source.m11 * m20m32m30m22 + source.m12 * m20m31m30m21);
1559 result.m00 = source.m00;
1560 result.m01 = source.m10;
1561 result.m02 = source.m20;
1562 result.m03 = source.m30;
1565 result.m11 = source.m11;
1566 result.m12 = source.m21;
1567 result.m13 = source.m31;
1571 result.m22 = source.m22;
1572 result.m23 = source.m32;
1577 result.m33 = source.m33;
1600 Scalar m22m33m32m23 = (source.m22 * source.m33 - source.m32 * source.m23);
1601 Scalar m21m33m31m23 = (source.m21 * source.m33 - source.m31 * source.m23);
1602 Scalar m21m32m31m22 = (source.m21 * source.m32 - source.m31 * source.m22);
1604 Scalar m12m33m32m13 = (
m12 * source.m33 - source.m32 *
m13);
1605 Scalar m11m33m31m13 = (
m11 * source.m33 - source.m31 *
m13);
1606 Scalar m11m32m31m12 = (
m11 * source.m32 - source.m31 *
m12);
1608 Scalar m12m23m22m13 = (
m12 * source.m23 - source.m22 *
m13);
1609 Scalar m11m23m21m13 = (
m11 * source.m23 - source.m21 *
m13);
1610 Scalar m11m22m21m12 = (
m11 * source.m22 - source.m21 *
m12);
1612 Scalar m20m33m30m23 = (source.m20 * source.m33 - source.m30 * source.m23);
1613 Scalar m20m32m30m22 = (source.m20 * source.m32 - source.m30 * source.m22);
1614 Scalar m10m33m30m13 = (
m10 * source.m33 - source.m30 *
m13);
1616 Scalar m10m32m30m12 = (
m10 * source.m32 - source.m30 *
m12);
1617 Scalar m10m23m20m13 = (
m10 * source.m23 - source.m20 *
m13);
1618 Scalar m10m22m20m12 = (
m10 * source.m22 - source.m20 *
m12);
1620 Scalar m20m31m30m21 = (source.m20 * source.m31 - source.m30 * source.m21);
1621 Scalar m10m31m30m11 = (
m10 * source.m31 - source.m30 *
m11);
1622 Scalar m10m21m20m11 = (
m10 * source.m21 - source.m20 *
m11);
1629 result.m00 = (
m11 * m22m33m32m23 -
m12 * m21m33m31m23 +
m13 * m21m32m31m22);
1630 result.m01 = (-(
m01 * m22m33m32m23 -
m02 * m21m33m31m23 +
m03 * m21m32m31m22));
1631 result.m02 = (
m01 * m12m33m32m13 -
m02 * m11m33m31m13 +
m03 * m11m32m31m12);
1632 result.m03 = (-(
m01 * m12m23m22m13 -
m02 * m11m23m21m13 +
m03 * m11m22m21m12));
1634 result.m10 = (-(
m10 * m22m33m32m23 -
m12 * m20m33m30m23 +
m13 * m20m32m30m22));
1635 result.m11 = (
m00 * m22m33m32m23 -
m02 * m20m33m30m23 +
m03 * m20m32m30m22);
1636 result.m12 = (-(
m00 * m12m33m32m13 -
m02 * m10m33m30m13 +
m03 * m10m32m30m12));
1637 result.m13 = (
m00 * m12m23m22m13 -
m02 * m10m23m20m13 +
m03 * m10m22m20m12);
1639 result.m20 = (
m10 * m21m33m31m23 -
m11 * m20m33m30m23 +
m13 * m20m31m30m21);
1640 result.m21 = (-(
m00 * m21m33m31m23 -
m01 * m20m33m30m23 +
m03 * m20m31m30m21));
1641 result.m22 = (
m00 * m11m33m31m13 -
m01 * m10m33m30m13 +
m03 * m20m31m30m21);
1642 result.m23 = (-(
m00 * m11m23m21m13 -
m01 * m10m23m20m13 +
m03 * m10m21m20m11));
1644 result.m30 = (-(
m10 * m21m32m31m22 -
m11 * m20m32m30m22 +
m12 * m20m31m30m21));
1645 result.m31 = (
m00 * m21m32m31m22 -
m01 * m20m32m30m22 +
m02 * m20m31m30m21);
1646 result.m32 = (-(
m00 * m11m32m31m12 -
m01 * m10m32m30m12 +
m02 * m10m31m30m11));
1647 result.m33 = (
m00 * m11m22m21m12 -
m01 * m10m22m20m12 +
m02 * m10m21m20m11);
1670 Scalar m22m33m32m23 = (source.m22 * source.m33 - source.m32 * source.m23);
1671 Scalar m21m33m31m23 = (source.m21 * source.m33 - source.m31 * source.m23);
1672 Scalar m21m32m31m22 = (source.m21 * source.m32 - source.m31 * source.m22);
1673 Scalar m12m33m32m13 = (
m12 * source.m33 - source.m32 *
m13);
1675 Scalar m11m33m31m13 = (
m11 * source.m33 - source.m31 *
m13);
1676 Scalar m11m32m31m12 = (
m11 * source.m32 - source.m31 *
m12);
1677 Scalar m12m23m22m13 = (
m12 * source.m23 - source.m22 *
m13);
1678 Scalar m11m23m21m13 = (
m11 * source.m23 - source.m21 *
m13);
1680 Scalar m11m22m21m12 = (
m11 * source.m22 - source.m21 *
m12);
1681 Scalar m20m33m30m23 = (source.m20 * source.m33 - source.m30 * source.m23);
1682 Scalar m20m32m30m22 = (source.m20 * source.m32 - source.m30 * source.m22);
1683 Scalar m10m33m30m13 = (
m10 * source.m33 - source.m30 *
m13);
1685 Scalar m10m32m30m12 = (
m10 * source.m32 - source.m30 *
m12);
1686 Scalar m10m23m20m13 = (
m10 * source.m23 - source.m20 *
m13);
1687 Scalar m10m22m20m12 = (
m10 * source.m22 - source.m20 *
m12);
1688 Scalar m20m31m30m21 = (source.m20 * source.m31 - source.m30 * source.m21);
1690 Scalar m10m31m30m11 = (
m10 * source.m31 - source.m30 *
m11);
1691 Scalar m10m21m20m11 = (
m10 * source.m21 - source.m20 *
m11);
1697 result.m00 = (-(
m11 * m22m33m32m23 -
m12 * m21m33m31m23 +
m13 * m21m32m31m22));
1698 result.m01 = ((
m01 * m22m33m32m23 -
m02 * m21m33m31m23 +
m03 * m21m32m31m22));
1699 result.m02 = (-(
m01 * m12m33m32m13 -
m02 * m11m33m31m13 +
m03 * m11m32m31m12));
1700 result.m03 = ((
m01 * m12m23m22m13 -
m02 * m11m23m21m13 +
m03 * m11m22m21m12));
1702 result.m10 = ((
m10 * m22m33m32m23 -
m12 * m20m33m30m23 +
m13 * m20m32m30m22));
1703 result.m11 = (-(
m00 * m22m33m32m23 -
m02 * m20m33m30m23 +
m03 * m20m32m30m22));
1704 result.m12 = ((
m00 * m12m33m32m13 -
m02 * m10m33m30m13 +
m03 * m10m32m30m12));
1705 result.m13 = (-(
m00 * m12m23m22m13 -
m02 * m10m23m20m13 +
m03 * m10m22m20m12));
1707 result.m20 = (-(
m10 * m21m33m31m23 -
m11 * m20m33m30m23 +
m13 * m20m31m30m21));
1708 result.m21 = ((
m00 * m21m33m31m23 -
m01 * m20m33m30m23 +
m03 * m20m31m30m21));
1709 result.m22 = (-(
m00 * m11m33m31m13 -
m01 * m10m33m30m13 +
m03 * m20m31m30m21));
1710 result.m23 = ((
m00 * m11m23m21m13 -
m01 * m10m23m20m13 +
m03 * m10m21m20m11));
1712 result.m30 = ((
m10 * m21m32m31m22 -
m11 * m20m32m30m22 +
m12 * m20m31m30m21));
1713 result.m31 = (-(
m00 * m21m32m31m22 -
m01 * m20m32m30m22 +
m02 * m20m31m30m21));
1714 result.m32 = ((
m00 * m11m32m31m12 -
m01 * m10m32m30m12 +
m02 * m10m31m30m11));
1715 result.m33 = (-(
m00 * m11m22m21m12 -
m01 * m10m22m20m12 +
m02 * m10m21m20m11));
1727#if !CompactFramework && !WindowsCE && !PocketPC && !XBOX360 && !SILVERLIGHT
1746 left.m00 == right.m00 && left.m01 == right.m01 && left.m02 == right.m02 && left.m03 == right.m03 &&
1747 left.m10 == right.m10 && left.m11 == right.m11 && left.m12 == right.m12 && left.m13 == right.m13 &&
1748 left.m20 == right.m20 && left.m21 == right.m21 && left.m22 == right.m22 && left.m23 == right.m23 &&
1749 left.m30 == right.m30 && left.m31 == right.m31 && left.m32 == right.m32 && left.m33 == right.m33;
1764 #region Constructors
1772 this.m00 =
m00; this.m01 =
m01; this.m02 =
m02; this.m03 =
m03;
1773 this.m10 =
m10; this.m11 =
m11; this.m12 =
m12; this.m13 =
m13;
1774 this.m20 =
m20; this.m21 =
m21; this.m22 =
m22; this.m23 =
m23;
1775 this.m30 =
m30; this.m31 =
m31; this.m32 =
m32; this.m33 =
m33;
1777 [InstanceConstructor(
"Rx,Ry,Rz,Rw")]
1790#if !WINDOWS_STOREAPP
1791 [
System.ComponentModel.Description(
"The First row of the Matrix4x4")]
1813#if !WINDOWS_STOREAPP
1814 [
System.ComponentModel.Description(
"The Second row of the Matrix4x4")]
1836#if !WINDOWS_STOREAPP
1837 [
System.ComponentModel.Description(
"The Third row of the Matrix4x4")]
1859#if !WINDOWS_STOREAPP
1860 [
System.ComponentModel.Description(
"The Forth row of the Matrix4x4")]
1984 return new Matrix4x4(this.m00, this.m10, this.m20, this.m30,
1985 this.m01, this.m11, this.m21, this.m31,
1986 this.m02, this.m12, this.m22, this.m32,
1987 this.m03, this.m13, this.m23, this.m33);
2029 Invert(ref
this, out result);
2043 switch (columnIndex)
2059 switch (columnIndex)
2124 return new Scalar[
Count] {
m00,
m01,
m02,
m03,
m10,
m11,
m12,
m13,
m20,
m21,
m22,
m23,
m30,
m31,
m32,
m33 };
2128 return new Scalar[
Count] {
m00,
m10,
m20,
m30,
m01,
m11,
m21,
m31,
m02,
m12,
m22,
m32,
m03,
m13,
m23,
m33 };
2136 Copy(ref
this, array, index);
2144 Copy(array, index, out
this);
2172 m00.GetHashCode() ^
m01.GetHashCode() ^
m02.GetHashCode() ^
m03.GetHashCode() ^
2173 m10.GetHashCode() ^
m11.GetHashCode() ^
m12.GetHashCode() ^
m13.GetHashCode() ^
2174 m20.GetHashCode() ^
m21.GetHashCode() ^
m22.GetHashCode() ^
m23.GetHashCode() ^
2175 m30.GetHashCode() ^
m31.GetHashCode() ^
m32.GetHashCode() ^
m33.GetHashCode();
2186 return Equals(ref
this, ref other);
2199 public Scalar this[
int rowIndex,
int columnIndex]
2209 return pM[(
ColumnCount * rowIndex) + columnIndex];
2215 ThrowHelper.CheckIndex(
"rowIndex", rowIndex,
RowCount);
2216 ThrowHelper.CheckIndex(
"columnIndex", columnIndex,
ColumnCount);
2221 pM[(
ColumnCount * rowIndex) + columnIndex] = value;
2233 public Scalar this[
int index]
2237 ThrowHelper.CheckIndex(
"index", index,
Count);
2240 fixed (
Scalar* pMatrix = &this.m00)
2242 return pMatrix[index];
2248 ThrowHelper.CheckIndex(
"index", index,
Count);
2251 fixed (
Scalar* pMatrix = &this.m00)
2253 pMatrix[index] = value;
2293 result.
m00 = left.
m00 * scalar;
2294 result.
m01 = left.
m01 * scalar;
2295 result.
m02 = left.
m02 * scalar;
2296 result.
m03 = left.
m03 * scalar;
2298 result.
m10 = left.
m10 * scalar;
2299 result.
m11 = left.
m11 * scalar;
2300 result.
m12 = left.
m12 * scalar;
2301 result.
m13 = left.
m13 * scalar;
2303 result.
m20 = left.
m20 * scalar;
2304 result.
m21 = left.
m21 * scalar;
2305 result.
m22 = left.
m22 * scalar;
2306 result.
m23 = left.
m23 * scalar;
2308 result.
m30 = left.
m30 * scalar;
2309 result.
m31 = left.
m31 * scalar;
2310 result.
m32 = left.
m32 * scalar;
2311 result.
m33 = left.
m33 * scalar;
2507 Add(ref left, ref right, out result);
2513 Add(ref left, ref right, out result);
2519 Add(ref left, ref right, out result);
2525 Add(ref left, ref right, out result);
2531 Add(ref left, ref right, out result);
2537 Add(ref left, ref right, out result);
2570 Subtract(ref left, ref right, out result);
2576 Subtract(ref left, ref right, out result);
2582 Subtract(ref left, ref right, out result);
2588 Subtract(ref left, ref right, out result);
2594 Subtract(ref left, ref right, out result);
2600 Subtract(ref left, ref right, out result);
2609 result.
m00 = -source.
m00;
2610 result.
m01 = -source.
m01;
2611 result.
m02 = -source.
m02;
2612 result.
m03 = -source.
m03;
2614 result.
m10 = -source.
m10;
2615 result.
m11 = -source.
m11;
2616 result.
m12 = -source.
m12;
2617 result.
m13 = -source.
m13;
2619 result.
m20 = -source.
m20;
2620 result.
m21 = -source.
m21;
2621 result.
m22 = -source.
m22;
2622 result.
m23 = -source.
m23;
2624 result.
m30 = -source.
m30;
2625 result.
m31 = -source.
m31;
2626 result.
m32 = -source.
m32;
2627 result.
m33 = -source.
m33;
2643 return !(left == right);
static string CreateMatrixFormatableString(int RowCount, int ColumnCount)
static string CreateMatrixFormatString(int RowCount, int ColumnCount)
static Exception GetThrowIndex(string name, int count)
static void CheckCopy(Scalar[] array, int index, int count)
int Count
Gets a 32-bit integer that represents the total number of elements in all the dimensions of IAdvanceV...
int RowCount
Gets a 32-bit integer that represents the total number of Rows in the IMatrix.
int ColumnCount
Gets a 32-bit integer that represents the total number of Columns in the IMatrix.
A 2x2 matrix which can represent rotations for 2D vectors.
A 2x3 matrix which can represent rotations around axes.
A 3x3 matrix which can represent rotations around axes.
static Matrix3x3 FromLookAt(Vector3D origin, Vector3D positiveZAxis, Vector3D onPositiveY)
static Matrix4x4 operator-(Matrix4x4 left, Matrix4x4 right)
static Matrix4x4 FromScale(Vector3D scale)
static Matrix4x4 Subtract(Matrix4x4 left, Matrix3x3 right)
static Matrix4x4 Add(Matrix4x4 left, Matrix2x2 right)
static Matrix4x4 Add(Matrix4x4 left, Matrix4x4 right)
static Matrix4x4 operator+(Matrix4x4 left, Matrix4x4 right)
static void Subtract(ref Matrix4x4 left, ref Matrix3x3 right, out Matrix4x4 result)
static Matrix4x4 FromTranslation(Vector3D translation)
Matrix4x4 Cofactor
Used to generate the Cofactor of this matrix.
static Matrix4x4 Lerp(Matrix4x4 left, Matrix4x4 right, Scalar amount)
static void Add(ref Matrix4x4 left, ref Matrix4x4 right, out Matrix4x4 result)
static void Copy(ref Matrix4x4 matrix, Scalar[] destArray, int index)
static void CopyTranspose(Scalar[] sourceArray, int index, out Matrix4x4 result)
static Matrix4x4 From2DMatrix(Matrix2x3 source)
static Matrix4x4 Subtract(Matrix4x4 left, Matrix2x3 right)
static void Subtract(ref Matrix2x3 left, ref Matrix4x4 right, out Matrix4x4 result)
static Matrix4x4 Subtract(Matrix4x4 left, Matrix4x4 right)
static Matrix4x4 FromTransposedArray(Scalar[] array)
const int ColumnCount
The number of columns.
static Matrix4x4 FromOrthographic(Scalar left, Scalar right, Scalar bottom, Scalar top, Scalar near, Scalar far)
static void GetAdjoint(ref Matrix4x4 source, out Matrix4x4 result)
static Matrix4x4 Subtract(Matrix3x3 left, Matrix4x4 right)
static Matrix4x4 Add(Matrix4x4 left, Matrix2x3 right)
Vector4D GetRow(int rowIndex)
static void GetDeterminant(ref Matrix4x4 source, out Scalar result)
static bool TryParse(string s, out Matrix4x4 result)
static Matrix4x4 Multiply(Matrix2x2 left, Matrix4x4 right)
static void Subtract(ref Matrix4x4 left, ref Matrix2x3 right, out Matrix4x4 result)
Scalar[] ToArray()
Copies the elements of the IAdvanceValueType to a new array of Scalar .
static void Subtract(ref Matrix3x3 left, ref Matrix4x4 right, out Matrix4x4 result)
static bool operator==(Matrix4x4 left, Matrix4x4 right)
static void Transpose(ref Matrix4x4 source, out Matrix4x4 result)
static Matrix4x4 Add(Matrix2x2 left, Matrix4x4 right)
static void Multiply(ref Matrix4x4 left, ref Matrix2x2 right, out Matrix4x4 result)
static readonly string FormatString
static Matrix4x4 Multiply(Matrix4x4 left, Matrix2x2 right)
string ToStringInternal(string FormatString)
static void Add(ref Matrix2x3 left, ref Matrix4x4 right, out Matrix4x4 result)
static void Add(ref Matrix4x4 left, ref Matrix2x2 right, out Matrix4x4 result)
static readonly Matrix4x4 Identity
static Matrix4x4 Add(Matrix4x4 left, Matrix3x3 right)
static void Subtract(ref Matrix4x4 left, ref Matrix4x4 right, out Matrix4x4 result)
override int GetHashCode()
static void CopyTranspose(Scalar[] sourceArray, out Matrix4x4 result)
static void Add(ref Matrix4x4 left, ref Matrix3x3 right, out Matrix4x4 result)
void CopyTransposedTo(Scalar[] array, int index)
override bool Equals(object obj)
static void FromTranslation(ref Vector3D translation, out Matrix4x4 result)
static Matrix4x4 Subtract(Matrix2x3 left, Matrix4x4 right)
Scalar[] ToTransposedArray()
static Matrix4x4 Negate(Matrix4x4 source)
static void Add(ref Matrix2x2 left, ref Matrix4x4 right, out Matrix4x4 result)
static Matrix4x4 GetAdjoint(Matrix4x4 source)
static bool Equals(ref Matrix4x4 left, ref Matrix4x4 right)
static Matrix4x4 Multiply(Matrix2x3 left, Matrix4x4 right)
void CopyTo(Scalar[] array, int index)
Copies all the elements of the IAdvanceValueType to the specified one-dimensional Array of Scalar.
void SetColumn(int columnIndex, Vector4D value)
static bool Equals(Matrix4x4 left, Matrix4x4 right)
static Matrix4x4 FromLookAt(Vector3D origin, Vector3D positiveZAxis, Vector3D onPositiveY)
static Matrix4x4 Invert(Matrix4x4 source)
static readonly Matrix4x4 Zero
const int Size
The Size of the class in bytes;
Matrix4x4 Transposed
Swap the rows of the matrix with the columns.
Matrix4x4(Scalar[] values, int index)
static Scalar GetDeterminant(Matrix4x4 source)
static void Multiply(ref Matrix3x3 left, ref Matrix4x4 right, out Matrix4x4 result)
static Matrix4x4 Subtract(Matrix4x4 left, Matrix2x2 right)
const int Count
The number of Scalar values in the class.
Matrix4x4 Inverted
written to test out a theory. a very wasteful implimentation. but works.
static Matrix4x4 operator*(Matrix4x4 left, Matrix4x4 right)
static void Copy(ref Matrix4x4 matrix, Scalar[] destArray)
static void Copy(ref Matrix3x3 source, ref Matrix4x4 dest)
static void Multiply(ref Matrix2x2 left, ref Matrix4x4 right, out Matrix4x4 result)
static void Lerp(ref Matrix4x4 left, ref Matrix4x4 right, ref Scalar amount, out Matrix4x4 result)
static Matrix4x4 Multiply(Matrix3x3 left, Matrix4x4 right)
int IAdvanceValueType. Count
static void Add(ref Matrix4x4 left, ref Matrix2x3 right, out Matrix4x4 result)
string ToString(string format)
turns the object into a string representation of itself with a special format for each Scaler in it.
Matrix4x4 Adjoint
Used to generate the adjoint of this matrix..
static void FromScale(ref Vector3D scale, out Matrix4x4 result)
static Matrix4x4 Multiply(Matrix4x4 left, Matrix2x3 right)
Scalar Determinant
Gets the determinant of this matrix.
static void Multiply(ref Matrix4x4 left, ref Matrix2x3 right, out Matrix4x4 result)
static void Multiply(ref Matrix4x4 left, ref Matrix4x4 right, out Matrix4x4 result)
static Matrix4x4 GetCofactor(Matrix4x4 source)
static Matrix4x4 Parse(string s)
override string ToString()
void CopyFrom(Scalar[] array, int index)
Copies all the elements of the IAdvanceValueType, of the specified one-dimensional Array to the IAdva...
static void Copy(Scalar[] sourceArray, int index, out Matrix4x4 result)
static Matrix4x4 Subtract(Matrix2x2 left, Matrix4x4 right)
static void Add(ref Matrix3x3 left, ref Matrix4x4 right, out Matrix4x4 result)
static void Negate(ref Matrix4x4 source, out Matrix4x4 result)
const int RowCount
The number of rows.
static Matrix4x4 Multiply(Matrix4x4 left, Scalar scalar)
static void From2DMatrix(ref Matrix2x3 source, out Matrix4x4 result)
static void Subtract(ref Matrix2x2 left, ref Matrix4x4 right, out Matrix4x4 result)
static Matrix4x4 Add(Matrix2x3 left, Matrix4x4 right)
static void Invert(ref Matrix4x4 source, out Matrix4x4 result)
void CopyTransposedFrom(Scalar[] array, int index)
static void Negate(ref Matrix4x4 source)
static Matrix4x4 Multiply(Matrix4x4 left, Matrix4x4 right)
Matrix4x4(Scalar m00, Scalar m01, Scalar m02, Scalar m03, Scalar m10, Scalar m11, Scalar m12, Scalar m13, Scalar m20, Scalar m21, Scalar m22, Scalar m23, Scalar m30, Scalar m31, Scalar m32, Scalar m33)
Matrix4x4(Scalar[] values)
static Matrix4x4 Transpose(Matrix4x4 source)
static bool operator!=(Matrix4x4 left, Matrix4x4 right)
static void Copy(Scalar[] sourceArray, out Matrix4x4 result)
static void Multiply(ref Matrix4x4 left, ref Scalar scalar, out Matrix4x4 result)
static void GetCofactor(ref Matrix4x4 source, out Matrix4x4 result)
static Matrix4x4 Multiply(Matrix4x4 left, Matrix3x3 right)
static readonly string FormatableString
static void From2DMatrix(ref Matrix3x3 source, out Matrix4x4 result)
static void Multiply(ref Matrix4x4 left, ref Matrix3x3 right, out Matrix4x4 result)
static void CopyTranspose(ref Matrix4x4 matrix, Scalar[] destArray)
static void Copy(ref Matrix2x2 source, ref Matrix4x4 dest)
static void CopyTranspose(ref Matrix4x4 matrix, Scalar[] destArray, int index)
static Matrix4x4 FromArray(Scalar[] array)
static Matrix4x4 Add(Matrix3x3 left, Matrix4x4 right)
Matrix4x4(Vector4D xAxis, Vector4D yAxis, Vector4D zAxis, Vector4D wAxis)
Vector4D GetColumn(int columnIndex)
Scalar[,] ToMatrixArray()
static Matrix4x4 From2DMatrix(Matrix3x3 source)
void SetRow(int rowIndex, Vector4D value)
static void Subtract(ref Matrix4x4 left, ref Matrix2x2 right, out Matrix4x4 result)
static void Multiply(ref Matrix2x3 left, ref Matrix4x4 right, out Matrix4x4 result)
bool Equals(Matrix4x4 other)
A Vector with 3 dimensions.
Scalar X
This is the X value.
Scalar Y
This is the Y value.
Scalar Z
This is the Z value.
A Vector with 4 dimensions.
Scalar X
This is the X value.
Scalar Y
This is the Y value.
Scalar Z
This is the Z value.
Scalar W
This is the W value.