摘要: C语言中定义: void gluSphere(GLUquadricObj *qobj, GLdouble radius, GLint slices, GLint stacks) 参数: qobj:二次曲目对象(GLUquadricObj * qobj,初始化:cylinder_obj= gluNewQuadric();) radius :球半径; slices: Z轴方向片数,经度方向; stacks: z轴方向片数,维度方向。 描述: gluSphere draws a sphere of the given radius centered around the origin. ... 阅读全文
posted @ 2012-02-06 01:33 何解一直犯相同错误? 阅读(4291) 评论(0) 推荐(0) 编辑
摘要: glulookat函数是用来在世界坐标系中设置相机的,也就是用于设置view 变换矩阵的它的参数为别代表相机在世界坐标中的位置, 相机朝向和用于固定相机旋转的向量要对物体进行缩放,移动或旋转的话应该是用model 变换矩阵,glScalef(...); glTranslatef(...); glRotatef(...);总体来说如下: // Position(相机位置) View(相机对准的位置) Up Vector(右手法则,用于固定相机旋转的向量) gluLookAt(0, 3, 6, 0, 0, 0, 0, 100, 0); 阅读全文
posted @ 2012-02-06 00:20 何解一直犯相同错误? 阅读(299) 评论(0) 推荐(0) 编辑