| 927 | |
| 928 | template <class T> |
| 929 | class_<Matrix44<T> > |
| 930 | register_Matrix44() |
| 931 | { |
| 932 | typedef PyImath::StaticFixedArray<Matrix44<T>,T,4,IndexAccessMatrixRow<Matrix44<T>,T,4> > Matrix44_helper; |
| 933 | |
| 934 | MatrixRow<T,4>::register_class(); |
| 935 | |
| 936 | class_<Matrix44<T> > matrix44_class(Matrix44Name<T>::value, Matrix44Name<T>::value,init<Matrix44<T> >("copy construction")); |
| 937 | matrix44_class |
| 938 | .def(init<>("initialize to identity")) |
| 939 | .def(init<T>("initialize all entries to a single value")) |
| 940 | .def("__init__", make_constructor(Matrix4_tuple_constructor<T>),"tuple constructor1") |
| 941 | .def("__init__", make_constructor(Matrix4_matrix_constructor<T,float>)) |
| 942 | .def("__init__", make_constructor(Matrix4_matrix_constructor<T,double>)) |
| 943 | |
| 944 | .def(init<T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T>("make from components")) |
| 945 | //.def_readwrite("x00", &Matrix44<T>::x[0][0]) |
| 946 | //.def_readwrite("x01", &Matrix44<T>::x[0][1]) |
| 947 | //.def_readwrite("x02", &Matrix44<T>::x[0][2]) |
| 948 | //.def_readwrite("x03", &Matrix44<T>::x[0][3]) |
| 949 | //.def_readwrite("x10", &Matrix44<T>::x[1][0]) |
| 950 | //.def_readwrite("x11", &Matrix44<T>::x[1][1]) |
| 951 | //.def_readwrite("x12", &Matrix44<T>::x[1][2]) |
| 952 | //.def_readwrite("x13", &Matrix44<T>::x[1][3]) |
| 953 | //.def_readwrite("x20", &Matrix44<T>::x[2][0]) |
| 954 | //.def_readwrite("x21", &Matrix44<T>::x[2][1]) |
| 955 | //.def_readwrite("x22", &Matrix44<T>::x[2][2]) |
| 956 | //.def_readwrite("x23", &Matrix44<T>::x[2][3]) |
| 957 | //.def_readwrite("x30", &Matrix44<T>::x[3][0]) |
| 958 | //.def_readwrite("x31", &Matrix44<T>::x[3][1]) |
| 959 | //.def_readwrite("x32", &Matrix44<T>::x[3][2]) |
| 960 | //.def_readwrite("x33", &Matrix44<T>::x[3][3]) |
| 961 | .def("baseTypeEpsilon", &Matrix44<T>::baseTypeEpsilon,"baseTypeEpsilon() epsilon value of the base type of the vector") |
| 962 | .staticmethod("baseTypeEpsilon") |
| 963 | .def("baseTypeMax", &Matrix44<T>::baseTypeMax,"baseTypeMax() max value of the base type of the vector") |
| 964 | .staticmethod("baseTypeMax") |
| 965 | .def("baseTypeLowest", &Matrix44<T>::baseTypeLowest,"baseTypeLowest() largest negative value of the base type of the vector") |
| 966 | .staticmethod("baseTypeLowest") |
| 967 | .def("baseTypeSmallest", &Matrix44<T>::baseTypeSmallest,"baseTypeSmallest() smallest value of the base type of the vector") |
| 968 | .staticmethod("baseTypeSmallest") |
| 969 | .def("equalWithAbsError", &Matrix44<T>::equalWithAbsError, |
| 970 | "m1.equalWithAbsError(m2,e) true if the elements " |
| 971 | "of v1 and v2 are the same with an absolute error of no more than e, " |
| 972 | "i.e., abs(m1[i] - m2[i]) <= e") |
| 973 | |
| 974 | .def("equalWithRelError", &Matrix44<T>::equalWithRelError, |
| 975 | "m1.equalWithAbsError(m2,e) true if the elements " |
| 976 | "of m1 and m2 are the same with an absolute error of no more than e, " |
| 977 | "i.e., abs(m1[i] - m2[i]) <= e * abs(m1[i])") |
| 978 | |
| 979 | // need a different version for matrix data access |
| 980 | .def("__len__", Matrix44_helper::len) |
| 981 | .def("__getitem__", Matrix44_helper::getitem) |
| 982 | //.def("__setitem__", Matrix44_helper::setitem) |
| 983 | .def("makeIdentity",&Matrix44<T>::makeIdentity,"makeIdentity() make this matrix the identity matrix") |
| 984 | .def("transpose",&Matrix44<T>::transpose,return_internal_reference<>(),"transpose() transpose this matrix") |
| 985 | .def("transposed",&Matrix44<T>::transposed,"transposed() return a transposed copy of this matrix") |
| 986 | .def("minorOf",&Matrix44<T>::minorOf,"minorOf() return matrix minor of the (row,col) element of this matrix") |
nothing calls this directly
no outgoing calls
no test coverage detected