I am working with the point cloud library which uses Eigen matrixes. I have prepared a lot of meshes that have been rotated and translated and all these changes are stored in a single ofMatrix4x4 per mesh.
My draw function for all of these meshes looks like this:
ofPushMatrix(); ofMultMatrix(modelLoaders[i].getDrawMatrix()); modelLoaders[i].drawVertices(); ofPopMatrix();
modelLoaders[i].getDrawMatrix()) retrieves an ofMatrix4x4. When I see all the meshes transformed by their matrixes they are drawn in the correct position and orientation, so far so good.
I want to use this matrix inside PCL, where it is used to transform the same meshes, PCL uses Eigen matrixes that are also row-vector (same as OF), but when I apply the matrixes to the meshes with PCL, the alignment is not correct.
I also tried to invert the matrix before I apply it with PCL, but this gives even stranger results.
Any idea on how I can take an OF matrix that is used for drawing and use it outside of OF while maintaining the orientation and translation?