-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPh3DFunc.h
More file actions
executable file
·58 lines (46 loc) · 2.16 KB
/
Copy pathPh3DFunc.h
File metadata and controls
executable file
·58 lines (46 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//---------------------------------------------------------------------------
#ifndef Ph3DFuncH
#define Ph3DFuncH
//---------------------------------------------------------------------------
#endif
#include <gl/glut.h>
#include <gl/gl.h>
#include <gl/glu.h>
//---------------------------------------------------------------------------
//类定义
class _export POINT3F;
class _export RGBcolor;
//---------------------------------------------------------------------------
//控制函数定义
void _export phSetLight(int number,POINT3F position,float ambient,float diffuse);
void _export phSetMaterial(RGBcolor ambient,RGBcolor diffuse);
void _export phSetMaterial(RGBcolor color);
void _export phSetColor(GLfloat r,GLfloat g,GLfloat b);
void _export phTranslatef(POINT3F position);
void _export phRotate(POINT3F O,POINT3F P,float angle);
POINT3F _export phPosition(POINT3F O,POINT3F P);
//---------------------------------------------------------------------------
//物理类定义
void _export normalize(float v[3]);
void _export normcrossprod(POINT3F *v1, POINT3F *v2, float out[3]);
void _export ReduceToUnit(float vector[3]);
void _export calcNormal(float v[3][3], float out[3]);
void _export phSurface(POINT3F *p,int maxi,int maxj,RGBcolor color);
void _export phColorSurface(POINT3F *p,int maxi,int maxj,RGBcolor *color);
void _export phSphere(POINT3F v,float r);
void _export phCube(POINT3F v,float a,float b,float c);
void _export phMissile(POINT3F v1,POINT3F v2);
void _export phCylinder(POINT3F v1,POINT3F v2,float r);
void _export phCoordinate(POINT3F O,POINT3F X,POINT3F Y,float length);
void _export phArrow(POINT3F O,POINT3F P);
void _export phSpring(POINT3F O,POINT3F P,int n,float R,float r);
void _export phCone(POINT3F v,POINT3F p,float r);
void _export phPoint(POINT3F O,float size);
void _export phPoint(POINT3F O[],int n,float size);
void _export phLine(POINT3F v1,POINT3F v2,float width);
void _export phLine(POINT3F v[],int n,float width);
void _export phTriangle(POINT3F v[]);
void _export phQuads(POINT3F v[]);
void _export phPolygon(POINT3F v[],int n);
void _export phDisk(POINT3F O,POINT3F P,float r);
//---------------------------------------------------------------------------