Thu, 02/18/2010 - 10:42
Hello, everybody,
I have a transformation set up in Opengl like this:
glTranslated(pntPos.X(), pntPos.Y(), pntPos.Z());
glRotated(dx, 1, 0, 0);
glRotated(dy, 0, 1, 0);
glRotated(dz, 0, 0, 1);
I use this to Render a freely placeable textbox in 3d space which is based on the FTGL-Toolkit [1] (for TTF support).
The rendering is performed in a Callback-function registered within V3d_View::SetWindow(...).
This works as expected.
However, i would like to make my text hilightable and selectable using the standard OCC-functions. My approach to do this is To generate a AIS_Face wich bounds my Text. I know the coordinates of this bounding-box _relative_ to my GL-Transformation.
But i have a hard time getting their world coordinates from these. Could you give me some insight on how to retrieve the respective World coordinates of the four vertexes in the bounding Box?
Fri, 02/19/2010 - 12:43
I found a solution:
I have to build a transformation matrix relative to the identity Matrix, then transform my bounding boxes corners through this. (multiply trafo matrix with the vertex coordinates).