-
Notifications
You must be signed in to change notification settings - Fork 0
/
Shape.h
44 lines (42 loc) · 2.15 KB
/
Shape.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
#ifndef Shape_h
#define Shape_h
// Êëàñ äëÿ ïðåäñòàâëåííÿ àáñòðàêòíî¿ ô³ãóðè
class Shape
{
private:
float xCenter, yCenter, zCenter; // êîîðäèíàòè öåíòðó
float xSize, ySize, zSize; // ðîçì³ðè
float* diffColor, * ambiColor, * specColor; // êîëüîðè
public:
Shape(float xCenter, float yCenter, float zCenter,
float xSize, float ySize, float zSize,
float* diffColor, float* ambiColor, float* specColor);
Shape(float xCenter, float yCenter, float zCenter,
float Size, float* diffColor, float* ambiColor, float* specColor);
virtual ~Shape() { }
// Ôóíêö³¿ äîñòóïó:
float getXCenter() const { return xCenter; }
float getYCenter() const { return yCenter; }
float getZCenter() const { return zCenter; }
void setXCenter(float xCenter) { this->xCenter = xCenter; }
void setYCenter(float yCenter) { this->yCenter = yCenter; }
void setZCenter(float zCenter) { this->zCenter = zCenter; }
void setCoords(float xCenter, float yCenter, float zCenter);
float getXSize() const { return xSize; }
float getYSize() const { return ySize; }
float getZSize() const { return zSize; }
void setXSize(float xSize) { this->xSize = xSize; }
void setYSize(float ySize) { this->ySize = ySize; }
void setZSize(float zSize) { this->zSize = zSize; }
void setSize(float xSize, float ySize, float zSize);
float* getDiffColor() const { return diffColor; }
float* getAmbiColor() const { return ambiColor; }
float* getSpecColor() const { return specColor; }
void setDiffColor(float* diffColor) { this->diffColor = diffColor; }
void setAmbiColor(float* ambiColor) { this->ambiColor = ambiColor; }
void setSpecColor(float* specColor) { this->specColor = specColor; }
void setColors(float* diffColor, float* ambiColor, float* specColor);
void deleteColors();
virtual void draw() = 0; // öÿ ôóíêö³ÿ ïîâèííà áóòè ïåðåêðèòà ó ïîõ³äíèõ êëàñàõ
};
#endif