rayzor

annotate src/raytrace.h @ 22:5380ff64e83f

minor changes from dos, and line endings cleanup
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 02 May 2014 14:32:58 +0300
parents 79609d482762
children
rev   line source
nuclear@22 1 #ifndef RAYTRACE_H_
nuclear@22 2 #define RAYTRACE_H_
nuclear@22 3
nuclear@22 4 #include "vmath.h"
nuclear@22 5 #include "vmathray.h"
nuclear@22 6
nuclear@22 7 class Object;
nuclear@22 8
nuclear@22 9 struct RayHit {
nuclear@22 10 Ray ray; // the ray in world coordinates
nuclear@22 11 Ray lray; // the local coordinate system ray
nuclear@22 12 float dist; // parametric distance along the ray
nuclear@22 13 const Object *obj; // pointer to the object that has been hit
nuclear@22 14 const void *subobj; // object-specific subobject pointer (can be null).
nuclear@22 15 };
nuclear@22 16
nuclear@22 17 Vector3 ray_trace(const Ray &ray, int iter = 0);
nuclear@22 18 Vector3 shade(const RayHit &hit, int iter);
nuclear@22 19
nuclear@22 20 #endif // RAYTRACE_H_