X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvector.h;h=67d9aa92f8e0f0d82ebb7bf2fdff4c7febe63277;hb=d00cd5f46252ca0fb3df6e8191dc75f8991b2aa2;hp=4bcb461a4a730b459d671852e2b7a633d962af1c;hpb=84fc4387b9a6051819da5c9ed688de1ec372c7f7;p=architektonas diff --git a/src/vector.h b/src/vector.h index 4bcb461..67d9aa9 100644 --- a/src/vector.h +++ b/src/vector.h @@ -4,7 +4,7 @@ // Various structures used for 3 dimensional imaging // // by James Hammons -// (C) 2001, 2014 Underground Software +// (C) 2001, 2018 Underground Software // #ifndef __VECTOR_H__ @@ -20,28 +20,29 @@ class Vector { public: Vector(double xx = 0, double yy = 0, double zz = 0); - Vector(Vector tail, Vector head); // Create vector from two points + Vector(Vector tail, Vector head); // Create vector from two points + Vector(const Vector &v); void SetAngleAndLength(double angle, double length); Vector operator=(Vector const v); Vector operator+(Vector const v); Vector operator-(Vector const v); - Vector operator-(void); // Unary negation - Vector operator*(double const v); // Vector times constant (double) - Vector operator*(float const v); // Vector times constant (float) - Vector operator/(double const v); // Vector divided by constant (double) - Vector operator/(float const v); // Vector divided by constant (float) - Vector operator*(Vector const v); // Vector product - double Dot(Vector const v); // Dot product + Vector operator-(void); // Unary negation + Vector operator*(double const v); // Vector times constant (double) + Vector operator*(float const v); // Vector times constant (float) + Vector operator/(double const v); // Vector divided by constant (double) + Vector operator/(float const v); // Vector divided by constant (float) + Vector operator*(Vector const v); // Vector product + double Dot(Vector const v); // Dot product - Vector& operator*=(double const v); // Vector times constant self-assignment - Vector& operator/=(double const v); // Vector divided by constant self-assignment - Vector& operator+=(Vector const v); // Vector plus Vector self-assignment - Vector& operator+=(double const v); // Vector plus constant self-assignment - Vector& operator-=(Vector const v); // Vector minus Vector self-assignment - Vector& operator-=(double const v); // Vector minus constant self-assignment + Vector& operator*=(double const v); // Vector times constant self-assignment + Vector& operator/=(double const v); // Vector divided by constant self-assignment + Vector& operator+=(Vector const v); // Vector plus Vector self-assignment + Vector& operator+=(double const v); // Vector plus constant self-assignment + Vector& operator-=(Vector const v); // Vector minus Vector self-assignment + Vector& operator-=(double const v); // Vector minus constant self-assignment - bool operator==(Vector const v); // Check for equality - bool operator!=(Vector const v); // Check for inequality + bool operator==(Vector const v); // Check for equality + bool operator!=(Vector const v); // Check for inequality Vector Unit(void); double Magnitude(void);