Archived

This topic is now archived and is closed to further replies.

problem with glt and matrix transformation

This topic is 5539 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to have a part of my transformation matrix in glt matrix format so that I will be able to do excact picking in a polygon. When I tested thing, things did not work out the way I though them to. I started testing a bit and the matrix transformations does not seem do do the same thing in glt and openGL Here are two snippets of code that after what I can understand should do the same. This is not the case though, can somebody help me out here?
mapTransMatrix.identity();
mapTransMatrix = matrixRotate(Vector(1.0f,0.0f,0.0f),90.0f) *mapTransMatrix;
mapTransMatrix *= matrixScale(Vector(m_mapSize.x,m_mapSize.y,-Z_SCALE_FACTOR));
mapTransMatrix.glMultMatrix();
 
The second one is done with only with opengl:
glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
glScalef(m_mapSize.x,m_mapSize.y,-Z_SCALE_FACTOR);
 
From what I can see these two ways of updating the model view should be equal, but when I try compare the results, they it is not equal. Why is that? Utopico

Share this post


Link to post
Share on other sites