• Home
  • Raw
  • Download

Lines Matching refs:mat

556     inline MatrixN<T, 2> inverse (const MatrixN<T, 2>& mat);
557 inline MatrixN<T, 3> inverse (const MatrixN<T, 3>& mat);
558 inline MatrixN<T, 4> inverse (const MatrixN<T, 4>& mat);
750 MatrixN<T, 2> MatrixN<T, N>::inverse (const MatrixN<T, 2>& mat) in inverse() argument
754 T det = mat(0, 0) * mat(1, 1) - mat(0, 1) * mat(1, 0); in inverse()
760 result(0, 0) = mat(1, 1); in inverse()
761 result(0, 1) = -mat(0, 1); in inverse()
762 result(1, 0) = -mat(1, 0); in inverse()
763 result(1, 1) = mat(0, 0); in inverse()
769 MatrixN<T, 3> MatrixN<T, N>::inverse (const MatrixN<T, 3>& mat) in inverse() argument
773 T det = mat(0, 0) * mat(1, 1) * mat(2, 2) + in inverse()
774 mat(1, 0) * mat(2, 1) * mat(0, 2) + in inverse()
775 mat(2, 0) * mat(0, 1) * mat(1, 2) - in inverse()
776 mat(0, 0) * mat(2, 1) * mat(1, 2) - in inverse()
777 mat(1, 0) * mat(0, 1) * mat(2, 2) - in inverse()
778 mat(2, 0) * mat(1, 1) * mat(0, 2); in inverse()
784 result(0, 0) = mat(1, 1) * mat(2, 2) - mat(1, 2) * mat(2, 1); in inverse()
785 result(1, 0) = mat(1, 2) * mat(2, 0) - mat(1, 0) * mat(2, 2); in inverse()
786 result(2, 0) = mat(1, 0) * mat(2, 1) - mat(1, 1) * mat(2, 0); in inverse()
787 result(0, 1) = mat(0, 2) * mat(2, 1) - mat(0, 1) * mat(2, 2); in inverse()
788 result(1, 1) = mat(0, 0) * mat(2, 2) - mat(0, 2) * mat(2, 0); in inverse()
789 result(2, 1) = mat(0, 1) * mat(2, 0) - mat(0, 0) * mat(2, 1); in inverse()
790 result(0, 2) = mat(0, 1) * mat(1, 2) - mat(0, 2) * mat(1, 1); in inverse()
791 result(1, 2) = mat(0, 2) * mat(1, 0) - mat(0, 0) * mat(1, 2); in inverse()
792 result(2, 2) = mat(0, 0) * mat(1, 1) - mat(0, 1) * mat(1, 0); in inverse()
798 MatrixN<T, 4> MatrixN<T, N>::inverse (const MatrixN<T, 4>& mat) in inverse() argument
802 T det = mat(0, 3) * mat(1, 2) * mat(2, 1) * mat(3, 1) - in inverse()
803 mat(0, 2) * mat(1, 3) * mat(2, 1) * mat(3, 1) - in inverse()
804 mat(0, 3) * mat(1, 1) * mat(2, 2) * mat(3, 1) + in inverse()
805 mat(0, 1) * mat(1, 3) * mat(2, 2) * mat(3, 1) + in inverse()
806 mat(0, 2) * mat(1, 1) * mat(2, 3) * mat(3, 1) - in inverse()
807 mat(0, 1) * mat(1, 2) * mat(2, 3) * mat(3, 1) - in inverse()
808 mat(0, 3) * mat(1, 2) * mat(2, 0) * mat(3, 1) + in inverse()
809 mat(0, 2) * mat(1, 3) * mat(2, 0) * mat(3, 1) + in inverse()
810 mat(0, 3) * mat(1, 0) * mat(2, 2) * mat(3, 1) - in inverse()
811 mat(0, 0) * mat(1, 3) * mat(2, 2) * mat(3, 1) - in inverse()
812 mat(0, 2) * mat(1, 0) * mat(2, 3) * mat(3, 1) + in inverse()
813 mat(0, 0) * mat(1, 2) * mat(2, 3) * mat(3, 1) + in inverse()
814 mat(0, 3) * mat(1, 1) * mat(2, 0) * mat(3, 2) - in inverse()
815 mat(0, 1) * mat(1, 3) * mat(2, 0) * mat(3, 2) - in inverse()
816 mat(0, 3) * mat(1, 0) * mat(2, 1) * mat(3, 2) + in inverse()
817 mat(0, 0) * mat(1, 3) * mat(2, 1) * mat(3, 2) + in inverse()
818 mat(0, 1) * mat(1, 0) * mat(2, 3) * mat(3, 2) - in inverse()
819 mat(0, 0) * mat(1, 1) * mat(2, 3) * mat(3, 2) - in inverse()
820 mat(0, 2) * mat(1, 1) * mat(2, 0) * mat(3, 3) + in inverse()
821 mat(0, 1) * mat(1, 2) * mat(2, 0) * mat(3, 3) + in inverse()
822 mat(0, 2) * mat(1, 0) * mat(2, 1) * mat(3, 3) - in inverse()
823 mat(0, 0) * mat(1, 2) * mat(2, 1) * mat(3, 3) - in inverse()
824 mat(0, 1) * mat(1, 0) * mat(2, 2) * mat(3, 3) + in inverse()
825 mat(0, 0) * mat(1, 1) * mat(2, 2) * mat(3, 3); in inverse()
831 result(0, 0) = mat(1, 2) * mat(2, 3) * mat(3, 1) - in inverse()
832 mat(1, 3) * mat(2, 2) * mat(3, 1) + in inverse()
833 mat(1, 3) * mat(2, 1) * mat(3, 2) - in inverse()
834 mat(1, 1) * mat(2, 3) * mat(3, 2) - in inverse()
835 mat(1, 2) * mat(2, 1) * mat(3, 3) + in inverse()
836 mat(1, 1) * mat(2, 2) * mat(3, 3); in inverse()
838 result(0, 1) = mat(0, 3) * mat(2, 2) * mat(3, 1) - in inverse()
839 mat(0, 2) * mat(2, 3) * mat(3, 1) - in inverse()
840 mat(0, 3) * mat(2, 1) * mat(3, 2) + in inverse()
841 mat(0, 1) * mat(2, 3) * mat(3, 2) + in inverse()
842 mat(0, 2) * mat(2, 1) * mat(3, 3) - in inverse()
843 mat(0, 1) * mat(2, 2) * mat(3, 3); in inverse()
845 result(0, 2) = mat(0, 2) * mat(1, 3) * mat(3, 1) - in inverse()
846 mat(0, 3) * mat(1, 2) * mat(3, 1) + in inverse()
847 mat(0, 3) * mat(1, 1) * mat(3, 2) - in inverse()
848 mat(0, 1) * mat(1, 3) * mat(3, 2) - in inverse()
849 mat(0, 2) * mat(1, 1) * mat(3, 3) + in inverse()
850 mat(0, 1) * mat(1, 2) * mat(3, 3); in inverse()
852 result(0, 3) = mat(0, 3) * mat(1, 2) * mat(2, 1) - in inverse()
853 mat(0, 2) * mat(1, 3) * mat(2, 1) - in inverse()
854 mat(0, 3) * mat(1, 1) * mat(2, 2) + in inverse()
855 mat(0, 1) * mat(1, 3) * mat(2, 2) + in inverse()
856 mat(0, 2) * mat(1, 1) * mat(2, 3) - in inverse()
857 mat(0, 1) * mat(1, 2) * mat(2, 3); in inverse()
859 result(1, 0) = mat(1, 3) * mat(2, 2) * mat(3, 0) - in inverse()
860 mat(1, 2) * mat(2, 3) * mat(3, 0) - in inverse()
861 mat(1, 3) * mat(2, 0) * mat(3, 2) + in inverse()
862 mat(1, 0) * mat(2, 3) * mat(3, 2) + in inverse()
863 mat(1, 2) * mat(2, 0) * mat(3, 3) - in inverse()
864 mat(1, 0) * mat(2, 2) * mat(3, 3); in inverse()
866 result(1, 1) = mat(0, 2) * mat(2, 3) * mat(3, 0) - in inverse()
867 mat(0, 3) * mat(2, 2) * mat(3, 0) + in inverse()
868 mat(0, 3) * mat(2, 0) * mat(3, 2) - in inverse()
869 mat(0, 0) * mat(2, 3) * mat(3, 2) - in inverse()
870 mat(0, 2) * mat(2, 0) * mat(3, 3) + in inverse()
871 mat(0, 0) * mat(2, 2) * mat(3, 3); in inverse()
873 result(1, 2) = mat(0, 3) * mat(1, 2) * mat(3, 0) - in inverse()
874 mat(0, 2) * mat(1, 3) * mat(3, 0) - in inverse()
875 mat(0, 3) * mat(1, 0) * mat(3, 2) + in inverse()
876 mat(0, 0) * mat(1, 3) * mat(3, 2) + in inverse()
877 mat(0, 2) * mat(1, 0) * mat(3, 3) - in inverse()
878 mat(0, 0) * mat(1, 2) * mat(3, 3); in inverse()
880 result(1, 3) = mat(0, 2) * mat(1, 3) * mat(2, 0) - in inverse()
881 mat(0, 3) * mat(1, 2) * mat(2, 0) + in inverse()
882 mat(0, 3) * mat(1, 0) * mat(2, 2) - in inverse()
883 mat(0, 0) * mat(1, 3) * mat(2, 2) - in inverse()
884 mat(0, 2) * mat(1, 0) * mat(2, 3) + in inverse()
885 mat(0, 0) * mat(1, 2) * mat(2, 3); in inverse()
887 result(2, 0) = mat(1, 1) * mat(2, 3) * mat(3, 0) - in inverse()
888 mat(1, 3) * mat(2, 1) * mat(3, 0) + in inverse()
889 mat(1, 3) * mat(2, 0) * mat(3, 1) - in inverse()
890 mat(1, 0) * mat(2, 3) * mat(3, 1) - in inverse()
891 mat(1, 1) * mat(2, 0) * mat(3, 3) + in inverse()
892 mat(1, 0) * mat(2, 1) * mat(3, 3); in inverse()
894 result(2, 1) = mat(0, 3) * mat(2, 1) * mat(3, 0) - in inverse()
895 mat(0, 1) * mat(2, 3) * mat(3, 0) - in inverse()
896 mat(0, 3) * mat(2, 0) * mat(3, 1) + in inverse()
897 mat(0, 0) * mat(2, 3) * mat(3, 1) + in inverse()
898 mat(0, 1) * mat(2, 0) * mat(3, 3) - in inverse()
899 mat(0, 0) * mat(2, 1) * mat(3, 3); in inverse()
901 result(2, 2) = mat(0, 1) * mat(1, 3) * mat(3, 0) - in inverse()
902 mat(0, 3) * mat(1, 1) * mat(3, 0) + in inverse()
903 mat(0, 3) * mat(1, 0) * mat(3, 1) - in inverse()
904 mat(0, 0) * mat(1, 3) * mat(3, 1) - in inverse()
905 mat(0, 1) * mat(1, 0) * mat(3, 3) + in inverse()
906 mat(0, 0) * mat(1, 1) * mat(3, 3); in inverse()
908 result(2, 3) = mat(0, 3) * mat(1, 1) * mat(2, 0) - in inverse()
909 mat(0, 1) * mat(1, 3) * mat(2, 0) - in inverse()
910 mat(0, 3) * mat(1, 0) * mat(2, 1) + in inverse()
911 mat(0, 0) * mat(1, 3) * mat(2, 1) + in inverse()
912 mat(0, 1) * mat(1, 0) * mat(2, 3) - in inverse()
913 mat(0, 0) * mat(1, 1) * mat(2, 3); in inverse()
915 result(3, 0) = mat(1, 2) * mat(2, 1) * mat(3, 0) - in inverse()
916 mat(1, 1) * mat(2, 2) * mat(3, 0) - in inverse()
917 mat(1, 2) * mat(2, 0) * mat(3, 1) + in inverse()
918 mat(1, 0) * mat(2, 2) * mat(3, 1) + in inverse()
919 mat(1, 1) * mat(2, 0) * mat(3, 2) - in inverse()
920 mat(1, 0) * mat(2, 1) * mat(3, 2); in inverse()
922 result(3, 1) = mat(1, 1) * mat(2, 2) * mat(3, 0) - in inverse()
923 mat(1, 2) * mat(2, 1) * mat(3, 0) + in inverse()
924 mat(1, 2) * mat(2, 0) * mat(3, 1) - in inverse()
925 mat(1, 0) * mat(2, 2) * mat(3, 1) - in inverse()
926 mat(1, 1) * mat(2, 0) * mat(3, 2) + in inverse()
927 mat(1, 0) * mat(2, 1) * mat(3, 2); in inverse()
929 result(3, 2) = mat(0, 2) * mat(1, 1) * mat(3, 0) - in inverse()
930 mat(0, 1) * mat(1, 2) * mat(3, 0) - in inverse()
931 mat(0, 2) * mat(1, 0) * mat(3, 1) + in inverse()
932 mat(0, 0) * mat(1, 2) * mat(3, 1) + in inverse()
933 mat(0, 1) * mat(1, 0) * mat(3, 2) - in inverse()
934 mat(0, 0) * mat(1, 1) * mat(3, 2); in inverse()
936 result(3, 3) = mat(0, 1) * mat(1, 2) * mat(2, 0) - in inverse()
937 mat(0, 2) * mat(1, 1) * mat(2, 0) + in inverse()
938 mat(0, 2) * mat(1, 0) * mat(2, 1) - in inverse()
939 mat(0, 0) * mat(1, 2) * mat(2, 1) - in inverse()
940 mat(0, 1) * mat(1, 0) * mat(2, 2) + in inverse()
941 mat(0, 0) * mat(1, 1) * mat(2, 2); in inverse()
1078 static Quaternion<T> create_quaternion (const Mat3d& mat) { in create_quaternion() argument
1082 T diag1 = mat(0, 0); in create_quaternion()
1083 T diag2 = mat(1, 1); in create_quaternion()
1084 T diag3 = mat(2, 2); in create_quaternion()
1092 q.v[0] = (mat(2, 1) - mat(1, 2)) / s; in create_quaternion()
1093 q.v[1] = (mat(0, 2) - mat(2, 0)) / s; in create_quaternion()
1094 q.v[2] = (mat(1, 0) - mat(0, 1)) / s; in create_quaternion()
1102 s = 2.0 * (T) sqrt(1.0 + mat(0, 0) - mat(1, 1) - mat(2, 2)); in create_quaternion()
1103 q.w = (mat(2, 1) - mat(1, 2)) / s; in create_quaternion()
1105 q.v[1] = (mat(0, 1) + mat(1, 0)) / s; in create_quaternion()
1106 q.v[2] = (mat(0, 2) + mat(2, 0)) / s; in create_quaternion()
1110 s = 2.0 * (T) sqrt(1.0 + mat(1, 1) - mat(0, 0) - mat(2, 2)); in create_quaternion()
1111 q.w = (mat(0, 2) - mat(2, 0)) / s; in create_quaternion()
1112 q.v[0] = (mat(0, 1) + mat(1, 0)) / s; in create_quaternion()
1114 q.v[2] = (mat(1, 2) + mat(2, 1)) / s; in create_quaternion()
1118 s = 2.0 * (T) sqrt(1.0 + mat(2, 2) - mat(0, 0) - mat(1, 1)); in create_quaternion()
1119 q.w = (mat(1, 0) - mat(0, 1)) / s; in create_quaternion()
1120 q.v[0] = (mat(0, 2) + mat(2, 0)) / s; in create_quaternion()
1121 q.v[1] = (mat(1, 2) + mat(2, 1)) / s; in create_quaternion()
1167 Mat3d mat; in rotation_matrix() local
1181 mat(0, 0) = 1 - 2 * (yy + zz); in rotation_matrix()
1182 mat(0, 1) = 2 * (xy - zw); in rotation_matrix()
1183 mat(0, 2) = 2 * (xz + yw); in rotation_matrix()
1184 mat(1, 0) = 2 * (xy + zw); in rotation_matrix()
1185 mat(1, 1) = 1 - 2 * (xx + zz); in rotation_matrix()
1186 mat(1, 2) = 2 * (yz - xw); in rotation_matrix()
1187 mat(2, 0) = 2 * (xz - yw); in rotation_matrix()
1188 mat(2, 1) = 2 * (yz + xw); in rotation_matrix()
1189 mat(2, 2) = 1 - 2 * (xx + yy); in rotation_matrix()
1191 return mat; in rotation_matrix()