我在 Opengl 中设置了一个转换,如下所示:
glPushMatrix();
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).
m_FTLayout.Render(m_wcCaption, m_iCaptionSize);
glPopMatrix();
这按预期工作。
但是,我想计算 3d-Boundingbox 将我的文本限制在单词空间中。我知道这个边界框相对于我的 GL 变换的坐标。
但我很难从这些计算他们的世界坐标。你能给我一些关于如何检索边界框中四个顶点的各自世界坐标的见解吗?