rayzor
annotate 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 |
rev | line source |
---|---|
nuclear@17 | 1 #ifndef RAYTRACE_H_ |
nuclear@17 | 2 #define RAYTRACE_H_ |
nuclear@17 | 3 |
nuclear@17 | 4 #include "vmath.h" |
nuclear@17 | 5 #include "vmathray.h" |
nuclear@17 | 6 |
nuclear@17 | 7 class Object; |
nuclear@17 | 8 |
nuclear@17 | 9 struct RayHit { |
nuclear@17 | 10 Ray ray; // the ray in world coordinates |
nuclear@17 | 11 Ray lray; // the local coordinate system ray |
nuclear@17 | 12 float dist; // parametric distance along the ray |
nuclear@17 | 13 const Object *obj; // pointer to the object that has been hit |
nuclear@17 | 14 const void *subobj; // object-specific subobject pointer (can be null). |
nuclear@17 | 15 }; |
nuclear@17 | 16 |
nuclear@17 | 17 Vector3 ray_trace(const Ray &ray, int iter = 0); |
nuclear@17 | 18 Vector3 shade(const RayHit &hit, int iter); |
nuclear@17 | 19 |
nuclear@17 | 20 #endif // RAYTRACE_H_ |