OpenGL - 无法调整 glutSolidIcosahedron() 的大小?
我正在更改大于默认半径 1 的形状,但似乎不起作用;这就是我正在尝试的:
void glutSolidIcosahedron(GLdouble size);
glutSolidIcosahedron(9);
没关系,我做到了(如下所示):
glScalef(9.0,9.0,9.0);
glutSolidIcosahedron();
还有其他方法吗?
I'm changing a shape bigger than default radius of 1 but doesn't seem to work; this is what I'm trying:
void glutSolidIcosahedron(GLdouble size);
glutSolidIcosahedron(9);
It's ok I did it (shown below):
glScalef(9.0,9.0,9.0);
glutSolidIcosahedron();
Is there another way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
glutSolidIcosahedron() 创建一个以原点为中心的二十面体,半径
1.0
。它不需要任何参数来调整其大小或比例。所以是的,调整其大小的唯一方法是使用 glScalef 或其他一些方法来调整当前矩阵。glutSolidIcosahedron() creates an icosahedron centered at the origin and with radius
1.0
. It does not take any parameters to adjust it's size or scale. So yes, the only way to resize it is to useglScalef
or some other method for adjusting the current matrix.