亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? projection.c

?? OpenGL的大海量資料收集
?? C
?? 第 1 頁 / 共 2 頁
字號:
        invert(modelview, inverse);        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);        if (world_draw) {        glEnable(GL_LIGHTING);        glPushMatrix();        glMultMatrixd(inverse);        glLightfv(GL_LIGHT0, GL_POSITION, light_pos);        glPopMatrix();        drawmodel();        glDisable(GL_LIGHTING);    }        glPushMatrix();        glMultMatrixd(inverse);        glLightfv(GL_LIGHT0, GL_POSITION, light_pos);        /* draw the axis and eye vector */    glPushMatrix();    glColor3ub(0, 0, 255);    glBegin(GL_LINE_STRIP);    glVertex3f(0.0, 0.0, 0.0);    glVertex3f(0.0, 0.0, -1.0*length);    glVertex3f(0.1, 0.0, -0.9*length);    glVertex3f(-0.1, 0.0, -0.9*length);    glVertex3f(0.0, 0.0, -1.0*length);    glVertex3f(0.0, 0.1, -0.9*length);    glVertex3f(0.0, -0.1, -0.9*length);    glVertex3f(0.0, 0.0, -1.0*length);    glEnd();    glColor3ub(255, 255, 0);    glRasterPos3f(0.0, 0.0, -1.1*length);    glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, 'e');    glColor3ub(255, 0, 0);    glScalef(0.4, 0.4, 0.4);    drawaxes();    glPopMatrix();        invert(projection, inverse);    glMultMatrixd(inverse);        /* draw the viewing frustum */    glColor3f(0.2, 0.2, 0.2);    glBegin(GL_QUADS);    glVertex3i(1, 1, 1);    glVertex3i(-1, 1, 1);    glVertex3i(-1, -1, 1);    glVertex3i(1, -1, 1);    glEnd();        glColor3ub(128, 196, 128);    glBegin(GL_LINES);    glVertex3i(1, 1, -1);    glVertex3i(1, 1, 1);    glVertex3i(-1, 1, -1);    glVertex3i(-1, 1, 1);    glVertex3i(-1, -1, -1);    glVertex3i(-1, -1, 1);    glVertex3i(1, -1, -1);    glVertex3i(1, -1, 1);    glEnd();        glEnable(GL_BLEND);    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);    glColor4f(0.2, 0.2, 0.4, 0.5);    glBegin(GL_QUADS);    glVertex3i(1, 1, -1);    glVertex3i(-1, 1, -1);    glVertex3i(-1, -1, -1);    glVertex3i(1, -1, -1);    glEnd();    glDisable(GL_BLEND);        glPopMatrix();    glutSwapBuffers();}voidworld_menu(int value){    switch (value) {    case 'm':        world_draw = !world_draw;        break;    }    redisplay_all();}voidscreen_reshape(int width, int height){    glViewport(0, 0, width, height);    glMatrixMode(GL_PROJECTION);    glLoadIdentity();    if (mode == PERSPECTIVE)        gluPerspective(perspective[0].value, perspective[1].value,         perspective[2].value, perspective[3].value);    else if (mode == ORTHO)        glOrtho(ortho[0].value, ortho[1].value, ortho[2].value,        ortho[3].value, ortho[4].value, ortho[5].value);    else if (mode == FRUSTUM)        glFrustum(frustum[0].value, frustum[1].value, frustum[2].value,        frustum[3].value, frustum[4].value, frustum[5].value);    glGetDoublev(GL_PROJECTION_MATRIX, projection);    glMatrixMode(GL_MODELVIEW);    glLoadIdentity();    gluLookAt(lookat[0].value, lookat[1].value, lookat[2].value,        lookat[3].value, lookat[4].value, lookat[5].value,        lookat[6].value, lookat[7].value, lookat[8].value);    glGetDoublev(GL_MODELVIEW_MATRIX, modelview);    glClearColor(0.2, 0.2, 0.2, 0.0);    glEnable(GL_DEPTH_TEST);    glEnable(GL_LIGHTING);    glEnable(GL_LIGHT0);}voidscreen_display(void){    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);    drawmodel();    glutSwapBuffers();}voidscreen_menu(int value){    char* name = 0;        switch (value) {    case 'a':        name = "data/al.obj";        break;    case 's':        name = "data/soccerball.obj";        break;    case 'd':        name = "data/dolphins.obj";        break;    case 'f':        name = "data/flowers.obj";        break;    case 'j':        name = "data/f-16.obj";        break;    case 'p':        name = "data/porsche.obj";        break;    case 'r':        name = "data/rose+vase.obj";        break;    }        if (name) {        pmodel = glmReadOBJ(name);        if (!pmodel) exit(0);        glmUnitize(pmodel);        glmFacetNormals(pmodel);        glmVertexNormals(pmodel, 90.0);    }        redisplay_all();}voidcommand_reshape(int width, int height){    glViewport(0, 0, width, height);    glMatrixMode(GL_PROJECTION);    glLoadIdentity();    gluOrtho2D(0, width, height, 0);    glMatrixMode(GL_MODELVIEW);    glLoadIdentity();    glClearColor(0.0, 0.0, 0.0, 0.0);}voidcommand_display(void){    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);        glColor3ub(255,255,255);        setfont("helvetica", 18);        if (mode == PERSPECTIVE) {        drawstr(180, perspective[0].y-40, "fovy");         drawstr(230, perspective[0].y-40, "aspect");         drawstr(300, perspective[0].y-40, "zNear");         drawstr(360, perspective[0].y-40, "zFar");    } else {        drawstr(120, perspective[0].y-40, "left");         drawstr(180, perspective[0].y-40, "right");         drawstr(230, perspective[0].y-40, "bottom");        drawstr(310, perspective[0].y-40, "top");         drawstr(360, perspective[0].y-40, "near");        drawstr(420, perspective[0].y-40, "far");    }        if (mode == PERSPECTIVE) {        drawstr(40, perspective[0].y, "gluPerspective(");        drawstr(230, perspective[0].y, ",");         drawstr(290, perspective[0].y, ",");        drawstr(350, perspective[0].y, ",");        drawstr(410, perspective[0].y, ");");    } else if (mode == FRUSTUM) {        drawstr(20, frustum[0].y, "glFrustum(");        drawstr(170, frustum[0].y, ",");        drawstr(230, frustum[0].y, ",");         drawstr(290, frustum[0].y, ",");        drawstr(350, frustum[0].y, ",");        drawstr(410, frustum[0].y, ",");         drawstr(470, frustum[0].y, ");");    } else {        drawstr(35, ortho[0].y, "glOrtho(");        drawstr(170, ortho[0].y, ",");        drawstr(230, ortho[0].y, ",");         drawstr(290, ortho[0].y, ",");        drawstr(350, ortho[0].y, ",");        drawstr(410, ortho[0].y, ",");         drawstr(470, ortho[0].y, ");");    }        drawstr(78, lookat[0].y, "gluLookAt(");    drawstr(230, lookat[0].y, ",");     drawstr(290, lookat[0].y, ",");    drawstr(350, lookat[0].y, ",");    drawstr(380, lookat[0].y, "<- eye");    drawstr(230, lookat[3].y, ",");     drawstr(290, lookat[3].y, ",");    drawstr(350, lookat[3].y, ",");    drawstr(380, lookat[3].y, "<- center");    drawstr(230, lookat[6].y, ",");     drawstr(290, lookat[6].y, ",");    drawstr(350, lookat[6].y, ");");    drawstr(380, lookat[6].y, "<- up");        if (mode == PERSPECTIVE) {        cell_draw(&perspective[0]);        cell_draw(&perspective[1]);        cell_draw(&perspective[2]);        cell_draw(&perspective[3]);     } else if (mode == FRUSTUM) {        cell_draw(&frustum[0]);        cell_draw(&frustum[1]);        cell_draw(&frustum[2]);        cell_draw(&frustum[3]);        cell_draw(&frustum[4]);        cell_draw(&frustum[5]);    } else if (mode == ORTHO) {        cell_draw(&ortho[0]);        cell_draw(&ortho[1]);        cell_draw(&ortho[2]);        cell_draw(&ortho[3]);        cell_draw(&ortho[4]);        cell_draw(&ortho[5]);    }           cell_draw(&lookat[0]);    cell_draw(&lookat[1]);    cell_draw(&lookat[2]);    cell_draw(&lookat[3]);    cell_draw(&lookat[4]);    cell_draw(&lookat[5]);    cell_draw(&lookat[6]);    cell_draw(&lookat[7]);    cell_draw(&lookat[8]);        if (!selection) {        glColor3ub(255, 255, 0);        drawstr(10, 240,            "Click on the arguments and move the mouse to modify values.");    }           glutSwapBuffers();}int old_y;voidcommand_mouse(int button, int state, int x, int y){    selection = 0;        if (state == GLUT_DOWN) {        if (mode == PERSPECTIVE) {        /* mouse should only hit _one_ of the cells, so adding up all            the hits just propagates a single hit. */            selection += cell_hit(&perspective[0], x, y);            selection += cell_hit(&perspective[1], x, y);            selection += cell_hit(&perspective[2], x, y);            selection += cell_hit(&perspective[3], x, y);        } else if (mode == FRUSTUM) {            selection += cell_hit(&frustum[0], x, y);            selection += cell_hit(&frustum[1], x, y);            selection += cell_hit(&frustum[2], x, y);            selection += cell_hit(&frustum[3], x, y);            selection += cell_hit(&frustum[4], x, y);            selection += cell_hit(&frustum[5], x, y);        } else if (mode == ORTHO) {            selection += cell_hit(&ortho[0], x, y);            selection += cell_hit(&ortho[1], x, y);            selection += cell_hit(&ortho[2], x, y);            selection += cell_hit(&ortho[3], x, y);            selection += cell_hit(&ortho[4], x, y);            selection += cell_hit(&ortho[5], x, y);        }        selection += cell_hit(&lookat[0], x, y);        selection += cell_hit(&lookat[1], x, y);        selection += cell_hit(&lookat[2], x, y);        selection += cell_hit(&lookat[3], x, y);        selection += cell_hit(&lookat[4], x, y);        selection += cell_hit(&lookat[5], x, y);        selection += cell_hit(&lookat[6], x, y);        selection += cell_hit(&lookat[7], x, y);        selection += cell_hit(&lookat[8], x, y);    }        old_y = y;        redisplay_all();}voidcommand_motion(int x, int y){    cell_update(&perspective[0], old_y-y);    cell_update(&perspective[1], old_y-y);    cell_update(&perspective[2], old_y-y);    cell_update(&perspective[3], old_y-y);    cell_update(&frustum[0], old_y-y);    cell_update(&frustum[1], old_y-y);    cell_update(&frustum[2], old_y-y);    cell_update(&frustum[3], old_y-y);    cell_update(&frustum[4], old_y-y);    cell_update(&frustum[5], old_y-y);    cell_update(&ortho[0], old_y-y);    cell_update(&ortho[1], old_y-y);    cell_update(&ortho[2], old_y-y);    cell_update(&ortho[3], old_y-y);    cell_update(&ortho[4], old_y-y);    cell_update(&ortho[5], old_y-y);    cell_update(&lookat[0], old_y-y);    cell_update(&lookat[1], old_y-y);    cell_update(&lookat[2], old_y-y);    cell_update(&lookat[3], old_y-y);    cell_update(&lookat[4], old_y-y);    cell_update(&lookat[5], old_y-y);    cell_update(&lookat[6], old_y-y);    cell_update(&lookat[7], old_y-y);    cell_update(&lookat[8], old_y-y);        old_y = y;        redisplay_all();}voidcommand_menu(int value){    main_keyboard((unsigned char)value, 0, 0);}voidredisplay_all(void){    glutSetWindow(command);    glutPostRedisplay();    glutSetWindow(world);    world_reshape(sub_width, sub_height);    glutPostRedisplay();    glutSetWindow(screen);    screen_reshape(sub_width, sub_height);    glutPostRedisplay();}intmain(int argc, char** argv){    glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);    glutInitWindowSize(512+GAP*3, 512+GAP*3);    glutInitWindowPosition(50, 50);    glutInit(&argc, argv);        window = glutCreateWindow("Projection");    glutReshapeFunc(main_reshape);    glutDisplayFunc(main_display);    glutKeyboardFunc(main_keyboard);        world = glutCreateSubWindow(window, GAP, GAP, 256, 256);    glutReshapeFunc(world_reshape);    glutDisplayFunc(world_display);    glutKeyboardFunc(main_keyboard);    glutCreateMenu(world_menu);    glutAddMenuEntry("Toggle model", 'm');    glutAttachMenu(GLUT_RIGHT_BUTTON);        screen = glutCreateSubWindow(window, GAP+256+GAP, GAP, 256, 256);    glutReshapeFunc(screen_reshape);    glutDisplayFunc(screen_display);    glutKeyboardFunc(main_keyboard);    glutCreateMenu(screen_menu);    glutAddMenuEntry("Models", 0);    glutAddMenuEntry("", 0);    glutAddMenuEntry("Soccerball", 's');    glutAddMenuEntry("Al Capone", 'a');    glutAddMenuEntry("F-16 Jet", 'j');    glutAddMenuEntry("Dolphins", 'd');    glutAddMenuEntry("Flowers", 'f');    glutAddMenuEntry("Porsche", 'p');    glutAddMenuEntry("Rose", 'r');    glutAttachMenu(GLUT_RIGHT_BUTTON);        command = glutCreateSubWindow(window, GAP+256+GAP, GAP+256+GAP, 256, 256);    glutReshapeFunc(command_reshape);    glutDisplayFunc(command_display);    glutMotionFunc(command_motion);    glutMouseFunc(command_mouse);    glutKeyboardFunc(main_keyboard);    glutCreateMenu(command_menu);    glutAddMenuEntry("Projection", 0);    glutAddMenuEntry("", 0);    glutAddMenuEntry("[o]  glOrtho", 'o');    glutAddMenuEntry("[f]  glFrustum", 'f');    glutAddMenuEntry("[p]  gluPerspective", 'p');    glutAddMenuEntry("", 0);    glutAddMenuEntry("[r]  Reset parameters", 'r');    glutAddMenuEntry("", 0);    glutAddMenuEntry("Quit", 27);    glutAttachMenu(GLUT_RIGHT_BUTTON);        redisplay_all();        glutMainLoop();        return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线成人av影院| 一区二区三区**美女毛片| 久久精品免费观看| 精品国产亚洲在线| 日本视频免费一区| 欧美变态tickle挠乳网站| 成人综合日日夜夜| 手机精品视频在线观看| 亚洲精品一区二区三区香蕉| 成人亚洲一区二区一| 一区二区欧美在线观看| 精品国产91乱码一区二区三区| 国产成人精品免费在线| 亚洲成人av福利| 亚洲日韩欧美一区二区在线| 欧美一卡在线观看| 欧美亚洲动漫精品| 国产成人免费在线视频| 日本不卡视频一二三区| 中文字幕中文字幕一区二区| 日韩美女一区二区三区| 欧美日韩国产高清一区二区三区 | 欧美视频一区二区三区在线观看| 精品综合免费视频观看| 亚洲影视在线播放| 亚洲你懂的在线视频| 国产精品成人午夜| 国产精品欧美久久久久无广告| 精品国内片67194| 国产精品欧美综合在线| 国产精品国产馆在线真实露脸| 337p亚洲精品色噜噜狠狠| 美女视频免费一区| 国产视频一区在线观看| 在线欧美日韩精品| 亚洲精品菠萝久久久久久久| 久久精品欧美一区二区三区麻豆| 91视频一区二区三区| 欧美片网站yy| 高清在线成人网| 日本不卡视频一二三区| 国产精品久99| 国产午夜亚洲精品午夜鲁丝片| 国产自产视频一区二区三区| 久久精品国产亚洲aⅴ| 日韩精品自拍偷拍| 99综合影院在线| 蜜桃视频在线观看一区| 中文字幕视频一区| 国产精品激情偷乱一区二区∴| 91国偷自产一区二区使用方法| 国产老妇另类xxxxx| 亚洲一区日韩精品中文字幕| 日韩视频免费观看高清完整版在线观看| 欧美日韩高清不卡| 中文欧美字幕免费| 一区二区三区中文在线观看| 久久久精品免费网站| 亚洲欧美电影一区二区| 麻豆精品一区二区综合av| 国产一区视频网站| 91麻豆精品国产91久久久久| 中文字幕在线不卡一区| 久久黄色级2电影| 欧美一区欧美二区| 国产精品成人在线观看| 久草在线在线精品观看| 欧美亚洲动漫另类| 亚洲大片免费看| 欧美三级日韩在线| 午夜精品在线看| 欧美亚洲综合另类| 性做久久久久久久久| 欧美日韩久久不卡| 亚洲免费看黄网站| 欧美中文字幕亚洲一区二区va在线| 欧美国产综合色视频| 国产成人精品www牛牛影视| 国产日韩欧美电影| 91网址在线看| 日韩av在线免费观看不卡| 黑人巨大精品欧美一区| 久久综合狠狠综合久久激情| 在线亚洲+欧美+日本专区| 国产一区二区导航在线播放| 亚洲第一会所有码转帖| 一区二区三区丝袜| 自拍偷自拍亚洲精品播放| 久久综合久久综合亚洲| 666欧美在线视频| 国产亚洲成aⅴ人片在线观看| 日韩国产欧美在线视频| 日本一区二区成人在线| 日本高清视频一区二区| 久久av老司机精品网站导航| 国产精品色婷婷| 欧美精品tushy高清| 97se亚洲国产综合在线| 久久成人久久鬼色| 香蕉加勒比综合久久| 国产精品美女久久久久aⅴ| 欧美zozozo| 91精品国产综合久久久蜜臀粉嫩 | 欧美一级免费大片| 91在线观看下载| 国产精品99久久久久久久vr | 亚洲国产中文字幕在线视频综合| 久久综合狠狠综合久久综合88| 51精品秘密在线观看| 在线视频欧美精品| 91激情五月电影| 99久久综合精品| 91麻豆福利精品推荐| 99精品视频一区二区| 91在线精品一区二区| 91原创在线视频| 色综合久久99| 欧美日韩一区高清| 91精品国产综合久久福利软件| 9191国产精品| 精品少妇一区二区三区免费观看| 欧美一二区视频| 久久久不卡网国产精品二区| 欧美激情综合网| 亚洲一区二区影院| 久88久久88久久久| 成人av网站大全| 欧美精品第一页| 中文幕一区二区三区久久蜜桃| 亚洲美女视频一区| 日韩 欧美一区二区三区| 高清av一区二区| 欧美亚洲综合在线| 久久免费午夜影院| 香蕉成人伊视频在线观看| 精品亚洲免费视频| 91福利在线免费观看| 久久影院午夜论| 亚洲国产欧美一区二区三区丁香婷| 久热成人在线视频| 99re在线精品| 国产拍欧美日韩视频二区| 亚洲成人免费影院| 一道本成人在线| 中文字幕不卡的av| 久久疯狂做爰流白浆xx| 欧美日韩黄色一区二区| 亚洲欧美日韩一区| 国产91精品一区二区| 精品久久国产97色综合| 日韩不卡免费视频| 欧美一区二区视频在线观看2022| 色婷婷综合视频在线观看| 日本乱人伦一区| 亚洲另类在线制服丝袜| 99精品欧美一区二区蜜桃免费| 中文字幕精品综合| 粉嫩蜜臀av国产精品网站| 久久噜噜亚洲综合| 成人18视频在线播放| 亚洲美女免费视频| 在线视频你懂得一区| 丝袜美腿亚洲一区| 精品视频全国免费看| 美女视频黄频大全不卡视频在线播放| 欧美日韩午夜影院| 国产一区二区三区在线看麻豆| 精品国产伦一区二区三区观看方式| 日韩不卡一区二区三区| 精品国产91乱码一区二区三区 | 亚洲国产成人高清精品| 欧美一卡2卡三卡4卡5免费| 国模大尺度一区二区三区| 26uuu国产电影一区二区| 国产·精品毛片| 一区二区在线观看视频| 日韩女优视频免费观看| 成a人片亚洲日本久久| 人人精品人人爱| 亚洲天天做日日做天天谢日日欢| 欧美美女bb生活片| 国产成人av电影在线| 秋霞午夜av一区二区三区| 国产精品情趣视频| 日韩欧美亚洲国产精品字幕久久久 | 91精品办公室少妇高潮对白| 日韩精品一卡二卡三卡四卡无卡| 国产拍欧美日韩视频二区| 欧美巨大另类极品videosbest| 粉嫩一区二区三区性色av| 久久精品99国产精品日本| 一区二区三区四区不卡视频| 日韩美女视频一区二区在线观看| 色综合视频在线观看| 成人性生交大合| 国产九九视频一区二区三区| 亚洲mv大片欧洲mv大片精品| 亚洲综合丝袜美腿| 亚洲欧美综合在线精品| 国产精品欧美一区二区三区|