-
Notifications
You must be signed in to change notification settings - Fork 0
/
GraphicObject.h
52 lines (45 loc) · 1.35 KB
/
GraphicObject.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
45
46
47
48
49
50
51
52
//---------------------------------------------------------------------------
#ifndef GraphicObjectH
#define GraphicObjectH
#include <vector>
#include <vcl.h>
#include <map>
#include "Vertice.h"
#include "Edge.h"
#include "Constants.h"
#include "Object3D.h"
//---------------------------------------------------------------------------
using namespace std;
class Matrix;
class GraphicObject : virtual public Object3D
{
private :
vector<Edge *> edges;
public :
map<UnicodeString, Vertice *> allVertices;
GraphicObject();
GraphicObject(const GraphicObject&);
inline void addVertice(const Vertice *);
inline void addEdge(const Edge *);
void applyTransform(Matrix *);
void applyRotation(const double, const double);
void draw(Graphics::TBitmap *);
Vertice *a;
Vertice *b;
Vertice *c;
};
//---------------------------------------------------------------------------
// Custom methods
//---------------------------------------------------------------------------
inline void GraphicObject::addVertice(const Vertice *src)
{
allVertices[src->tag] = new Vertice(*src);
}
//---------------------------------------------------------------------------
inline void GraphicObject::addEdge (const Edge *srcEdge)
{
Edge *edge = new Edge(*srcEdge);
edges.push_back(edge);
}
//---------------------------------------------------------------------------
#endif