-
Notifications
You must be signed in to change notification settings - Fork 1
/
Shape.cpp
84 lines (60 loc) · 1.9 KB
/
Shape.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
82
83
84
// Shape.cpp: implementation of the CShape class.
//
//////////////////////////////////////////////////////////////////////
# include "Shape.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CShape::CShape()
{
m_pShader = 0;
}
CShape::~CShape()
{
}
/*********************************************************************
NAME : CShape
DESCRIPTION: parameterized constructor
PARAMETER : pos : the position of the shape in space
col : the color of the shape.
RETURN : NONE
EXCEPTION : NONE
*********************************************************************/
CShape::CShape(CPoint3D pos, CColor col):COnScreenObject (pos)
{
this->objColor = col;
m_pShader = 0;
}
/*********************************************************************
NAME : SetObjectColor
DESCRIPTION: Sets the color of the shape
PARAMETER : col : the color of the shape
RETURN : NONE
EXCEPTION : NONE
*********************************************************************/
void CShape::SetObjectColor (CColor col)
{
this->objColor = col;
}
/*********************************************************************
NAME : GetObjectColor
DESCRIPTION: Gets the color of the shape
PARAMETER : NONE
RETURN : The CColor object describing the color of the object
EXCEPTION : NONE
*********************************************************************/
CColor CShape::GetObjectColor()
{
return objColor;
}
/*********************************************************************
NAME : AssignShader
DESCRIPTION: Assigns a shader to the shape object.
PARAMETER : NONE
RETURN : The CColor object describing the color of the object
EXCEPTION : NONE
*********************************************************************/
void CShape::AssignShader(CShader* shader)
{
m_pShader = shader;
}