Tracer
ray.h
1
#ifndef ray_h
2
#define ray_h
3
#include "vec3.h"
//allows us to use our vector class,import
4
class
ray
{
//only used on the GPU thus use device
5
public
:
6
vec3
origin;
7
vec3
direction;
8
__device__
ray
() {}
9
__device__
ray
(
const
vec3
&a,
const
vec3
&b) {
10
origin=a;
11
direction=b;
12
}
13
__device__
vec3
position (
float
t)
const
{
14
return
origin+(direction * t);
15
}
16
};
17
#endif
vec3
Definition:
vec3.h:10
ray
Definition:
ray.h:4
Generated by
1.8.13