#include "painter.h"
-Dimension::Dimension(Vector p1, Vector p2, Object * p/*= NULL*/): Object(p1, p), endpoint(p2),
+Dimension::Dimension(Vector p1, Vector p2, DimensionType dt/*= DTLinear*/ ,Object * p/*= NULL*/):
+ Object(p1, p), endpoint(p2),
dragging(false), draggingHandle1(false), draggingHandle2(false),
- length(p2.Magnitude()), point1(NULL), point2(NULL)
+ length(p2.Magnitude()), type(dt), point1(NULL), point2(NULL)
{
}
// This is bad, p1 & p2 could be NULL, causing much consternation...
-Dimension::Dimension(Vector * p1, Vector * p2, Object * p/*= NULL*/): Object(*p1, p), endpoint(*p2),
+Dimension::Dimension(Vector * p1, Vector * p2, DimensionType dt/*= DTLinear*/ , Object * p/*= NULL*/):
+ Object(*p1, p), endpoint(*p2),
dragging(false), draggingHandle1(false), draggingHandle2(false),
- length(p2->Magnitude()), point1(p1), point2(p2)
+ length(p2->Magnitude()), type(dt), point1(p1), point2(p2)
{
}
needUpdate = true;
}
+Vector Dimension::GetPoint1(void)
+{
+ return position;
+}
+
+Vector Dimension::GetPoint2(void)
+{
+ return endpoint;
+}
+
void Dimension::FlipSides(void)
{
#if 0
#endif
needUpdate = true;
}
+