-
Notifications
You must be signed in to change notification settings - Fork 0
/
object.cpp
65 lines (52 loc) · 1.3 KB
/
object.cpp
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*****************************************************************************
Base class for all object in the raycaster/raytracer
NAME:object.cpp
DATE:10/11/1996
AUTHOR: Z.A. Nolan
*****************************************************************************/
// include the header file
#include "object.h"
// constructor
TObject::TObject ()
{
_SurfaceProperties=TSurfaceProperties() ;
}
TObject::TObject (const TSurfaceProperties SurfaceProperties)
{
_SurfaceProperties=SurfaceProperties ;
}
// return the colour of the object
TColour TObject::Colour() const
{
return _SurfaceProperties.Colour() ;
}
// return the diffuse value of the object of the object
double TObject::Diffuse() const
{
return _SurfaceProperties.Diffuse() ;
}
// return the specular value of the object
double TObject::Specular() const
{
return _SurfaceProperties.Specular() ;
}
// return the roughness of the object
int TObject::Roughness() const
{
return _SurfaceProperties.Roughness() ;
}
// return the shine of the object
double TObject::Shine() const
{
return _SurfaceProperties.Shine() ;
}
// return the shine of the object
TSurfaceProperties TObject::SurfaceProperties() const
{
return _SurfaceProperties ;
}
// copy the surface properties
TObject::Copy(const TSurfaceProperties &Surface)
{
_SurfaceProperties=Surface ;
}