summaryrefslogtreecommitdiff
path: root/test/raytracer/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/raytracer/matrix.c')
-rw-r--r--test/raytracer/matrix.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/raytracer/matrix.c b/test/raytracer/matrix.c
index 8814346..5c85c7b 100644
--- a/test/raytracer/matrix.c
+++ b/test/raytracer/matrix.c
@@ -3,12 +3,6 @@
#include "vector.h"
#include "matrix.h"
-struct matrix matrix_identity = {
- 1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
-};
-
void apply_to_point(struct matrix * m, struct point * p,
/*out*/ struct point * r)
{
@@ -25,7 +19,13 @@ void apply_to_vect(struct matrix * m, struct vector * v,
r->dz = m->zx * v->dx + m->zy * v->dy + m->zz * v->dz;
}
+static struct matrix matrix_identity = {
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+};
+struct matrix * mid = &matrix_identity;
struct matrix * mtranslate(flt sx, flt sy, flt sz)
{