rayzor

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/raytrace.h	Mon Apr 14 07:34:45 2014 +0300
     1.3 @@ -0,0 +1,20 @@
     1.4 +#ifndef RAYTRACE_H_
     1.5 +#define RAYTRACE_H_
     1.6 +
     1.7 +#include "vmath.h"
     1.8 +#include "vmathray.h"
     1.9 +
    1.10 +class Object;
    1.11 +
    1.12 +struct RayHit {
    1.13 +	Ray ray;			// the ray in world coordinates
    1.14 +	Ray lray;			// the local coordinate system ray
    1.15 +	float dist;			// parametric distance along the ray
    1.16 +	const Object *obj;	// pointer to the object that has been hit
    1.17 +	const void *subobj;	// object-specific subobject pointer (can be null).
    1.18 +};
    1.19 +
    1.20 +Vector3 ray_trace(const Ray &ray, int iter = 0);
    1.21 +Vector3 shade(const RayHit &hit, int iter);
    1.22 +
    1.23 +#endif	// RAYTRACE_H_