Search code examples
openglmatrixprojectioncollada

Projection Matrix Found in Collada Scene


I have a question concerning a current projection matrix that i need to add for a model rendered in opengl. The projection matrix is found in a collada file for placing a Group in a different location/rotation than other group such as wheels of a bike and the body of the bike. The projection matrix of a model group goes like this:

<matrix>
    0.02081 0.01211 0.45265 -0.41217 
    -0.02644 0.0902 -0.04717 0.31703 
    -0.13606 -0.01567 0.07841 0.14996 
    0.0 0.0 0.0 1.0 
</matrix>

How can i implement this for rotation and translation of the read group in order to render the whole model correctly in opengl as its drawn in the CAD software used? Please supply me with a link if there is an easy way to do it like a premade library that directly apply the projection matrix or the better option is a link to understand how to implement and read that matrix. Please reply as soon as possible and thanks in advance.


Solution

  • This is probably not the whole projection, but just the modelview matrix. Load it into OpenGL<3 using glLoadMatrix or glMultMatrix, depending on, if the matrices are stored in a transformation heirachy.