From 0c391fdbce5a079cf03e483eb6174dd47806163d Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Aug 2019 21:08:47 +0800 Subject: *misc --- source/modules/asura-utils/Math/Vector4.h | 234 ------------------------------ 1 file changed, 234 deletions(-) delete mode 100644 source/modules/asura-utils/Math/Vector4.h (limited to 'source/modules/asura-utils/Math/Vector4.h') diff --git a/source/modules/asura-utils/Math/Vector4.h b/source/modules/asura-utils/Math/Vector4.h deleted file mode 100644 index a5bf549..0000000 --- a/source/modules/asura-utils/Math/Vector4.h +++ /dev/null @@ -1,234 +0,0 @@ -#ifndef _ASURA_ENGINE_VECTOR4_H__ -#define _ASURA_ENGINE_VECTOR4_H__ - -namespace AsuraEngine -{ - namespace Math - { - template - class Vector4 - { - public: - - //////////////////////////////////////////////////////////// - /// \brief Default constructor - /// - /// Creates a Vector4(0, 0, 0). - /// - //////////////////////////////////////////////////////////// - Vector4(); - - //////////////////////////////////////////////////////////// - /// \brief Construct the vector from its coordinates - /// - /// \param X X coordinate - /// \param Y Y coordinate - /// \param Z Z coordinate - /// - //////////////////////////////////////////////////////////// - Vector4(T X, T Y, T Z, T W); - - //////////////////////////////////////////////////////////// - /// \brief Construct the vector from another type of vector - /// - /// This constructor doesn't replace the copy constructor, - /// it's called only when U != T. - /// A call to this constructor will fail to compile if U - /// is not convertible to T. - /// - /// \param vector Vector to convert - /// - //////////////////////////////////////////////////////////// - template - explicit Vector4(const Vector4& vector); - - //////////////////////////////////////////////////////////// - // Member data - //////////////////////////////////////////////////////////// - T x; ///< X coordinate of the vector - T y; ///< Y coordinate of the vector - T z; ///< Z coordinate of the vector - T w; ///< W coordinate of the vector - }; - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of unary operator - - /// - /// \param left Vector to negate - /// - /// \return Memberwise opposite of the vector - /// - //////////////////////////////////////////////////////////// - template - Vector4 operator -(const Vector4& left); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator += - /// - /// This operator performs a memberwise addition of both vectors, - /// and assigns the result to \a left. - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a vector) - /// - /// \return Reference to \a left - /// - //////////////////////////////////////////////////////////// - template - Vector4& operator +=(Vector4& left, const Vector4& right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator -= - /// - /// This operator performs a memberwise subtraction of both vectors, - /// and assigns the result to \a left. - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a vector) - /// - /// \return Reference to \a left - /// - //////////////////////////////////////////////////////////// - template - Vector4& operator -=(Vector4& left, const Vector4& right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator + - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a vector) - /// - /// \return Memberwise addition of both vectors - /// - //////////////////////////////////////////////////////////// - template - Vector4 operator +(const Vector4& left, const Vector4& right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator - - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a vector) - /// - /// \return Memberwise subtraction of both vectors - /// - //////////////////////////////////////////////////////////// - template - Vector4 operator -(const Vector4& left, const Vector4& right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator * - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a scalar value) - /// - /// \return Memberwise multiplication by \a right - /// - //////////////////////////////////////////////////////////// - template - Vector4 operator *(const Vector4& left, T right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator * - /// - /// \param left Left operand (a scalar value) - /// \param right Right operand (a vector) - /// - /// \return Memberwise multiplication by \a left - /// - //////////////////////////////////////////////////////////// - template - Vector4 operator *(T left, const Vector4& right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator *= - /// - /// This operator performs a memberwise multiplication by \a right, - /// and assigns the result to \a left. - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a scalar value) - /// - /// \return Reference to \a left - /// - //////////////////////////////////////////////////////////// - template - Vector4& operator *=(Vector4& left, T right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator / - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a scalar value) - /// - /// \return Memberwise division by \a right - /// - //////////////////////////////////////////////////////////// - template - Vector4 operator /(const Vector4& left, T right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator /= - /// - /// This operator performs a memberwise division by \a right, - /// and assigns the result to \a left. - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a scalar value) - /// - /// \return Reference to \a left - /// - //////////////////////////////////////////////////////////// - template - Vector4& operator /=(Vector4& left, T right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator == - /// - /// This operator compares strict equality between two vectors. - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a vector) - /// - /// \return True if \a left is equal to \a right - /// - //////////////////////////////////////////////////////////// - template - bool operator ==(const Vector4& left, const Vector4& right); - - //////////////////////////////////////////////////////////// - /// \relates Vector4 - /// \brief Overload of binary operator != - /// - /// This operator compares strict difference between two vectors. - /// - /// \param left Left operand (a vector) - /// \param right Right operand (a vector) - /// - /// \return True if \a left is not equal to \a right - /// - //////////////////////////////////////////////////////////// - template - bool operator !=(const Vector4& left, const Vector4& right); - -#include "Vector4.inc" - - // Define the most common types - typedef Vector4 Vector4i; - typedef Vector4 Vector4f; - - } -} - -#endif \ No newline at end of file -- cgit v1.1-26-g67d0