]> Shamusworld >> Repos - architektonas/blobdiff - src/vector.h
Converted codebase from Qt4 to Qt5.
[architektonas] / src / vector.h
index c7f2771ce001a45e47dd9eebc35f14a82b5bb68d..62438986ef653bd0462d9e600e307105ce592ba3 100644 (file)
@@ -3,20 +3,22 @@
 //
 // Various structures used for 3 dimensional imaging
 //
-// by James L. Hammons
-// (C) 2001 Underground Software
+// by James Hammons
+// (C) 2001, 2014 Underground Software
 //
 
 #ifndef __VECTOR_H__
 #define __VECTOR_H__
 
-// What we'll do here is create the vector type and use typedef to alias Point to it. Yeah, that's it.
+// What we'll do here is create the vector type and use typedef to alias Point
+// to it. Yeah, that's it.
 
 class Vector
 {
        public:
                Vector(double xx = 0, double yy = 0, double zz = 0);
                Vector(Vector tail, Vector head);               // Create vector from two points
+               void SetAngleAndLength(double angle, double length);
                Vector operator=(Vector const v);
                Vector operator+(Vector const v);
                Vector operator-(Vector const v);
@@ -49,6 +51,7 @@ class Vector
                static double Magnitude(Vector v1, Vector v2);
                static double Parameter(Vector v1, Vector v2, Vector p);
                static Vector Normal(Vector v1, Vector v2);
+               static double AngleBetween(Vector a, Vector b);
 
        public:
                double x, y, z;