xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 879KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-15
  • 語言: 其他
  • 標簽: openGL??

資源簡介

實現機器人帶光照的繪制和運動變換。通過glPushMatrix() 和glPopMatrix()繪制出機器人層次結構模型和幾何變換,要求實現機器人手、腳、頭、肩膀的旋轉等幾何變換,能夠實現機器人走路的效果。同時機器人打上光照。內付完整代碼以及實驗報告!!

資源截圖

代碼片段和文件信息

#include

#include“glut.h“

#include?
using?namespace?std;

GLfloat?no_mat[] =?{?0.0?0.0?0.0?1.0?};
GLfloat?mat_ambient[] =?{?0.8?0.8?0.8?1.0?};
GLfloat?mat_ambient_color[]?=?{?0.8?0.8?0.2?1.0?};
GLfloat?mat_diffuse[] =?{?0.5?0.8?0.0?1.0?};
GLfloat?mat_specular[] =?{?1.0?0.0?0.5?1.0?};
GLfloat?no_shininess[] =?{?0.5?};
GLfloat?low_shininess[] =?{?5.0?};
GLfloat?high_shininess[] =?{?100.0?};
GLfloat?mat_emission[] =?{0.3?0.2?0.2?0.0};
static?int?angle?=?0?neck?=?0?lshoulder?=?0?lelbow?=?0?rshoulder?=?0?relbow?=?0
lhips?=?0?rhips?=?0?lfoot?=?0?rfoot?=?0?flagneck?=?0?flaglshoulder?=?0
flaglelbow?=?0?flagrshoulder?=?0?flagrelbow?=?0?flaglhips?=?0
flagrhips?=?0?flaglfoot?=?0?flagrfoot?=?0;

void?init(void)
{
GLfloat?ambient[] =?{?0.0?0.0?0.0?1.0?};
GLfloat?diffuse[] =?{?1.0?1.0?1.0?1.0?};
GLfloat?position[] =?{?0.0?5.0?10.0?0.0?};
GLfloat?lmodel_ambient[] =?{?0.4?0.4?0.4?1.0?};
GLfloat?local_view[] =?{?0.0?};

glClearColor(0000);

glLightfv(GL_LIGHT0?GL_AMBIENT?ambient);
glLightfv(GL_LIGHT0?GL_DIFFUSE?diffuse);
glLightfv(GL_LIGHT0?GL_POSITION?position);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT?lmodel_ambient);
glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER?local_view);

glShadeModel(GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
}

void?draw_body(void)
{
glPushMatrix();
glTranslatef(01.50);
glScalef(0.510.4);
glMaterialfv(GL_FRONT?GL_AMBIENT?mat_ambient_color);
glMaterialfv(GL_FRONT?GL_DIFFUSE?mat_diffuse);
glMaterialfv(GL_FRONT?GL_SPECULAR?mat_specular);
glMaterialfv(GL_FRONT?GL_SHININESS?high_shininess);
glMaterialfv(GL_FRONT?GL_EMISSION?no_mat);
glutSolidCube(4);?????????;?
glPopMatrix();
}

void?draw_leftshoulder(void)
{
glPushMatrix();
glMaterialfv(GL_FRONT?GL_AMBIENT?no_mat);
glMaterialfv(GL_FRONT?GL_DIFFUSE?mat_diffuse);
glMaterialfv(GL_FRONT?GL_SPECULAR?no_mat);
glMaterialfv(GL_FRONT?GL_SHININESS?no_shininess);
glMaterialfv(GL_FRONT?GL_EMISSION?no_mat);
glTranslatef(1.5?30);
glRotatef(lshoulder?1?0?0);

glTranslatef(0?-0.5?0);
glScalef(0.4?1?0.5);
glutSolidCube(2);

glScalef(1?/?0.4?1?/?1?1?/?0.5);
glTranslatef(0?-1.4?0);
glRotatef(lelbow?10?0);
glutWireSphere(0.4?200?500);?

glScalef(0.4?1?0.5);
glTranslatef(0?-1.4?0);
glutSolidCube(2);

glPopMatrix();
}

void?draw_rightshoulder(void)
{
glPushMatrix();
glMaterialfv(GL_FRONT?GL_AMBIENT?no_mat);
glMaterialfv(GL_FRONT?GL_DIFFUSE?mat_diffuse);
glMaterialfv(GL_FRONT?GL_SPECULAR?no_mat);
glMaterialfv(GL_FRONT?GL_SHININESS?no_shininess);
glMaterialfv(GL_FRONT?GL_EMISSION?no_mat);
glTranslatef(-1.530);
glRotatef(rshoulder100);

glTranslatef(0-0.50);
glScalef(0.410.5);
glutSolidCube(2);?

glScalef(1/0.41/11/0.5);
glTranslatef(0-1.40);
glRotatef(relbow100);
gl

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-11-05?09:30??高級圖形學期末大作業\
?????目錄???????????0??2017-11-05?09:26??高級圖形學期末大作業\openGL_robot\
?????目錄???????????0??2017-11-05?09:26??高級圖形學期末大作業\openGL_robot\Debug\
?????文件??????278632??2016-12-29?23:45??高級圖形學期末大作業\openGL_robot\Debug\openGL_robot.exe
?????文件??????423836??2016-12-29?23:45??高級圖形學期末大作業\openGL_robot\Debug\openGL_robot.ilk
?????文件???????46412??2016-12-29?23:45??高級圖形學期末大作業\openGL_robot\Debug\openGL_Robot.obj
?????文件??????187016??2016-12-29?11:12??高級圖形學期末大作業\openGL_robot\Debug\openGL_robot.pch
?????文件??????615424??2016-12-29?23:45??高級圖形學期末大作業\openGL_robot\Debug\openGL_robot.pdb
?????文件??????189440??2016-12-29?23:45??高級圖形學期末大作業\openGL_robot\Debug\vc60.idb
?????文件??????135168??2016-12-29?23:45??高級圖形學期末大作業\openGL_robot\Debug\vc60.pdb
?????文件???????27670??2000-12-12?09:22??高級圖形學期末大作業\openGL_robot\glut.h
?????文件??????237568??2001-11-07?11:27??高級圖形學期末大作業\openGL_robot\glut32.dll
?????文件???????28728??2001-11-07?11:27??高級圖形學期末大作業\openGL_robot\glut32.lib
?????文件????????7794??2016-12-29?11:12??高級圖形學期末大作業\openGL_robot\openGL_Robot.c
?????文件????????9992??2016-12-29?21:55??高級圖形學期末大作業\openGL_robot\openGL_Robot.cpp
?????文件????????4287??2016-12-28?20:06??高級圖形學期末大作業\openGL_robot\openGL_robot.dsp
?????文件?????????331??2016-12-28?20:06??高級圖形學期末大作業\openGL_robot\openGL_robot.dsw
?????文件???????41984??2016-12-30?12:04??高級圖形學期末大作業\openGL_robot\openGL_robot.ncb
?????文件????????1398??2016-12-29?23:45??高級圖形學期末大作業\openGL_robot\openGL_robot.plg
?????文件?????????162??2017-11-05?09:26??高級圖形學期末大作業\~$期末大作業.docx
?????文件??????127148??2016-12-28?19:18??高級圖形學期末大作業\期末大作業.docx
?????文件??????226918??2017-11-05?09:26??高級圖形學期末大作業\高級圖形學期末作業實驗報告.docx

評論

共有 條評論