• 大小: 2.72MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-26
  • 语言: 其他
  • 标签: OpenGL  电梯  仿真  

资源简介

OpenGL做的电梯仿真 用到混合 纹理 反馈等内容 以及电梯的一些有关算法

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include
#include“glmap.h“
#include“win.h“
#include“tga.h“
#include“stack.h“
#include“grp2.1.h“
#include
/*  Declare Windows procedure  */
#define WindowWidth  400
#define WindowHeight 400
#define MOVE 2
#define OPEN 3

#define PI 3.14159265357
#define DEG 3.14159265357/180.0000
#define VEL 10
#define BOT -1250 
#define TOP 750
#define FLOOR(i) (float)(-1250+(i)*500)
#define TOFLOOR(m)  (int)(((int)(m)+1250)/(int)500)
#define BUTTON1 1 
#define BUTTON2 2 
#define BUTTON3 3 
#define BUTTON1U 4 
#define BUTTON1D 5 
#define BUTTON2U 6 
#define BUTTON2D 7
#define BUTTON3U 8 
#define BUTTON3D 9 
#define BUTTON4U 10 
#define BUTTON4D 11 
#define BUTTON5U 12 
#define BUTTON5D 13


//////////////////当前位置 以及视角旋转 
float nnx=0nny=FLOOR(3)-150nnz=0nnr=0thisr=0;
//////即将到来的电梯 
int comingele;
//////本楼层 
int thisfloor=2;
/////剩余秒数 
float second;
/////是否有按键 
int kkflag=0;

void showpanel(HWND hint mode);
////////按钮的名字 
unsigned int buttonname[20]={4567891011121314151617181920212223} ; 
/////////纹理序号 
GLuint t1;
GLuint t2t3t4waterfloortextironcoppersg[10]btupbtdownupreddownredbluemask;
///////图形定点数组类 
PointGrp afloor;
PointGrp file;
PointGrp elalift[6]cover1cover2signbutton[20]panel[20]insidepanel[5]aroundroofcur;
//////四边形定点 
Point3D curpt[4]={
              {-6-300}
              {26-300}
              {2620}
              {-620}
              
              };
Point3D floorpt[4]={
              {-20000-1500}
              {20000-1500}
              {200001500}
              {-200001500}
              };
Point3D floorpt1[4]={
              {-17500-1500}
              {17500-1500}
              {175001500}
              {-175001500}
              };
Point3D file1[4]={
              {-20000-1500}
              {-200001500}
              {200001500}
              {20000-1500}
              };
Point3D file2[4]={
              {-17500-1500}
              {-175001500}
              {175001500}
              {17500-1500}
              };
Point3D file3[4]={
              {000}
              {000}
              {000}
              {000}
              };
Point3D roof1[5]={
              {-17500-1500}
              {-175001500}
              {175001500}
              {17500-1500}
              {-17500-1500}
              };
Point3D roof2[5]={
              {000}
              {000}
              {000}
              {000}
              {000}
              };
Point3D filept[4]={
                   {-2000-12501500}
                   {-2000-1250-1500}
                   {-20001250-1500}
                   {-200012501500}
                   };
Point3D signpt[4]={
                   {150-1500}
                   {-150-1500}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      40579  2011-04-20 21:13  kkkk\elevatorspacecurjj.cpp

     文件     830848  2011-04-21 08:50  kkkk\elevatorspacecurjj.exe

     文件     131116  2001-04-29 04:51  kkkk\Font.tga

     文件       2728  2011-04-20 17:27  kkkk\glmap.h

     文件      11754  2011-04-20 21:00  kkkk\grp2.1.h

     文件     253014  2011-04-16 01:26  kkkk\pic\1.bmp

     文件     253014  2011-04-19 10:42  kkkk\pic\10.bmp

     文件     253014  2011-04-16 01:26  kkkk\pic\2.bmp

     文件     253014  2011-04-16 01:27  kkkk\pic\3.bmp

     文件     253014  2011-04-16 01:27  kkkk\pic\4.bmp

     文件     253014  2011-04-16 01:27  kkkk\pic\5.bmp

     文件     253014  2011-04-19 10:37  kkkk\pic\6.bmp

     文件     253014  2011-04-19 10:36  kkkk\pic\7.bmp

     文件     253014  2011-04-19 10:45  kkkk\pic\8.bmp

     文件     253014  2011-04-19 10:35  kkkk\pic\9.bmp

     文件     253014  2011-04-19 22:09  kkkk\pic\blue.bmp

     文件     966222  2011-04-15 15:24  kkkk\pic\c.bmp

     文件     921654  2011-04-15 18:36  kkkk\pic\copper.bmp

     文件      66614  1999-09-25 20:19  kkkk\pic\Crate.bmp

     文件     196662  2011-03-17 16:31  kkkk\pic\Crate1.bmp

     文件       3126  2011-04-20 20:11  kkkk\pic\curmask.bmp

     文件     940854  2011-04-16 13:30  kkkk\pic\down.bmp

     文件     940854  2011-04-16 13:46  kkkk\pic\downred.bmp

     文件     921654  2011-04-15 17:19  kkkk\pic\iron.bmp

     文件     653454  2011-04-20 21:37  kkkk\pic\kk.bmp

     文件     196664  2000-03-26 05:35  kkkk\pic\lo.bmp

     文件     196664  2000-03-26 05:35  kkkk\pic\Mask.bmp

     文件    4220245  2000-03-06 02:10  kkkk\pic\NeHe.bmp

     文件     196664  2000-07-17 00:59  kkkk\pic\Reflect.bmp

     文件       3126  2011-04-20 20:47  kkkk\pic\ssss.bmp

............此处省略12个文件信息

评论

共有 条评论