Ok, so I've tried reading over the other questions and something's just not clicking for me. I am working on an augmented reality application using ARToolkit, however it should just be straight OpenGL matrix math.
So, one of my fiducial markers is considered to be my global coordinate base. So I have an x,y,z that I pull out of the ARToolkit transform matrix (this would be something like trans, trans, trans). I am feeding that into a glTranslated() call in order to move my objects around, relative to the origin.
Now, when I use another marker, those are recognized with their own local coordinates. I need to transform them into the coordinates of the original marker, and that is where I'm having issues. I can pull out the x,y,z coordinates easy enough, but taking that relative to the origin is my issue.
So my understanding was that I could somehow create my global coordinates, take the inverse, multiply those by the new coordinates, and that would give me the coordinates of the new object relative to the origin. I think my issue is in figuring out how to add those in properly to a matrix, since I'm dealing with x,y,z coords separately.
Any help would be appreciated...I'm doing this all in C as well, so no nifty STL functionality for me.