文件名称:openglcup
- 所属分类:
- OpenGL
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 3.47mb
- 下载次数:
- 0次
- 提 供 者:
- fangz*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
openGL茶杯茶叶操作指导4------玻璃杯里的绿茶
一. 如操作指导(1)建立框架.见welcome2
二. 添加变量与函数并初始化
在VIEW类中加入公共变量
float tbh[6][5] //6片茶叶的角度、位置、大小
BOOL keyn //定义动画开关
在VIEW类中加入公共函数
void mytea(float x,int y) //定义绘制茶杯的函数
void tea3() //茶叶的函数
void lm() //光照和材质的函数
CCmyView::CCmyView()//初始化
{
// TODO: add construction code here
my_pDC=NULL
mytbar=FALSE
mysbar=FALSE
keyn=TRUE //动画开关
for(int i=0 i<6 i++){//定义6片茶叶
tbh[i][0]=0.38f*(rand()-rand())/RAND_MAX //左右
tbh[i][1]=0.8f //高度:浮于茶杯口
tbh[i][2]=0.38f*(rand()-rand())/RAND_MAX //前后
tbh[i][3]=180.0f*(rand()-rand())/RAND_MAX //前后滚动初值
tbh[i][4]=180.0f*(rand()-rand())/RAND_MAX+180.0f*(rand()-rand())/RAND_MAX
//左右滚动初值
}
-openGL operation guide 4------ cup of tea, green tea glass
一. 如操作指导(1)建立框架.见welcome2
二. 添加变量与函数并初始化
在VIEW类中加入公共变量
float tbh[6][5] //6片茶叶的角度、位置、大小
BOOL keyn //定义动画开关
在VIEW类中加入公共函数
void mytea(float x,int y) //定义绘制茶杯的函数
void tea3() //茶叶的函数
void lm() //光照和材质的函数
CCmyView::CCmyView()//初始化
{
// TODO: add construction code here
my_pDC=NULL
mytbar=FALSE
mysbar=FALSE
keyn=TRUE //动画开关
for(int i=0 i<6 i++){//定义6片茶叶
tbh[i][0]=0.38f*(rand()-rand())/RAND_MAX //左右
tbh[i][1]=0.8f //高度:浮于茶杯口
tbh[i][2]=0.38f*(rand()-rand())/RAND_MAX //前后
tbh[i][3]=180.0f*(rand()-rand())/RAND_MAX //前后滚动初值
tbh[i][4]=180.0f*(rand()-rand())/RAND_MAX+180.0f*(rand()-rand())/RAND_MAX
//左右滚动初值
}
-openGL operation guide 4------ cup of tea, green tea glass
(系统自动生成,下载前可以参看下载内容)
下载文件列表
操作指导4-绿茶与杯\操作指导4.doc
..................\welcome2cuptea\MainFrm.cpp
..................\..............\MainFrm.h
..................\..............\ReadMe.txt
..................\..............\StdAfx.cpp
..................\..............\StdAfx.h
..................\..............\welcome.clw
..................\..............\welcome.cpp
..................\..............\welcome.dsp
..................\..............\welcome.dsw
..................\..............\welcome.h
..................\..............\welcome.plg
..................\..............\welcomeDoc.cpp
..................\..............\welcomeDoc.h
..................\..............\welcome.ncb
..................\..............\res\welcome.ico
..................\..............\...\welcome.rc2
..................\..............\...\welcomeDoc.ico
..................\..............\...\Toolbar.bmp
..................\..............\Debug\welcome.res
..................\..............\.....\vc60.idb
..................\..............\.....\welcome.pch
..................\..............\.....\vc60.pdb
..................\..............\.....\StdAfx.obj
..................\..............\.....\welcomeDoc.obj
..................\..............\.....\welcome.obj
..................\..............\.....\MainFrm.obj
..................\..............\.....\welcome.exe
..................\..............\.....\welcome.pdb
..................\..............\.....\welcomeView.obj
..................\..............\.....\welcome.ilk
..................\..............\welcomeView.h
..................\..............\welcome.rc
..................\..............\resource.h
..................\..............\welcome.aps
..................\..............\welcomeView.cpp
..................\..............\welcome.opt
..................\..............\res
..................\..............\Debug
..................\welcome2cuptea
操作指导4-绿茶与杯
..................\welcome2cuptea\MainFrm.cpp
..................\..............\MainFrm.h
..................\..............\ReadMe.txt
..................\..............\StdAfx.cpp
..................\..............\StdAfx.h
..................\..............\welcome.clw
..................\..............\welcome.cpp
..................\..............\welcome.dsp
..................\..............\welcome.dsw
..................\..............\welcome.h
..................\..............\welcome.plg
..................\..............\welcomeDoc.cpp
..................\..............\welcomeDoc.h
..................\..............\welcome.ncb
..................\..............\res\welcome.ico
..................\..............\...\welcome.rc2
..................\..............\...\welcomeDoc.ico
..................\..............\...\Toolbar.bmp
..................\..............\Debug\welcome.res
..................\..............\.....\vc60.idb
..................\..............\.....\welcome.pch
..................\..............\.....\vc60.pdb
..................\..............\.....\StdAfx.obj
..................\..............\.....\welcomeDoc.obj
..................\..............\.....\welcome.obj
..................\..............\.....\MainFrm.obj
..................\..............\.....\welcome.exe
..................\..............\.....\welcome.pdb
..................\..............\.....\welcomeView.obj
..................\..............\.....\welcome.ilk
..................\..............\welcomeView.h
..................\..............\welcome.rc
..................\..............\resource.h
..................\..............\welcome.aps
..................\..............\welcomeView.cpp
..................\..............\welcome.opt
..................\..............\res
..................\..............\Debug
..................\welcome2cuptea
操作指导4-绿茶与杯