freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于opengl的粒子系統(tǒng)——模擬火焰(完整版)

  

【正文】 。 該課程設(shè)計(jì)以培養(yǎng)我們算法設(shè)計(jì)與實(shí)現(xiàn)的能力為目標(biāo),通過實(shí)踐,使我們了解、掌握計(jì)算機(jī)圖形學(xué)的基本知識(shí)和關(guān)鍵技術(shù)、了解和熟悉計(jì)算機(jī)圖形學(xué)的方法、工具和環(huán)境,同時(shí)培養(yǎng)我們的思維能力和團(tuán)隊(duì)合作能力。 3.系統(tǒng)開發(fā)環(huán)境 開發(fā)工具: VC 操作系統(tǒng): Microsoft Windows 7 粒子系統(tǒng)(火焰)的算法原理 初始化粒子 更新粒子 刪除死粒子 繪制粒子 定義粒子的屬性 宏定義粒子的最大數(shù)目 5000,并定義結(jié)構(gòu)體來設(shè)置粒子屬性,代碼如下: define MAX_PARTICLES 5000 // 粒子數(shù)的數(shù)目 typedef struct // 創(chuàng)建結(jié)構(gòu)體 { bool active。 // 坐標(biāo) float z。 particles particle[MAX_PARTICLES]。 particle[loop].b=colors[loop*(4/MAX_PARTICLES)][2]。 particle[loop].z+=particle[loop].zi/(slowdown*1050)。 particle[loop].y=。 //渲染 particle[loop].xg=xg1。q39。 yg1+=。 }break。z39。 case 1: { col=1。 glutSetMenu(mainMenu)。我們實(shí)驗(yàn)的特色在于使用鍵盤和鼠標(biāo)控制火焰顏色的交互變化,以及使用鍵盤控制火焰加速度的變化。 float xg1。 // 消失的速度 float r。 float zi。 if (!Filename) { return NULL。 printf(q 鍵 xg1+=。 printf(z 鍵 yg1=。 if(a6) { printf(****Tip:Error!!!Please reenter after exit!!****\n\n)。 glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]sizeX, TextureImage[0]sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]data)。 glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]sizeX, TextureImage[0]sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]data)。 glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]sizeX, TextureImage[0]sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]data)。 glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]sizeX, TextureImage[0]sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]data)。 glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]sizeX, TextureImage[0]sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]data)。 glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]sizeX, TextureImage[0]sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]data)。 gluPerspective(,(GLfloat)width/(GLfloat)height,)。 glHint(GL_POINT_SMOOTH_HINT,GL_NICEST)。 particle[loop].fade=float(rand()%100)/+。 glMatrixMode(GL_MODELVIEW)。 glColor4f(particle[loop].r,particle[loop].g,particle[loop].b,particle[loop].life)。 glTexCoord2d(0,0)。 particle[loop].zi+=particle[loop].zg。 particle[loop].yi=float((rand()%60))。 } } } glutSwapBuffers()。 default: break。 glutAttachMenu(GLUT_RIGHT_BUTTON)。w39。 // xg1=。 } break。argc,argv)。 glutIdleFunc(DrawGLScene)。 glutKeyboardFunc(keyboard)。 glutInitWindowSize(500,650)。z39。 }break。 // yg1+=。q39。 } void MenuHandler() // 主菜單 { int mainMenu。 LoadGLTextures()。 particle[loop].r=colors[col][0]。 // 周期衰減 if (particle[loop].life) { particle[loop].life=。 glEnd()。 glTexCoord2d(1,1)。 gluLookAt(0,0,5, 0,0, 0,1,0)。 particle[loop].g=colors[loop*(4/MAX_PARTICLES)][1]。 LoadGLTextures()。 glShadeModel(GL_SMOOTH)。 } if (TextureImage[0]) { if (TextureImage[0]data) { free(TextureImage[0]data)。 case 6: { if (TextureImage[0]=LoadBMP()) { Status=TRUE。 case 5: { if (TextureImage[0]=LoadBMP(fourpoin
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1