]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/services/gfx/mw/v2_0/include/microwin/graph3d.h
Initial revision
[karo-tx-redboot.git] / packages / services / gfx / mw / v2_0 / include / microwin / graph3d.h
1 /*
2  * Copyright (c) 1999 Greg Haerr <greg@censoft.com>
3  *
4  * 3D Graphics Library for Micro-Windows
5  */
6
7 #ifndef _GRAPH3D_H_
8 #define _GRAPH3D_H_
9
10 #include <math.h>
11
12 #define pi      3.1415926535
13 #define epsilon 0.000001
14 #define MAXPOLY 32              /* max polygon points*/
15
16 typedef FLOAT   vec1;
17
18 typedef struct {
19         FLOAT x, y;
20 } vec2;
21
22 typedef struct {
23         FLOAT x, y, z;
24 } vec3;
25
26 /* entry points*/
27 void init3(HDC hDC,HWND hwndmem);
28 void paint3(HDC hDC);
29 void setcolor3(MWCOLORVAL c);
30 void moveto3(vec2 pt);
31 void lineto3(vec2 pt);
32 void polyfill(int n, vec2 points[]);
33 void square(void);
34 void circle3(vec1 r);
35 void daisy(vec1 r,int points);
36 void rose(vec1 r,int levels,int points);
37 void triangle(vec2 v0, vec2 v1, vec2 v2);
38 void quadrilateral(vec2 v0, vec2 v1, vec2 v2, vec2 v3);
39 void look3(vec1 x, vec1 y, vec1 z);
40 void drawgrid(vec1 xmin, vec1 xmax, int nx, vec1 zmin, vec1 zmax, int nz);
41 void scale3(vec1 sx, vec1 sy, vec1 sz, double A[][5]);
42 void tran3(vec1 tx, vec1 ty, vec1 tz, double A[][5]);
43 void rot3(int m, vec1 theta, double A[][5]);
44 void mult3(double A[][5], double B[][5], double C[][5]);
45 void findQ(void);
46
47 #endif