【发布时间】:2014-10-04 20:37:01
【问题描述】:
假设我在(50,60,20) 点有一个绘图,我想在桌子的每一侧旋转它。
下图的基础,我想将绿色圆圈旋转到右侧,背面和左侧。我的实现是
glRotatef(plate_rotate, 50, 0, 0); 因为这将在表格的中间,顶点 x = 50。但是这不起作用。
glRotatef(90, 50, 0, 0); would not work.
Table dimension
int xL = 25;
int xR = 75;
int yT = 60;
int yB = 55;
int zF = 25;
int zB = -25;
static float tableTop[8][3] =
{
{ xL, yT, zF },
{ xR, yT, zF },
{ xR, yT, zB },
{ xL, yT, zB },
//bottom
{ xL, yB, zF },
{ xR, yB, zF },
{ xR, yB, zB },
{ xL, yB, zB },
};
【问题讨论】:
-
什么是
centerglRotate()?那不是OpenGL函数。你是说glRotate()吗? -
请在您的问题中提供更多详细信息:目前无法回答。特别是,提供
centerglRotatef的代码,以及使用它的完整场景。 -
对不起,我的意思是 glRotatef
标签: c++ opengl graphics rotation