aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-01-29 22:27:33 +0000
committerrodri <rgl@antares-labs.eu>2023-01-29 22:27:33 +0000
commite70ecd9d84578dad435a39b40592f9a7cd1908d3 (patch)
tree0abadddf4f131a1aa30fed5a3a434805868fa1e6 /dat.h
downloadqball-e70ecd9d84578dad435a39b40592f9a7cd1908d3.tar.gz
qball-e70ecd9d84578dad435a39b40592f9a7cd1908d3.tar.bz2
qball-e70ecd9d84578dad435a39b40592f9a7cd1908d3.zip
initial public release.
the original qball doesn't seem to work at all. burnzez's qb adaptation has proven to be very close, with some minor modifications, but still doesn't get it.
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/dat.h b/dat.h
new file mode 100644
index 0000000..2ece7da
--- /dev/null
+++ b/dat.h
@@ -0,0 +1,42 @@
+#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 Quaternion Quaternion;
+typedef struct Triangle Triangle;
+typedef struct Triangle3 Triangle3;
+typedef struct Mesh Mesh;
+
+struct Vector {
+ double x, y;
+};
+
+struct Vector3 {
+ double x, y, z;
+};
+
+struct Quaternion {
+ double r, i, j, k;
+};
+
+struct Triangle {
+ Point p0, p1, p2;
+};
+
+struct Triangle3 {
+ Vector3 p0, p1, p2;
+ Image *tx;
+};
+
+struct Mesh {
+ Triangle3 *tris;
+ int ntri;
+};