summaryrefslogtreecommitdiff
path: root/src/plane.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plane.h')
-rw-r--r--src/plane.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/plane.h b/src/plane.h
new file mode 100644
index 0000000..f83350f
--- /dev/null
+++ b/src/plane.h
@@ -0,0 +1,21 @@
+#include "defs.h"
+#include "vertex.h"
+#include "fixed.h"
+
+#ifndef PLANE_H
+#define PLANE_H
+
+typedef struct PLANE {
+ VERTEX normal;
+ FIXED distance;
+} PLANE;
+
+static inline PLANE createPlane(VERTEX *normal, FIXED distance) {
+ // Create a plane from data
+ PLANE temp;
+ temp.normal = *normal;
+ temp.distance = distance;
+ return temp;
+}
+
+#endif // PLANE_H