rayzor

view src/raytrace.h @ 19:252999cd1a3f

added reflection and refraction
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 15 Apr 2014 00:59:37 +0300
parents
children 5380ff64e83f
line source
1 #ifndef RAYTRACE_H_
2 #define RAYTRACE_H_
4 #include "vmath.h"
5 #include "vmathray.h"
7 class Object;
9 struct RayHit {
10 Ray ray; // the ray in world coordinates
11 Ray lray; // the local coordinate system ray
12 float dist; // parametric distance along the ray
13 const Object *obj; // pointer to the object that has been hit
14 const void *subobj; // object-specific subobject pointer (can be null).
15 };
17 Vector3 ray_trace(const Ray &ray, int iter = 0);
18 Vector3 shade(const RayHit &hit, int iter);
20 #endif // RAYTRACE_H_