For editor purposes i want to change my matrix class which for now is
template <class T> class Matrix44 {
template <class T> class Matrix44
however i would like to multiply lets say Matrix44<float> with Matrix44<double> i could do this by adding
template <class T, class T2> class Matrix44
But this would require me to define every matrix44 as <float, double> etc. which is not an option since i have hundreds of such vars. The change in code would be significant if not i would have to rewrite tenth thousands lines of code.
Maybe theres a quick solution to this
I woukld like to multiple world matrix by viewmatrix and projection matrix thus world matrix would be double and rest would be float
so for now i have
Matrix44<T> operator *(Matrix44<T> mat) which forces me to use only one type.
There should be a way to use other type
Matrix44<T> operator *(Matrix44<T2> mat)
any thoughts?
↧