|
From: Kevin M. <ke...@su...> - 2008-06-01 19:24:32
|
what happens when you reverse your arguments?
gmtl::Vec3f myVec;
gmtl::AxisAnglef myAA;
gmtl::Quatf myQuat;
gmtl::Matrix44f myMat;
gmtl::EulerAngleXYZf myEuler;
myVec = myAA * myVec ;
myVec = myQuat * myVec ;
myVec = myMat * myVec ;
myVec = myEuler * myVec ;
I don't think it works to have the vec on the left hand side... but i could
be wrong, i haven't used this library in a few years... :)
On Sun, Jun 1, 2008 at 11:13 AM, Wouter Wognum <wo...@xs...> wrote:
> Hello there,
>
> I am trying to use GMTL in my application,
> but I am running into a lot of problems.
> A lot of the examples in the FAQ do not seem to work.
> I include gmtl.h, so that should cover everything, right?
>
> Ok, so, where to start. First of all; extracting rotation/translation
> information from a matrix doesn't work properly.
>
> The FAQ states:
>
> "You can extract the rotational data as any of GMTL's rotation data types.
> In any case, you need to use the makeRot templated function. Note that you
> need to specify which rotation data type you want to extract."
>
> followed by four examples.
>
> Two of these examples do not work; extracting the rotation in euler angles
> or quaternions works, but trying to get axis angles or a matrix fails.
>
>
> myAxisAngle = gmtl::makeRot< gmtl::AxisAnglef >( mymat )
>
>
> results in 19 errors on that line.
>
> Error 1 error C2784: 'gmtl::Coord<POS_TYPE,ROT_TYPE>
> &gmtl::set(gmtl::Coord<POS_TYPE,ROT_TYPE> &,const
> gmtl::Matrix<DATATYPE,MATROWS,MATCOLS> &)' : could not deduce template
> argument for 'gmtl::Coord<POS_TYPE,ROT_TYPE> &' from 'gmtl::AxisAnglef'
> C:\Program Files\VR Juggler 2.2.0\include\gmtl\Generate.h 1323
> Error 2 error C2784: 'gmtl::Coord<POS_TYPE,ROT_TYPE>
> &gmtl::set(gmtl::Coord<POS_TYPE,ROT_TYPE> &,const
> gmtl::Matrix<DATATYPE,MATROWS,MATCOLS> &)' : could not deduce template
> argument for 'gmtl::Coord<POS_TYPE,ROT_TYPE> &' from 'gmtl::AxisAnglef'
> C:\Program Files\VR Juggler 2.2.0\include\gmtl\Generate.h 1323
> Error 3 error C2784: 'gmtl::Matrix<DATA_TYPE,ROWS,COLS>
> &gmtl::set(gmtl::Matrix<DATA_TYPE,ROWS,COLS> &,const gmtl::Quat<DATA_TYPE>
> &)' : could not deduce template argument for
> 'gmtl::Matrix<DATA_TYPE,ROWS,COLS> &' from 'gmtl::AxisAnglef' C:\Program
> Files\VR Juggler 2.2.0\include\gmtl\Generate.h 1323
> ...and so on...
>
>
> myRotationMat = gmtl::makeRot< gmtl::Matrix44f >( mymat );
>
> results in similar errors
>
>
>
> Secondly, the makeTrans function works for Point3f and Vec3f, but not for
> Matrix44f. The following code:
>
> gmtl::Matrix44f matrix1;
> gmtl::Matrix44f matrix2;
> matrix2 = gmtl::makeTrans< gmtl::Matrix44f >( matrix1 );
>
> results in the following errors:
>
> Error 1 error C2039: 'Size' : is not a member of
> 'gmtl::Matrix<DATA_TYPE,ROWS,COLS>' C:\Program Files\VR Juggler
> 2.2.0\include\gmtl\Generate.h 122
> Error 2 error C2065: 'Size' : undeclared identifier C:\Program Files\VR
> Juggler 2.2.0\include\gmtl\Generate.h 122
> Error 3 error C2039: 'Size' : is not a member of
> 'gmtl::Matrix<DATA_TYPE,ROWS,COLS>' C:\Program Files\VR Juggler
> 2.2.0\include\gmtl\Generate.h 123
> Error 4 error C2039: 'Size' : is not a member of
> 'gmtl::Matrix<DATA_TYPE,ROWS,COLS>' C:\Program Files\VR Juggler
> 2.2.0\include\gmtl\Generate.h 125
> Error 5 error C2679: binary '=' : no operator found which takes a
> right-hand operand of type 'const float' (or there is no acceptable
> conversion) C:\Program Files\VR Juggler 2.2.0\include\gmtl\Generate.h 134
>
> The 3rd problem I encountered is the rotating of vectors.
> The FAQ says:
> "In most cases you can simply use the * operator with your vector and one
> of the rotaional data types."
>
> So I tried that, with the provided sample code:
>
> gmtl::Vec3f myVec;
> gmtl::AxisAnglef myAA;
> gmtl::Quatf myQuat;
> gmtl::Matrix44f myMat;
> gmtl::EulerAngleXYZf myEuler;
>
> myVec = myVec * myAA;
> myVec = myVec * myQuat;
> myVec = myVec * myMat;
> myVec = myVec * myEuler;
>
>
> This results in >100 errors, all of type C2784 ("could not deduce template
> argument for....")
>
>
> I'm clueless here, I am trying to use the GMTL library for basic math
> operations, but just about everything I try to do, fails.
>
> Can someone help me out?
>
>
> - Wouter
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> ggt-devel mailing list
> ggt...@li...
> https://lists.sourceforge.net/lists/listinfo/ggt-devel
>
>
--
kevin meinert | http://www.subatomicglue.com
|