-
Notifications
You must be signed in to change notification settings - Fork 0
/
cube.h
48 lines (36 loc) · 1.08 KB
/
cube.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
46
47
48
#ifndef cube_h
#define cube_h
/*****************************************************************************
Plane Class
NAME:cube.h
DATE:17/12/1996
AUTHOR: Z.A. Nolan
*****************************************************************************/
// include vector class
#include "vector.h"
// and the colour class
#include "colour.h"
// and the line class
#include "line.h"
// and include the object class
#include "object.h"
class TCube :public TObject
{
private:
TVector _TopCorner ; // Top corner of the cube
TVector _BottomCorner ; // Bottom corner of the cube
// read and write functions
istream &Read (istream &In) ;
ostream &Write (ostream &Out) const ;
public:
// Constructors
TCube () ;
TCube (TVector TopCorner,TVector BottomCorner,
const TSurfaceProperties) ;
// Intersection of a line and a plane
double Intersection(TVector &Point,TVector &Normal,const TLine &Line) const;
// streaming operators
friend istream &operator>>(istream &In, TCube &Cube);
friend ostream &operator<<(ostream &Out,const TCube &Cube) ;
} ;
#endif