Flying Willy, See the matrix class. My guess is that this is the quat to euler rotation matrix conversion. (as below - the matrix itself is defined as the three vectors, i,j,k)
Sweenie, I do not use C++ (seems I am going to have to make the effort - if only to make sense of this sort of stuff) but maybe the code is using this to implicitly cast a quat to a matrix?
There is also some stuff on the code archives dealing with quats. Not tested though, I have never used them directly.
Sweenie, I do not use C++ (seems I am going to have to make the effort - if only to make sense of this sort of stuff) but maybe the code is using this to implicitly cast a quat to a matrix?
Matrix( const Quat &q ){ float xx=q.v.x*q.v.x,yy=q.v.y*q.v.y,zz=q.v.z*q.v.z; float xy=q.v.x*q.v.y,xz=q.v.x*q.v.z,yz=q.v.y*q.v.z; float wx=q.w*q.v.x,wy=q.w*q.v.y,wz=q.w*q.v.z; i=Vector( 1-2*(yy+zz),2*(xy-wz),2*(xz+wy) ), j=Vector( 2*(xy+wz),1-2*(xx+zz),2*(yz-wx) ), k=Vector( 2*(xz-wy),2*(yz+wx),1-2*(xx+yy) ); }
There is also some stuff on the code archives dealing with quats. Not tested though, I have never used them directly.