diff options
author | Travis CI <zmoelnig@travis-ci.umlaeute.mur.at> | 2017-12-06 23:47:39 +0000 |
---|---|---|
committer | Travis CI <zmoelnig@travis-ci.umlaeute.mur.at> | 2017-12-06 23:47:39 +0000 |
commit | c886922cc0b8c32ead0459b581f51ff60fdebbd4 (patch) | |
tree | 98c9b3036116ebfefde32c8c278639b767e2d305 /Gem/develop/include/Gem/Utils/Vector.h | |
parent | ff954ec3b2de3f0bce8aee70680469468896df7d (diff) |
Gem 427a3d0e61d61e64e76facfa905c120356383bab osx/x86_64
built 'master:427a3d0e61d61e64e76facfa905c120356383bab' for osx/x86_64
Diffstat (limited to 'Gem/develop/include/Gem/Utils/Vector.h')
-rw-r--r-- | Gem/develop/include/Gem/Utils/Vector.h | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/Gem/develop/include/Gem/Utils/Vector.h b/Gem/develop/include/Gem/Utils/Vector.h index e427f04..0937048 100644 --- a/Gem/develop/include/Gem/Utils/Vector.h +++ b/Gem/develop/include/Gem/Utils/Vector.h @@ -19,14 +19,16 @@ LOG // This is our 2D point class. This will be used to store the UV coordinates. -class GEM_EXTERN CVector2 { +class GEM_EXTERN CVector2 +{ public: - float x, y; + float x, y; }; // This is our basic 3D point/vector class -class GEM_EXTERN CVector3 { +class GEM_EXTERN CVector3 +{ public: // the elements of a vector: float x, y, z; @@ -34,42 +36,42 @@ public: // A default constructor CVector3(void); - // This is our constructor that allows us to initialize our data upon creating an instance - CVector3(float X, float Y, float Z); + // This is our constructor that allows us to initialize our data upon creating an instance + CVector3(float X, float Y, float Z); - // Here we overload the + operator so we can add vectors together - CVector3 operator+(CVector3 vVector) const; + // Here we overload the + operator so we can add vectors together + CVector3 operator+(CVector3 vVector) const; - // Here we overload the - operator so we can subtract vectors - CVector3 operator-(CVector3 vVector) const; + // Here we overload the - operator so we can subtract vectors + CVector3 operator-(CVector3 vVector) const; - // Here we overload the - operator so we can negate the vector - CVector3 operator-(void) const; + // Here we overload the - operator so we can negate the vector + CVector3 operator-(void) const; - // Here we overload the * operator so we can multiply by scalars - CVector3 operator*(float num) const; + // Here we overload the * operator so we can multiply by scalars + CVector3 operator*(float num) const; - // Here we overload the * operator so we can dot-multiply - float operator*(CVector3 vVector) const; + // Here we overload the * operator so we can dot-multiply + float operator*(CVector3 vVector) const; - // cross-multiplication - CVector3 cross(CVector3 vVector) const; + // cross-multiplication + CVector3 cross(CVector3 vVector) const; - // Here we overload the / operator so we can divide by a scalar - CVector3 operator/(float num) const; + // Here we overload the / operator so we can divide by a scalar + CVector3 operator/(float num) const; - // here we calculate the absolute-value of the vector - float abs(void) const; + // here we calculate the absolute-value of the vector + float abs(void) const; - // here we calculate the square of the absolute-value of the vector - float abs2(void) const; + // here we calculate the square of the absolute-value of the vector + float abs2(void) const; - // here we normalize the vector - CVector3 normalize(void) const; + // here we normalize the vector + CVector3 normalize(void) const; - // here we compare 2 vectors on approx. equality - bool equals(CVector3 vVector, float epsilon) const; + // here we compare 2 vectors on approx. equality + bool equals(CVector3 vVector, float epsilon) const; }; |