From: Ben S. <bs...@ga...> - 2003-09-22 19:43:11
|
You need to dereference your matrix pointer before accessing it like an array. Try the following code: const Matrix44f& mat = *entity->GetTransform(); Vec3f out_vec(mat[2][0], mat[2][1], mat[2][2]); cheers, -Ben > How this is the right list: What is the recommended method for grabbing an > entire column? > > Can't seem to find a general GetColumn() routine in the Matrix definition. > I can't seem to even grab the components and throw them in a vector when > the Matrix44f is a pointer. > > Matrix44f* mat = entity->GetTransform(); // GetTransform() returns > Matrix44f* > Vec3f out_vec(mat[2][0],mat[2][1],mat[2][2]); > > yields: > > error C2664: 'gmtl::Vec<DATA_TYPE,SIZE>::Vec(const DATA_TYPE &,const > DATA_TYPE &,const DATA_TYPE &)' : cannot convert parameter 1 from > 'gmtl::Matrix<DATA_TYPE,ROWS,COLS>::RowAccessor *' to 'const float &' > > Any help would be greatly appreciated. > > cheers > > E. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > ggt-devel mailing list > ggt...@li... > https://lists.sourceforge.net/lists/listinfo/ggt-devel > |