00001
00002
00003
00004
00005
00006
00007
00008
00013 #ifndef typedef_h
00014 #define typedef_h
00015
00016 #include <cml/vector.h>
00017 #include <cml/matrix.h>
00018 #include <cml/quaternion.h>
00019 #include <cml/constants.h>
00020 #include <cml/mathlib/epsilon.h>
00021
00022 namespace cml {
00023
00024
00025 typedef vector< int, fixed<2> > vector2i;
00026 typedef vector< float, fixed<2> > vector2f;
00027 typedef vector< double, fixed<2> > vector2d;
00028
00029 typedef vector< int, fixed<3> > vector3i;
00030 typedef vector< float, fixed<3> > vector3f;
00031 typedef vector< double, fixed<3> > vector3d;
00032
00033 typedef vector< int, fixed<4> > vector4i;
00034 typedef vector< float, fixed<4> > vector4f;
00035 typedef vector< double, fixed<4> > vector4d;
00036
00037
00038
00039 typedef matrix< int, fixed<2,2> > matrix22i;
00040 typedef matrix< float, fixed<2,2> > matrix22f;
00041 typedef matrix< double, fixed<2,2> > matrix22d;
00042
00043 typedef matrix< int, fixed<2,2>, row_basis, row_major > matrix22i_r;
00044 typedef matrix< int, fixed<2,2>, col_basis, col_major > matrix22i_c;
00045 typedef matrix< float, fixed<2,2>, row_basis, row_major > matrix22f_r;
00046 typedef matrix< float, fixed<2,2>, col_basis, col_major > matrix22f_c;
00047 typedef matrix< double, fixed<2,2>, row_basis, row_major > matrix22d_r;
00048 typedef matrix< double, fixed<2,2>, col_basis, col_major > matrix22d_c;
00049
00050
00051 typedef matrix< int, fixed<3,3> > matrix33i;
00052 typedef matrix< float, fixed<3,3> > matrix33f;
00053 typedef matrix< double, fixed<3,3> > matrix33d;
00054
00055 typedef matrix< int, fixed<3,3>, row_basis, row_major > matrix33i_r;
00056 typedef matrix< int, fixed<3,3>, col_basis, col_major > matrix33i_c;
00057 typedef matrix< float, fixed<3,3>, row_basis, row_major > matrix33f_r;
00058 typedef matrix< float, fixed<3,3>, col_basis, col_major > matrix33f_c;
00059 typedef matrix< double, fixed<3,3>, row_basis, row_major > matrix33d_r;
00060 typedef matrix< double, fixed<3,3>, col_basis, col_major > matrix33d_c;
00061
00062
00063 typedef matrix< int, fixed<4,4> > matrix44i;
00064 typedef matrix< float, fixed<4,4> > matrix44f;
00065 typedef matrix< double, fixed<4,4> > matrix44d;
00066
00067 typedef matrix< int, fixed<4,4>, row_basis, row_major > matrix44i_r;
00068 typedef matrix< int, fixed<4,4>, col_basis, col_major > matrix44i_c;
00069 typedef matrix< float, fixed<4,4>, row_basis, row_major > matrix44f_r;
00070 typedef matrix< float, fixed<4,4>, col_basis, col_major > matrix44f_c;
00071 typedef matrix< double, fixed<4,4>, row_basis, row_major > matrix44d_r;
00072 typedef matrix< double, fixed<4,4>, col_basis, col_major > matrix44d_c;
00073
00074
00075 typedef matrix< int, fixed<3,2>, row_basis, row_major > matrix32i_r;
00076 typedef matrix< float, fixed<3,2>, row_basis, row_major > matrix32f_r;
00077 typedef matrix< double, fixed<3,2>, row_basis, row_major > matrix32d_r;
00078
00079 typedef matrix< int, fixed<2,3>, col_basis, col_major > matrix23i_c;
00080 typedef matrix< float, fixed<2,3>, col_basis, col_major > matrix23f_c;
00081 typedef matrix< double, fixed<2,3>, col_basis, col_major > matrix23d_c;
00082
00083 typedef matrix< int, fixed<4,3>, row_basis, row_major > matrix43i_r;
00084 typedef matrix< float, fixed<4,3>, row_basis, row_major > matrix43f_r;
00085 typedef matrix< double, fixed<4,3>, row_basis, row_major > matrix43d_r;
00086
00087 typedef matrix< int, fixed<3,4>, col_basis, col_major > matrix34i_c;
00088 typedef matrix< float, fixed<3,4>, col_basis, col_major > matrix34f_c;
00089 typedef matrix< double, fixed<3,4>, col_basis, col_major > matrix34d_c;
00090
00091
00092
00093 typedef quaternion<float, fixed<>,vector_first,negative_cross>
00094 quaternionf_n;
00095 typedef quaternion<float, fixed<>,vector_first,positive_cross>
00096 quaternionf_p;
00097 typedef quaternion<double,fixed<>,vector_first,negative_cross>
00098 quaterniond_n;
00099 typedef quaternion<double,fixed<>,vector_first,positive_cross>
00100 quaterniond_p;
00101 typedef quaternion<float> quaternionf;
00102 typedef quaternion<double> quaterniond;
00103
00104
00105
00106 typedef vector< int, dynamic<> > vectori;
00107 typedef vector< float, dynamic<> > vectorf;
00108 typedef vector< double, dynamic<> > vectord;
00109
00110
00111
00112 typedef matrix< int, dynamic<> > matrixi;
00113 typedef matrix< float, dynamic<> > matrixf;
00114 typedef matrix< double, dynamic<> > matrixd;
00115
00116 typedef matrix< int, dynamic<>, row_basis, row_major > matrixi_r;
00117 typedef matrix< int, dynamic<>, col_basis, col_major > matrixi_c;
00118 typedef matrix< float, dynamic<>, row_basis, row_major > matrixf_r;
00119 typedef matrix< float, dynamic<>, col_basis, col_major > matrixf_c;
00120 typedef matrix< double, dynamic<>, row_basis, row_major > matrixd_r;
00121 typedef matrix< double, dynamic<>, col_basis, col_major > matrixd_c;
00122
00123
00124
00125 typedef constants<float> constantsf;
00126 typedef constants<double> constantsd;
00127
00128
00129 typedef epsilon<float> epsilonf;
00130 typedef epsilon<double> epsilond;
00131
00132 }
00133
00134 #endif