matrix-rotation problem


i am doing the following:
i have an object, position and orientation are stored
in a translationMatrix and a rotationMatrix. when rendering
the object, i compose a transformationMatrix with them.

now i want to rotate the object around its own z-axis.
i try to do that by multiplying the rotationMatrix with another
rotationMatrix representing a rotation around the z-axis.

but my object rotates around (0/0/0), not the objects position!
i seem to have followed the example i found in the article from
diana gruber, but the effect i get is not the one i wanted …
what is wrong?


Sounds like a classic problem with understanding of the order of matrix operations. Browse through some of the recent posts, there are a few dealing with this. Also, reading the chapter that deals with this in the Red Book would be a good idea.

read my thread about
object v. world rotation, i am trying to figure out how to implement object rotation.

glRotate(…) all rotate around the world coordinates not the object ones, which is why you need to manually keep track of rotations performed on the object to get the desired effect.

i am still struggling