本文整理汇总了C++中sphere::create方法的典型用法代码示例。如果您正苦于以下问题:C++ sphere::create方法的具体用法?C++ sphere::create怎么用?C++ sphere::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sphere
的用法示例。
在下文中一共展示了sphere::create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (WINDOW_X,WINDOW_Y);
glutInitWindowPosition (90,0);
glutCreateWindow ("KAKA_GL");
glClearColor (0.8, 0.72, 0.97, 1.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-WINDOW_X/2, WINDOW_X/2, -WINDOW_Y/2, WINDOW_Y/2, -WINDOW_X/2, WINDOW_X/2);
glClear (GL_COLOR_BUFFER_BIT);
glPointSize(1);
o.loadOBJ("/home/ezer/Documents/Qt/CGproject/Models/crawler1.obj");
rem.loadOBJ("/home/ezer/Documents/Qt/CGproject/Models/rem1.obj");
boom.loadOBJ("/home/ezer/Documents/Qt/CGproject/Models/boom1.obj");
hook.loadOBJ("/home/ezer/Documents/Qt/CGproject/Models/hook1.obj");
/*rem.TF1 = x_y_zCoordinate(0,0,+113.8);
rem.TF2 = x_y_zCoordinate(-0,0,-113.8);
rem.RA1 = x_y_zCoordinate(0,-13.45,-133.8);
rem.RA2 = x_y_zCoordinate(0,+13.45,-133.8);*/
rem.TF1 = x_y_zCoordinate(0,0,0);
rem.RA1 = x_y_zCoordinate(0,0,0);
rem.RA2 = x_y_zCoordinate(0,1,0);
RR = rotate_oaxis(rem.RA1,rem.RA2,30);
NN = translate(kaka);
MM = translate(x_y_zCoordinate(-kaka.x,-kaka.y,-kaka.z));
//light
light.create(20);
for(unsigned int i=0;i<light.Total_Points;i++)
{
light.Vertices[i] = LL*light.Vertices[i];
}
//light.draw();
/*for(unsigned int i=0;i<o.face_size;i++)
{
o.vertices[i] =SCS*SCE*YYY*o.vertices[i];
}*/
for(unsigned int i=0;i<o.face_size;i++)
{
o.vertices[i] =rames*LLL*o.vertices[i];
}
for(unsigned int i=0;i<rem.face_size;i++)
{
rem.vertices[i] =rames*LLL*rem.vertices[i];
}
for(unsigned int i=0;i<boom.face_size;i++)
{
boom.vertices[i] =rames*LLL*boom.vertices[i];
}
for(unsigned int i=0;i<=hook.face_size;i++)
{
hook.vertices[i] =rames*LLL*hook.vertices[i];
}
hook.vertices[hook.face_size].display();
glEnd();
glFlush ();
glutSwapBuffers();
glutSpecialFunc(special_keyboard);
glutKeyboardFunc(keyboard_event);
glutDisplayFunc(display);
//glutMouseFunc(mouse_event);
glutMainLoop();
return 0;
}