aboutsummaryrefslogtreecommitdiff
path: root/dat.h
blob: 34ff43dfa8fc1672d923561143a37c6c2af51ab0 (plain)
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
#define DEG 0.01745329251994330

enum {
	STACK = 8192,
	SEC = 1000,
	FPS = 60,
	FOV = 90
};

typedef struct Vector Vector;
typedef struct Vector3 Vector3;
typedef double Matrix[4][4];
typedef struct Triangle Triangle;
typedef struct Triangle3 Triangle3;
typedef struct Mesh Mesh;

struct Vector {
	double x, y;
};

struct Vector3 {
	double x, y, z;
};

struct Triangle {
	Point p0, p1, p2;
};

struct Triangle3 {
	Vector3 p0, p1, p2;
	Image *tx;
};

struct Mesh {
	Triangle3 *tris;
	int ntri;
};