91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 13.22MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-08-05
  • 語言: C/C++
  • 標簽: opengl??VC++??地球儀??

資源簡介

用opengl和Visual C++實現的三維地球儀,立體貼圖,地球儀旋轉,添加了光照

資源截圖

代碼片段和文件信息


/*********************包含鏈接的庫文件*******************************************************************************************/
#pragma?comment(?lib?“opengl32.lib“?)
#pragma?comment(?lib?“glu32.lib“?)
#pragma?comment(?lib?“glut32.lib“)
#pragma?comment(?lib?“glew32.lib“)
#pragma?comment(?lib?“glaux.lib“)
#pragma?comment(?lib?“vfw32.lib“?)
/********************************************************************************************************************************/

/*#include?*/
#include?“glut.h“
#include?
/*#include?*/
#include?“glaux.h“
#include?
#include?

#define?PI?3.14159265358979323846

GLfloat??corner=0.0;

GLUquadricObj*?qobj;?//二次方程對象???a1x^2?+?a2y^2?+?a3z^2?+?a4xy?+?a6xz?+?a7x?+?a8y?+?a9z?+?a10?=?0

GLuint?texName?texName1?texName2;

GLuint?flag=1;

GLfloat?bracket_diffuseCoeff[]={0.53?0.37?0.10?1.0};
GLfloat?bracket_specularCoeff[]={0.53?0.37?0.10?1.0};
GLfloat?bracket_surfEmissionCoeff[]={0.2?0.2?0.2?1.0};

GLfloat?underpan_diffuseCoeff[]={0.5?0.5?0.0?1.0};
GLfloat?underpan_specularCoeff[]={0.5?0.5?0.0?1.0};
GLfloat?underpan_surfEmissionCoeff[]={0.2?0.2?0.2?1.0};

GLfloat?wall_mat[]={0.60.60.61};
GLfloat?wall_mat1[]={1001};
GLfloat?wall_mat2[]={0.60.60.61};

GLfloat?shininess[]={25.0};

void?draw_semi_circle(float?r)?????????????//中心在(xy0),半徑為r的半圓
{
???float?angle;

???glBegin(GL_LINE_STRIP);

???for(angle?=?2*PI;?angle?>=?PI;?angle?-=?PI/100)
??
???{
??????glVertex3f(r*cos(angle)r*sin(angle)0);
???}
???glEnd();???
}


void??draw_salver(float?x?float?y?float?a?float?b)???//中心在(xy0),長半軸為a,短半軸為b的橢圓
{
???float?angle;
???glTranslatef(xy0);

???glBegin(GL_TRIANGLE_FAN);

???for(angle?=?2*PI;?angle?>=?0;?angle?-=?PI/360)
???{
??????glVertex3f(a*cos(angle)b*sin(angle)0);
???}
???glEnd();???
}

void?draw_tellurion()//地球儀
{
glClear(GL_COLOR_BUFFER_BIT?|?GL_DEPTH_BUFFER_BIT);

????glLoadIdentity();

glPushMatrix();
GLfloat?light0_ambient[]?=?{?0.3?0.4?0.6?1};
????GLfloat?light0_diffuse[]?=?{?0.5?0.4?0.4?1?};
????GLfloat?light0_specular[]?=?{?0.5?0.5?0.5?1};
????GLfloat?light0_position[]?=?{?1?1?1?0?};???//方向性光源,類似太陽?
????glEnable(GL_LIGHTING);
????glEnable(GL_LIGHT0);
????glLightfv(GL_LIGHT0?GL_SPECULAR?light0_specular);
????glLightfv(GL_LIGHT0?GL_DIFFUSE?light0_diffuse);
????glLightfv(GL_LIGHT0?GL_AMBIENT?light0_ambient);???
????glLightfv(GL_LIGHT0?GL_POSITION?light0_position);???
????glPopMatrix();

glPushMatrix();
????GLfloat?light1_diffuse[]?=?{?0.3?1?0?1};
????GLfloat?light1_position[]?=?{0.8?1?0.4?1?};???
????glEnable(GL_LIGHTING);
????glEnable(GL_LIGHT1);
????glLightfv(GL_LIGHT1?GL_DIFFUSE?light1_diffuse);??
????glLightfv(GL_LIGHT1?GL_POSITION?light1_position);???
????glPopMatrix();

glPushMatrix();
????GLfloat?light2_diffuse[]?=?{?1?0.2?0?1?};
????GLfloat?light2_position[]?=?{0.5?0.2?1?1?};??

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???28856320??2013-12-17?21:17??01_baseframe\01_baseframe.sdf

?????文件????????885??2012-10-25?16:56??01_baseframe\01_baseframe.sln

????..A..H.?????18944??2013-12-17?21:17??01_baseframe\01_baseframe.suo

?????文件???????3393??2006-08-03?02:59??01_baseframe\01_baseframe.vcproj

?????文件???????5305??2013-12-16?22:04??01_baseframe\01_baseframe.vcxproj

?????文件????????920??2012-10-25?16:56??01_baseframe\01_baseframe.vcxproj.filters

?????文件????????143??2012-10-25?16:56??01_baseframe\01_baseframe.vcxproj.user

?????文件??????11774??2013-12-16?22:06??01_baseframe\base.cpp

?????文件???????1946??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.Build.CppClean.log

?????文件?????509952??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.exe

?????文件????????406??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.exe.embed.manifest

?????文件????????472??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.exe.embed.manifest.res

?????文件????????381??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.exe.intermediate.manifest

?????文件????1339428??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.ilk

?????文件?????????65??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.lastbuildstate

?????文件???????3649??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.log

?????文件????2083840??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.pdb

?????文件????????707??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.vcxprojResolveAssemblyReference.cache

?????文件??????????0??2013-12-17?21:15??01_baseframe\Debug\01_baseframe.write.1.tlog

?????文件????????214??2013-12-17?21:15??01_baseframe\Debug\01_baseframe_manifest.rc

?????文件??????64008??2013-12-17?21:15??01_baseframe\Debug\base.obj

?????文件????????610??2013-12-17?21:15??01_baseframe\Debug\cl.command.1.tlog

?????文件??????12700??2013-12-17?21:15??01_baseframe\Debug\CL.read.1.tlog

?????文件????????318??2013-12-17?21:15??01_baseframe\Debug\CL.write.1.tlog

?????文件?????192512??2006-03-04?03:19??01_baseframe\Debug\glew32.dll

?????文件?????121856??2004-08-04?08:52??01_baseframe\Debug\glu32.dll

?????文件?????169984??1998-08-18?23:25??01_baseframe\Debug\glut32.dll

?????文件??????????2??2013-12-17?21:15??01_baseframe\Debug\link-cvtres.read.1.tlog

?????文件??????????2??2013-12-17?21:15??01_baseframe\Debug\link-cvtres.write.1.tlog

?????文件??????????2??2013-12-17?21:15??01_baseframe\Debug\link.44-cvtres.read.1.tlog

............此處省略41個文件信息

評論

共有 條評論