aboutsummaryrefslogtreecommitdiff
path: root/viewpoint.c
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-02-21 06:55:27 +0100
committerJulian T <julian@jtle.dk>2020-02-21 06:55:27 +0100
commit623fee395425ab33f14fb9cd8ffa790e362f59d7 (patch)
treec70b64e13fd5e00c2317fa40ee4b8cd786e635d5 /viewpoint.c
parent63a84080f9f0e3d719d5470e370584a5eff18a47 (diff)
Added pgm drawing and got light ray tracing working
Still needs correct light simulation and reflections
Diffstat (limited to 'viewpoint.c')
-rw-r--r--viewpoint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/viewpoint.c b/viewpoint.c
index d51e646..7786c12 100644
--- a/viewpoint.c
+++ b/viewpoint.c
@@ -4,7 +4,7 @@
#include <math.h>
#include <stdlib.h>
-static const vector_t up = {0, 1, 0};
+static const vector_t up = {0, 0, 1};
void viewpoint_init(viewpoint_t *view)
{
@@ -37,10 +37,12 @@ void viewpoint_init(viewpoint_t *view)
vector_sub(&view->blc, &view->blc, vector_scale(&v, &v, gy));
// Debug print
+ /*
printf("Calculated the following viewpoint stuff\n");
printf("qx"); vector_print(&view->qx);
printf("qy"); vector_print(&view->qy);
printf("blc"); vector_print(&view->blc);
+ */
}
// Calculate ray for viewport w, h