X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fstructs.h;fp=src%2Fstructs.h;h=20a03d264ba0016e3a03835bacf6f7d209750540;hb=92b64dc831492f1d6311a8baece66408f7659f67;hp=62366adaca188179d705dfe97e6c76f4819b1ab6;hpb=d00cd5f46252ca0fb3df6e8191dc75f8991b2aa2;p=architektonas diff --git a/src/structs.h b/src/structs.h index 62366ad..20a03d2 100644 --- a/src/structs.h +++ b/src/structs.h @@ -60,6 +60,9 @@ struct Line { Line(Vector pt1, Vector pt2, float th = 1.0, uint32_t c = 0, int l = LSSolid): type(OTLine), id(Global::objectID++), layer(0), color(c), thickness(th), style(l), selected(false), hovered(false), hitObject(false) { p[0] = pt1; p[1] = pt2; hitPoint[0] = hitPoint[1] = false; } + Vector Vect(void) { return Vector(p[0], p[1]); } + Vector Unit(void) { return Vector(p[0], p[1]).Unit(); } + double Length(void) { return Vector(p[0], p[1]).Magnitude(); } }; struct Circle {