-
Notifications
You must be signed in to change notification settings - Fork 1
/
Ray.h
45 lines (33 loc) · 771 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
37
38
39
40
41
42
43
44
45
// Ray.h: interface for the CRay class.
//
//////////////////////////////////////////////////////////////////////
# ifndef _RAY_H
# define _RAY_H
# include "Vector.h"
# include "Point3D.h"
class CRay
{
public:
// Object construction
CRay ();
CRay (CPoint3D ptOrigin, CPoint3D ptDestination, float IOR);
CRay (CVector& vec);
// Object assignment
CRay& operator= (const CVector& vec);
// Object destruction
virtual ~CRay();
// Object interface
CPoint3D Origin ();
CPoint3D Destination ();
CVector Direction ();
float Magnitude ();
void Translate (CPoint3D point);
float IOR ();
protected:
CPoint3D m_ptOrigin;
CPoint3D m_ptDestination;
CVector m_vecDirection;
float m_fMagnitude;
float m_fIndexOfRefraction;
};
# endif