本文整理汇总了C++中YsAtt3::Set方法的典型用法代码示例。如果您正苦于以下问题:C++ YsAtt3::Set方法的具体用法?C++ YsAtt3::Set怎么用?C++ YsAtt3::Set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YsAtt3
的用法示例。
在下文中一共展示了YsAtt3::Set方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MainLoop
void YsClassSample::MainLoop(void)
{
int lb,mb,rb;
long mx,my;
eyeDistance=10.0;
eyeLookAt.Set(0.0,0.0,0.0);
eyeAtt.Set(0.0,0.0,0.0);
pointOfInterest.Set(0.0,0.0,-1.0);
PrepareSquare(p);
PrepareSquare(q);
RotatePolygon(q,YsDegToRad(90.0),0.0);
PrepareSquare(r);
RotatePolygon(r,0.0,YsDegToRad(90.0));
BiMouse(&lb,&mb,&rb,&mx,&my);
mouseMode=0;
while((key=BiInkey())!=BIKEY_ESC)
{
BIPROJ prj;
BiUpdateDevice();
BiGetStdProjection(&prj);
BiSetProjection(&prj);
Key(key);
Display();
lastX=mx;
lastY=my;
BiMouse(&lb,&mb,&rb,&mx,&my);
if(lb==BI_ON && (mx!=lastX || my!=lastY))
{
Motion(mx,my);
}
}
}
示例2: main
int main(int argc, char** argv)
{
InitYsClass();
PrepareShell(sh1);
PrepareShell(sh2);
printf("Keys\n");
printf("A....Viewing Rotation Mode\n");
printf("B....Viewing Translation (Scroll) Mode\n");
printf("C....Rotate Shell 1\n");
printf("D....Move Shell 1\n");
printf("E....Rotate Shell 2\n");
printf("F....Move Shell 2\n");
printf("G....Polygon/Wireframe\n");
printf("O....Or(UNION)\n");
printf("I....And(INTERSECTION)\n");
printf("S....Minus(DIFFERENCE)\n");
printf("Z....Zoom\n");
printf("M....Mooz\n");
printf("----------\n");
eyeAtt.Set(0.0,0.0,0.0);
eyeDistance=10.0;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(500, 500);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
InitOpenGL();
glutDisplayFunc(Display);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Keyboard);
glutMouseFunc(Mouse);
glutMotionFunc(Motion);
glutIdleFunc(Idle);
glutMainLoop();
return 0;
}
示例3: main
int main(int argc, char** argv)
{
InitYsClass();
PrepareSquare(p);
PrepareSquare(q);
RotatePolygon(q,YsDegToRad(90.0),0.0);
PrepareSquare(r);
RotatePolygon(r,0.0,YsDegToRad(90.0));
printf("Keys\n");
printf("A....Viewing Rotation Mode\n");
printf("B....Viewing Translation (Scroll) Mode\n");
printf("C....Rotate polygon 1(Target Polygon)\n");
printf("D....Rotate polygon 2(Slasher)\n");
printf("E....Rotate polygon 3(Slasher)\n");
printf("Z....Zoom\n");
printf("M....Mooz\n");
printf("----------\n");
mouseMode=3;
eyeAtt.Set(0.0,0.0,0.0);
eyeDistance=10.0;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(500, 500);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
InitOpenGL();
glutDisplayFunc(Display);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Keyboard);
glutMouseFunc(Mouse);
glutMotionFunc(Motion);
glutIdleFunc(Idle);
glutMainLoop();
return 0;
}
示例4: main
int main(int argc, char** argv)
{
InitYsClass();
axisOfOrbit.Set(1.0,1.0,1.0);
axisOfOrbit.Normalize();
orbiter=axisOfOrbit.GetArbitraryParpendicularVector();
orbiter.Normalize();
rot.Set(axisOfOrbit,0.0);
printf("Keys\n");
printf("A....Viewing Rotation Mode\n");
printf("B....Viewing Translation (Scroll) Mode\n");
printf("Z....Zoom\n");
printf("M....Mooz\n");
printf("----------\n");
eyeAtt.Set(YsPi/2.0,0.0,0.0);
eyeDistance=10.0;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(500, 500);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
InitOpenGL();
glutDisplayFunc(Display);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Keyboard);
glutMouseFunc(Mouse);
glutMotionFunc(Motion);
glutIdleFunc(Idle);
glutMainLoop();
return 0;
}
示例5: main
int main(int argc, char** argv)
{
int i;
InitYsClass();
for(i=0; i<nVtx; i++)
{
vtx[i].Set(&v[i*3]);
}
printf("Keys\n");
printf("A....Viewing Rotation Mode\n");
printf("B....Viewing Translation (Scroll) Mode\n");
printf("Z....Zoom\n");
printf("M....Mooz\n");
printf("----------\n");
eyeAtt.Set(0.0,0.0,0.0);
eyeDistance=10.0;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(500, 500);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
InitOpenGL();
glutDisplayFunc(Display);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Keyboard);
glutMouseFunc(Mouse);
glutMotionFunc(Motion);
glutIdleFunc(Idle);
glutMainLoop();
return 0;
}