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

  • 大小: 333KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-09
  • 語言: 其他
  • 標簽: C++??OPENGL??

資源簡介

三維立體STY字母模型,可旋轉移動等。字母S可動。代碼比較簡單。

資源截圖

代碼片段和文件信息

/*
?*?WireframeScene.c
?*
?*?Author:?Samuel?R.?Buss
?*
?*?Bug?reports:?Sam?Buss?sbuss@ucsd.edu.
?*?
?*?base?code?for?homework?project?#3?Math?155A?Spring?2005
?*
?*?USAGE:???Please?keep?these?controls?in?your?homework?assignment!!!?(請保持以下控制不變!!!)
?*
?*????Press?arrow?keys?to?control?view?position.?(用方向鍵控制視點位置)
?* ??left?and?right?keys?rotate?the?viewpoint?left?and?right?(向左和向右箭頭分別將視點向左和向右旋轉)
?* ??Up?and?down?keys?rotate?viewpoint?up?and?down?(up?to?80?degrees).(向上和向下箭頭分別將視點向上和向下旋轉(最多轉80度))
?*
?*????Press?“R“?key?to?make?step?size?bigger?(if?moving?too?slowly)?(按“R“鍵使得步長增大(如果覺得移動太慢的話按此鍵))
?*????Press?“r“?key?to?make?step?size?smaller?(if?moving?too?fast).(按“r“鍵使得步長減?。ㄈ绻X得移動太快的話按此鍵))
?*
?*????Press?“w“?key?to?toggle?wireframe?mode?on?and?off?(按“w“鍵來切換線框模式開關)
?*????
?*????Press?“M“??“m“?to?increase?decrease?Mesh?Resolution?(按“M““m“鍵來增加或減小網格分辨率)
?*
?*????Press?“c“?to?toggle?culling?backfaces.(按“c“來剔除背面)
?*??
?* ??Press?ESCAPE?to?exit.(按ESC鍵退出)
?*
?*/

#include? //?For?math?routines?(such?as?sqrt?&?trig).?(為使用數(shù)學函數(shù)(如sqrt和trig))
#include?
#include? //?For?the?“exit“?function?(為使用exit函數(shù))
#include? //?OpenGL?Graphics?Utility?Library
#include?“WireframeScene.h“

//?The?next?global?variable?controls?the?animation‘s?state?and?speed.(下面的全局變量控制動畫的狀態(tài)和速度)
float?RotateAngle?=?0.0f; //?Angle?in?degrees?of?rotation?around?y-axis?(繞y軸旋轉的角度)
float?Azimuth?=?0.0; //?Rotated?up?or?down?by?this?amount?(向上或向下旋轉的角度)
float?AngleStepSize?=?3.0f; //?Step?three?degrees?at?a?time?(旋轉視點時步長為3度)
const?float?AngleStepMax?=?10.0f;?//?步長最大值
const?float?AngleStepMin?=?0.1f;??//?步長最小值

//?Some?global?state?variables?(一些全局狀態(tài)變量)
int?MeshCount?=?6; //?The?mesh?resolution?for?the?mushroom?top?(蘑菇頂?shù)木W格分辨率)
int?WireframeOn?=?1; //?==?1?for?wire?frame?mode?(==1時為線框模式)
int?CullBackFacesOn?=?0; //?==?1?if?culling?back?faces.(==1時剔除背面)
const?int?MeshCountMin?=?3;?//?網格分辨率最小值

//?Animation?(動畫相關的控制變量)
const?float?timeStep?=?0.01;
float?t?=?0;

//?glutKeyboardFunc?is?called?below?to?set?this?function?to?handle
// all?“normal“?key?presses.(處理普通按鍵事件的函數(shù))
void?myKeyboardFunc(?unsigned?char?key?int?x?int?y?)
{
switch?(?key?)?{
case?‘c‘://?面剔除
CullBackFacesOn?=?1-CullBackFacesOn;
if?(?CullBackFacesOn?)?{
glEnable(?GL_CULL_FACE?); //?Enable?culling?of?back?faces?(開啟面剔除(initRendering函數(shù)中已設置了剔除背面))
}
else?{
glDisable(?GL_CULL_FACE?); //?Show?all?faces?(front?and?back)(關閉面剔除,即顯示所有面)
}
glutPostRedisplay();
break;
case?‘m‘://?減小網格分辨率
MeshCount?=?(MeshCount>MeshCountMin)???MeshCount-1?:?MeshCount;
glutPostRedisplay();
break;
case?‘M‘://?增加網格分辨率
MeshCount?++;
glutPostRedisplay();
break;
case?‘w‘:?//?切換線框模式
WireframeOn?=?1-WireframeOn;
if?(?WireframeOn?)?{
glPolygonMode?(?GL_FRONT_AND_BACK?GL_LINE?); //?Just?show?wireframes?(開啟線框模式(通過設置多邊形顯示模式為GL_LINE))
}
else?{
glPolygonMode?(?GL_FRONT_AND_BACK?GL_FILL?); //?Show?sol

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

?????文件??????40960??2010-06-23?02:25??STY孫滔佑?實驗四\Debug\STY.exe

?????文件?????662516??2010-06-23?02:25??STY孫滔佑?實驗四\Debug\STY.ilk

?????文件?????478208??2010-06-23?02:25??STY孫滔佑?實驗四\Debug\STY.pdb

?????文件???????6570??2010-06-23?02:25??STY孫滔佑?實驗四\STY\Debug\BuildLog.htm

?????文件?????????67??2010-06-23?02:25??STY孫滔佑?實驗四\STY\Debug\mt.dep

?????文件????????663??2010-06-23?01:54??STY孫滔佑?實驗四\STY\Debug\STY.exe.embed.manifest

?????文件????????728??2010-06-23?01:54??STY孫滔佑?實驗四\STY\Debug\STY.exe.embed.manifest.res

?????文件????????621??2010-06-23?02:25??STY孫滔佑?實驗四\STY\Debug\STY.exe.intermediate.manifest

?????文件??????93184??2010-06-23?02:25??STY孫滔佑?實驗四\STY\Debug\vc90.idb

?????文件??????69632??2010-06-23?02:25??STY孫滔佑?實驗四\STY\Debug\vc90.pdb

?????文件??????43948??2010-06-23?02:25??STY孫滔佑?實驗四\STY\Debug\WireframeScene.obj

?????文件???????3986??2010-06-23?01:44??STY孫滔佑?實驗四\STY\STY.vcproj

?????文件???????1427??2010-06-23?09:34??STY孫滔佑?實驗四\STY\STY.vcproj.SUNTAOYO-4DEB7C.suntaoyou.user

?????文件??????14048??2010-06-23?02:25??STY孫滔佑?實驗四\STY\WireframeScene.cpp

?????文件????????460??2010-05-28?10:00??STY孫滔佑?實驗四\STY\WireframeScene.h

?????文件?????625664??2010-06-23?09:34??STY孫滔佑?實驗四\STY.ncb

?????文件????????875??2010-06-23?01:40??STY孫滔佑?實驗四\STY.sln

????..A..H.??????9216??2010-06-23?09:34??STY孫滔佑?實驗四\STY.suo

?????目錄??????????0??2010-06-23?02:25??STY孫滔佑?實驗四\STY\Debug

?????目錄??????????0??2010-06-23?02:23??STY孫滔佑?實驗四\Debug

?????目錄??????????0??2010-06-23?02:25??STY孫滔佑?實驗四\STY

?????目錄??????????0??2010-06-23?09:33??STY孫滔佑?實驗四

-----------?---------??----------?-----??----

??????????????2052773????????????????????22


評論

共有 條評論