OpenGL實現四面體自轉 公轉

2021-09-13 23:58:45 字數 790 閱讀 8425

opengl實現四面體自轉+公轉(第乙個opengl程式)

#include 

#include

#include

#include

#include <

gl/glew.h>

#include <

gl/freeglut.h>

using namespace std;

float angle =0;

float speed =

0.2;

//旋轉速度

float a=

0.0;

//視覺初始角度設定

float c=

0.0;

//視覺初始角度設定

float i=

0.0;

//視覺初始角度設定

void

mydisplay()

void

reshape

(int w,int h)

//兩個引數:視窗被移動後大小

void

keyboard

(unsigned char key,int x,int y)

}void

initwindow

(int &argc, char *ar**[

], int width, int height, char *title)

//初始化並顯示到螢幕**

int main

(int argc, char *ar**)

opengl 顯示有紋理的四面體

在opengl貼吧中被人翻上來乙個以前求助貼 照著nehe的教程 lesson6,弄了個有紋理的四面體 include 用 auxdibimageload 來載入紋理 include pragma comment lib,glaux.lib includegluint texture 1 aux r...

opengl 怎樣顯示有紋理的四面體

在opengl貼吧中被人翻上來乙個以前求助貼 照著nehe的教程 lesson6,弄了個有紋理的四面體 include 用 auxdibimageload 來載入紋理 include pragma comment lib,glaux.lib include gluint texture 1 aux ...

尤拉四面體體積應用

已知乙個三角形abc三點在空間內的座標,和空間某一點q到abc三點的距離,求q點到abc的距離。保證存在點q和abc不共線。第一行是樣例個數。每乙個樣例前三行是abc座標。最後一行是q到平面abc三點的距離。對於每乙個樣例,輸出乙個兩位小數。1 7.000000 49.000000 73.00000...