2008-04-23 07:29:19 +00:00
|
|
|
|
|
|
|
#ifndef __POLYGON_H
|
|
|
|
#define __POLYGON_H
|
|
|
|
|
2008-04-24 06:22:16 +00:00
|
|
|
template <class T>
|
|
|
|
class SList {
|
2008-04-23 07:29:19 +00:00
|
|
|
public:
|
2008-04-24 06:22:16 +00:00
|
|
|
T *elem;
|
|
|
|
int n;
|
|
|
|
int elemsAllocated;
|
2008-04-23 07:29:19 +00:00
|
|
|
};
|
|
|
|
|
2008-04-24 06:22:16 +00:00
|
|
|
class SEdge {
|
2008-04-23 07:29:19 +00:00
|
|
|
public:
|
2008-04-24 06:22:16 +00:00
|
|
|
Vector a, b;
|
|
|
|
};
|
|
|
|
|
|
|
|
class SEdgeList {
|
|
|
|
public:
|
|
|
|
SList<SEdge> l;
|
|
|
|
|
2008-04-23 07:29:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class SContour {
|
|
|
|
public:
|
2008-04-24 06:22:16 +00:00
|
|
|
SList<Vector> l;
|
2008-04-23 07:29:19 +00:00
|
|
|
};
|
|
|
|
|
2008-04-24 06:22:16 +00:00
|
|
|
class SPolygon {
|
|
|
|
public:
|
|
|
|
SList<SContour> l;
|
|
|
|
};
|
|
|
|
|
|
|
|
class SPolyhedron {
|
|
|
|
SList<SPolygon> l;
|
2008-04-23 07:29:19 +00:00
|
|
|
public:
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2008-04-24 06:22:16 +00:00
|
|
|
|