hello, I use visual studio 2008. In one of my project, I create two quaternion lets say Quaternion a, b;
than a = b; this line gives error
\..\Amazing3d\AmzMain\source\amzEntity.cpp(11) : error C2243: 'type cast' : conversion from 'amz::Quaternion *' to 'const vmml::vector<M,T> &' exists, but is inaccessible
1> with
1> [
1> M=4,
1> T=float
1> ]
Quaternion is a typedef "typedef vmml::quaternion<float> Quaternion;"
I looked at quaternion.hpp file and found this
template<typenameT>classquaternion:[b]private[/b] vector< 4, T >{public:typedefvector<4,T>super;usingsuper::operator();usingsuper::operator=;
= operator comes from vector<4,T> but it inherited as private, I believe this is the source of error. I change it to public and my code worked fine, before going any further with this change, I just wanted to ask you about this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I figured this out, changing from private to public is such a bad idea ( cause it seems that this change will allow quaternion to access all vector's public functionality ) however I still don't know why I get this error ?
it says quaternion* however left hand side is not even a pointer
Quaternion a,b;
a=b; this line generates the same error. Even in "quaternion_test.cpp" same error happens.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
2>D:\amz\Amazing3d\Dependencies\vmmlib/matrix.hpp(2496) : warning C4003: not enough actual parameters for macro 'max'
2>D:\amz\Amazing3d\Dependencies\vmmlib/matrix.hpp(2497) : warning C4003: not enough actual parameters for macro 'min'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello, I use visual studio 2008. In one of my project, I create two quaternion lets say Quaternion a, b;
than a = b; this line gives error
\..\Amazing3d\AmzMain\source\amzEntity.cpp(11) : error C2243: 'type cast' : conversion from 'amz::Quaternion *' to 'const vmml::vector<M,T> &' exists, but is inaccessible
1> with
1> [
1> M=4,
1> T=float
1> ]
Quaternion is a typedef "typedef vmml::quaternion<float> Quaternion;"
I looked at quaternion.hpp file and found this
= operator comes from vector<4,T> but it inherited as private, I believe this is the source of error. I change it to public and my code worked fine, before going any further with this change, I just wanted to ask you about this.
I figured this out, changing from private to public is such a bad idea ( cause it seems that this change will allow quaternion to access all vector's public functionality ) however I still don't know why I get this error ?
it says quaternion* however left hand side is not even a pointer
Quaternion a,b;
a=b; this line generates the same error. Even in "quaternion_test.cpp" same error happens.
this is my most innocent attempt to solve problem
it works for me.
I also add these two line to vmmlib_config.hpp
#undef max
#undef min
because of these warnings
2>D:\amz\Amazing3d\Dependencies\vmmlib/matrix.hpp(2496) : warning C4003: not enough actual parameters for macro 'max'
2>D:\amz\Amazing3d\Dependencies\vmmlib/matrix.hpp(2497) : warning C4003: not enough actual parameters for macro 'min'
Thanks, I added some explicit quat and vec4 operator= and operator== and operator!=.