-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshape.h
More file actions
63 lines (46 loc) · 1.88 KB
/
shape.h
File metadata and controls
63 lines (46 loc) · 1.88 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
#ifndef SHAPE_H
#define SHAPE_H
class Shape
{
friend class Linkedlist;
public:
Shape(void); //constructor
virtual ~Shape(void); //destructor
//pure virtual print function
virtual void print()=0;
//pure virtual get_type function
virtual int GetType()=0;
//Methods (functions) of class Shape
void GetIdentifier(int &ID);
void GetTranslation(int &tx, int &ty, int &tz);
void GetRotation(int &rx, int &ry, int &rz);
void GetScale(int &sx, int &sy, int &sz);
void GetFillColor(float &r, float &g, float &b);
void GetLineColor(int &r, int &g, int &b);
void GetLineWidth(int &width);
void SetIdentifier(const int ID);
void SetTranslation(const int tx, const int ty, const int tz);
void SetRotation(const int rx, const int ry, const int rz);
void SetScale(const int sx, const int sy, const int sz);
void SetFillColor(const float r, const float g, const float b);
void SetLineColor(const int r, const int g, const int b);
void SetLineWidth(const int width);
//Members (variables) of class Shape
// Shape* Next(){return mNextPtr;}
// Shape* Previous(){return mPrevPtr;}
private:
int mID; // object ID
int mTx, mTy, mTz; // object translation
int mRx, mRy, mRz; // object rotation
int mSx, mSy, mSz; // object scale
float mRedF; // object fill color
float mGreenF; // object fill color
float mBlueF; // object fill color
int mRedL; // object line color
int mGreenL; // object line color
int mBlueL; // object line color
int mlWidth; // object line width
// Shape* mNextPtr; // linked list next pointer
// Shape* mPrevPtr; // linked list previous pointer
};
#endif // SHAPE_H