-
Notifications
You must be signed in to change notification settings - Fork 1
/
Environment.cpp
81 lines (61 loc) · 2.11 KB
/
Environment.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Environment.cpp: implementation of the CEnvironment class.
//
//////////////////////////////////////////////////////////////////////
# include "Environment.h"
# include "IntersectionInfo.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CEnvironment::CEnvironment()
{
}
CEnvironment::~CEnvironment()
{
}
/*********************************************************************
NAME : CEnvironment
DESCRIPTION: Parameterized constructor
PARAMETER : pos : Ignored
col : the color of the plane.
RETURN : NONE
EXCEPTION : NONE.
*********************************************************************/
CEnvironment::CEnvironment(CPoint3D pos, CColor col) : CShape(pos,col)
{
}
/*********************************************************************
NAME : GetIntersection
DESCRIPTION: This does not make much difference in case of the enivronment
this function simply returns a point at infinity.
PARAMETER : ray : Ignored.
RETURN : NONE
EXCEPTION : NONE.
*********************************************************************/
CIntersectionInfo CEnvironment::GetIntersection (CRay ray)
{
return CIntersectionInfo();
}
/*********************************************************************
NAME : GetNormalAt
DESCRIPTION: This does not make much sense in case of environement. Just
returns an empty vector.
PARAMETER : pt : Ignored.
RETURN : NONE
EXCEPTION : NONE.
*********************************************************************/
CVector CEnvironment::GetNormalAt(CPoint3D pt)
{
return CVector();
}
/*********************************************************************
NAME : ShadePoint
DESCRIPTION: This functin returns the color that should be displayed
for this object given the hit details.
PARAMETER : objHitInfo : detailed information about the hit.
RETURN : NONE
EXCEPTION : NONE.
*********************************************************************/
CColor CEnvironment::ShadePoint(CIntersectionInfo objHitInfo)
{
return objColor;
}