#include"stdafx.h"
#include<glut.h>
#include<math.h>
#define PI 3.14159
float theta = -90.0;//旋转角
float theta2 = 0;//视角
int inner = 10, outer = 80;
float s = outer + 4 * inner + 50;
float d = 1;//一步的距离
float eyex = 0, eyey = 0, eyez = s;
float atx = 0,atz = 0,aty=0;
int ww, hh;
bool flag = true;
static int du = 90, oldmy = -1, oldmx = -1; //du是视点绕y轴的角度,opengl里默认y轴是上方向
static float r = s, h = 0.0; //r是视点绕y轴的半径,h是视点高度即在y轴上的坐标
void display();
void reshape(int w, int h);
void mytime(int value);
void darwground();
void darwsphere();
void drawwall();
void init();
void mykeyboard(unsigned char key, int x, int y);
void Mouse(int button, int state, int x, int y);
void onMouseMove(int x, int y);
int APIENTRY _tWinMain(HINSTANCE hInstance,
鼠标拖拽整个场景
最新推荐文章于 2023-05-18 11:37:57 发布