-
Notifications
You must be signed in to change notification settings - Fork 0
/
ray.h
36 lines (26 loc) · 833 Bytes
/
ray.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef ray_h
#define ray_h
//******************************************//
// //
// Ray.h - header file for ray class //
// //
//******************************************//
#include <math.h>
class Ray {
public:
double delta_x, delta_y, delta_z; //change in x,y,z
double t; //distance to intersect with an object
Ray();
//
// Default Constructor
///////////////////////////////////////////////////////////////////////////
Ray(double xdiff, double ydiff, double zdiff);
//
// Constructor with 3 params,
///////////////////////////////////////////////////////////////////////////
void normalize();
//
// Normalize the ray (vector) - converts it to a unit vector
///////////////////////////////////////////////////////////////////////////
};
#endif