-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshape.cpp
More file actions
124 lines (92 loc) · 1.67 KB
/
shape.cpp
File metadata and controls
124 lines (92 loc) · 1.67 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#include <QCoreApplication>
#include <iostream>
#include "shape.h"
//constructor
Shape::Shape(void)
{
//std::cout << "shape constructor called" << std::endl;
mID = 0;
}
//destructor
Shape::~Shape(void)
{
//std::cout << "shape destructor called" << std::endl;
}
//Define all of the "Get" Methods (functions)
void Shape::GetIdentifier(int &ID)
{
ID = mID;
}
void Shape::GetTranslation(int &tx, int &ty, int &tz)
{
tx = mTx;
ty = mTy;
tz = mTz;
}
void Shape::GetRotation(int &rx, int &ry, int &rz)
{
rx = mRx;
ry = mRy;
rz = mRz;
}
void Shape::GetScale(int &sx, int &sy, int &sz)
{
sx = mSx;
sy = mSy;
sz = mSz;
}
void Shape::GetFillColor(float &r, float &g, float &b)
{
r = mRedF;
g = mGreenF;
b = mBlueF;
}
void Shape::GetLineColor(int &r, int &g, int &b)
{
r = mRedL;
g = mGreenL;
b = mBlueL;
}
void Shape::GetLineWidth(int &width)
{
width = mlWidth;
}
//Define all of the "Set" Methods (functions)
void Shape::SetIdentifier(const int ID)
{
mID = ID;
}
void Shape::SetTranslation(const int tx, const int ty, const int tz)
{
mTx = tx;
mTy = ty;
mTz = tz;
}
void Shape::SetRotation(const int rx, const int ry, const int rz)
{
mRx = rx;
mRy = ry;
mRz = rz;
}
void Shape::SetScale(const int sx, const int sy, const int sz)
{
mSx = sx;
mSy = sy;
mSz = sz;
}
void Shape::SetFillColor(const float r, const float g, const float b)
{
mRedF = r;
mGreenF = g;
mBlueF = b;
}
void Shape::SetLineColor(const int r, const int g, const int b)
{
mRedL = r;
mGreenL = g;
mBlueL = b;
}
void Shape::SetLineWidth(const int width)
{
mlWidth = width;
}