erebus

annotate 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
rev   line source
nuclear@6 1 #include "rt.h"
nuclear@6 2
nuclear@6 3 Color ray_trace(const Ray &ray, const Scene *scn, int iter)
nuclear@6 4 {
nuclear@6 5 RayHit hit;
nuclear@6 6 if(!(scn->intersect(ray, &hit))) {
nuclear@6 7 return Color(0, 0, 0, 0);
nuclear@6 8 }
nuclear@6 9
nuclear@6 10 return shade(hit, iter);
nuclear@6 11 }
nuclear@6 12
nuclear@6 13 Color shade(const RayHit &hit, int iter)
nuclear@6 14 {
nuclear@6 15 return Color(1, 0, 0, 1);
nuclear@6 16 }