erebus

diff liberebus/src/rt.cc @ 6:bb006fb96f1b

forgot to add two files
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 02:22:14 +0300
parents
children e2d9bf168a41
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/liberebus/src/rt.cc	Sat May 24 02:22:14 2014 +0300
     1.3 @@ -0,0 +1,16 @@
     1.4 +#include "rt.h"
     1.5 +
     1.6 +Color ray_trace(const Ray &ray, const Scene *scn, int iter)
     1.7 +{
     1.8 +	RayHit hit;
     1.9 +	if(!(scn->intersect(ray, &hit))) {
    1.10 +		return Color(0, 0, 0, 0);
    1.11 +	}
    1.12 +
    1.13 +	return shade(hit, iter);
    1.14 +}
    1.15 +
    1.16 +Color shade(const RayHit &hit, int iter)
    1.17 +{
    1.18 +	return Color(1, 0, 0, 1);
    1.19 +}