aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-01-28 22:16:25 +0000
committerrodri <rgl@antares-labs.eu>2023-01-28 22:16:25 +0000
commit983fae140a1e162d947eab8b8a0d9acba291d3a8 (patch)
treeef7a0de9a51ebbfd086e9293d2a22e1da387ee2d /dat.h
downloadthreedee-front.tar.gz
threedee-front.tar.bz2
threedee-front.zip
initial public release.HEADfront
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/dat.h b/dat.h
new file mode 100644
index 0000000..34ff43d
--- /dev/null
+++ b/dat.h
@@ -0,0 +1,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;
+};