I need to know the effective coordinates of a triangle after applying transformations (rotations & translations) to the current (MODELVIEW) matrix.
That is, given a vertex P, I want to calculate, for instance, the new coordinates of P after a rotation of 90º on the x-axis.
How can I do that? Is it also possible to use only OpenGL matrix operations to do this?
Thanks in advance for any tips.
Edit: The easy one is translation. I implemented it as
#define T(x, v) (x+v)
where I apply T to every coordinate of every vertex.
But what about rotation over a specific axis. Can you please give me some hint?