rayzor

view src/raytrace.h @ 17:79609d482762

the renderer renders, also fixed an unnoticed matrix conversion problem between scenegraph and min3d
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 14 Apr 2014 07:34:45 +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_