10 enum ObjectType { OTNone, OTLine, OTCircle, OTEllipse, OTArc, OTDimension, OTSpline, OTText, OTContainer };
12 enum DimensionType { DTLinear, DTLinearVert, DTLinearHorz, DTRadial, DTDiametric, DTCircumferential, DTAngular, DTLeader };
14 enum ToolType { TTNone, TTLine, TTCircle, TTEllipse, TTArc, TTDimension, TTText, TTPolygon, TTSpline, TTRotate, TTMirror, TTTrim, TTTriangulate, TTDelete };
16 #define OBJECT_COMMON \
33 Line(): type(OTLine), id(Global::objectID++) {}
34 Line(Vector pt1, Vector pt2, float th = 1.0, uint32_t c = 0, int l = LSSolid):
35 type(OTLine), id(Global::objectID++), layer(0), color(c), thickness(th),
36 style(l), selected(false), hovered(false), p1(pt1), p2(pt2) {}
44 Circle(Vector pt1, double r, float th = 1.0, uint32_t c = 0, int l = LSSolid):
45 type(OTCircle), id(Global::objectID++), layer(0), color(c), thickness(th),
46 style(l), selected(false), hovered(false), p1(pt1), radius(r) {}
56 Ellipse(Vector pt1, Vector pt2, double r1, double r2, float th = 1.0, uint32_t c = 0, int l = LSSolid):
57 type(OTEllipse), id(Global::objectID++), layer(0), color(c), thickness(th),
58 style(l), selected(false), hovered(false), p1(pt1), p2(pt2), radius1(r1), radius2(r2) {}
68 Arc(Vector pt1, double r, double a1, double a2, float th = 1.0, uint32_t c = 0, int l = LSSolid):
69 type(OTArc), id(Global::objectID++), layer(0), color(c), thickness(th),
70 style(l), selected(false), hovered(false), p1(pt1), radius(r), angle1(a1), angle2(a2) {}
80 Dimension(Vector pt1, Vector pt2, DimensionType dt = DTLinear, float th = 1.0, uint32_t c = 0x0000FF, int l = LSSolid):
81 type(OTDimension), id(Global::objectID++), layer(0), color(c), thickness(th),
82 style(l), selected(false), hovered(false), subtype(dt), p1(pt1), p2(pt2) {}
90 Text(Vector pt, char * str, float th = 10.0, uint32_t c = 0):
91 type(OTText), id(Global::objectID++), layer(0), color(c), thickness(th),
92 style(LSSolid), selected(false), hovered(false), p1(pt), s(str) {}
98 std::vector<void *> objects;
102 Container(): type(OTContainer), id(Global::objectID++), selected(false), hovered(false) {}
110 #endif // __STRUCTS_H__