X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdimension.cpp;h=3060ff1b930c8682409f10993b73622562fbb098;hb=baf67656b97e3d61e9223e66ebe4f554e364cd4a;hp=5aa6a8829a815634a96135411c5c4bda46370580;hpb=9d5d4488ba75c407709556a7ed56b8d16e21834e;p=architektonas diff --git a/src/dimension.cpp b/src/dimension.cpp index 5aa6a88..3060ff1 100644 --- a/src/dimension.cpp +++ b/src/dimension.cpp @@ -18,16 +18,18 @@ #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) { } @@ -329,6 +331,16 @@ void Dimension::SetPoint2(Vector * v) needUpdate = true; } +Vector Dimension::GetPoint1(void) +{ + return position; +} + +Vector Dimension::GetPoint2(void) +{ + return endpoint; +} + void Dimension::FlipSides(void) { #if 0 @@ -342,3 +354,4 @@ void Dimension::FlipSides(void) #endif needUpdate = true; } +