]> Shamusworld >> Repos - architektonas/blobdiff - src/vector.h
Added ability to edit grid unit in base units, work on Dimension.
[architektonas] / src / vector.h
index c1cee7dea145eade87160833abd5404f7a22f3a7..0e7fc864f371c4d3c3478a47c9119c583ff3948d 100644 (file)
@@ -16,6 +16,7 @@ class Vector
 {\r
        public:\r
                Vector(double xx = 0, double yy = 0, double zz = 0);\r
+               Vector(Vector head, Vector tail);               // Create vector from two points\r
                Vector operator=(Vector const v);\r
                Vector operator+(Vector const v);\r
                Vector operator-(Vector const v);\r
@@ -31,6 +32,11 @@ class Vector
                Vector& operator/=(double const v);             // Vector divided by constant self-assignment\r
                Vector& operator+=(Vector const v);             // Vector plus Vector self-assignment\r
                Vector& operator+=(double const v);             // Vector plus constant self-assignment\r
+               Vector& operator-=(Vector const v);             // Vector minus Vector self-assignment\r
+               Vector& operator-=(double const v);             // Vector minus constant self-assignment\r
+\r
+               bool operator==(Vector const v);                // Check for equality\r
+               bool operator!=(Vector const v);                // Check for inequality\r
 \r
                Vector Unit(void);\r
                double Magnitude(void);\r
@@ -40,6 +46,8 @@ class Vector
                // Class methods\r
 \r
                static double Dot(Vector v1, Vector v2);\r
+               static double Magnitude(Vector v1, Vector v2);\r
+               static double Parameter(Vector v1, Vector v2, Vector p);\r
 \r
        public:\r
                double x, y, z;\r