summaryrefslogtreecommitdiff
path: root/source/modules/asura-utils/math/vector3.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-utils/math/vector3.hpp')
-rw-r--r--source/modules/asura-utils/math/vector3.hpp235
1 files changed, 0 insertions, 235 deletions
diff --git a/source/modules/asura-utils/math/vector3.hpp b/source/modules/asura-utils/math/vector3.hpp
deleted file mode 100644
index c526ace..0000000
--- a/source/modules/asura-utils/math/vector3.hpp
+++ /dev/null
@@ -1,235 +0,0 @@
-#ifndef _ASURA_ENGINE_VECTOR3_H__
-#define _ASURA_ENGINE_VECTOR3_H__
-
-namespace AsuraEngine
-{
- namespace Math
- {
- template <typename T>
- class Vector3
- {
- public:
-
- ////////////////////////////////////////////////////////////
- /// \brief Default constructor
- ///
- /// Creates a Vector3(0, 0, 0).
- ///
- ////////////////////////////////////////////////////////////
- Vector3();
-
- ////////////////////////////////////////////////////////////
- /// \brief Construct the vector from its coordinates
- ///
- /// \param X X coordinate
- /// \param Y Y coordinate
- /// \param Z Z coordinate
- ///
- ////////////////////////////////////////////////////////////
- Vector3(T X, T Y, T Z);
-
- ////////////////////////////////////////////////////////////
- /// \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 <typename U>
- explicit Vector3(const Vector3<U>& vector);
-
- ////////////////////////////////////////////////////////////
- // Member data
- ////////////////////////////////////////////////////////////
- T x; ///< X coordinate of the vector
- T y; ///< Y coordinate of the vector
- T z; ///< Z coordinate of the vector
- };
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \brief Overload of unary operator -
- ///
- /// \param left Vector to negate
- ///
- /// \return Memberwise opposite of the vector
- ///
- ////////////////////////////////////////////////////////////
- template <typename T>
- Vector3<T> operator -(const Vector3<T>& left);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- Vector3<T>& operator +=(Vector3<T>& left, const Vector3<T>& right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- Vector3<T>& operator -=(Vector3<T>& left, const Vector3<T>& right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \brief Overload of binary operator +
- ///
- /// \param left Left operand (a vector)
- /// \param right Right operand (a vector)
- ///
- /// \return Memberwise addition of both vectors
- ///
- ////////////////////////////////////////////////////////////
- template <typename T>
- Vector3<T> operator +(const Vector3<T>& left, const Vector3<T>& right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \brief Overload of binary operator -
- ///
- /// \param left Left operand (a vector)
- /// \param right Right operand (a vector)
- ///
- /// \return Memberwise subtraction of both vectors
- ///
- ////////////////////////////////////////////////////////////
- template <typename T>
- Vector3<T> operator -(const Vector3<T>& left, const Vector3<T>& right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- Vector3<T> operator *(const Vector3<T>& left, T right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- Vector3<T> operator *(T left, const Vector3<T>& right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- Vector3<T>& operator *=(Vector3<T>& left, T right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- Vector3<T> operator /(const Vector3<T>& left, T right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- Vector3<T>& operator /=(Vector3<T>& left, T right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- bool operator ==(const Vector3<T>& left, const Vector3<T>& right);
-
- ////////////////////////////////////////////////////////////
- /// \relates Vector3
- /// \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 <typename T>
- bool operator !=(const Vector3<T>& left, const Vector3<T>& right);
-
-#include "Vector3.inc"
-
- // Define the most common types
- typedef Vector3<int> Vector3i;
- typedef Vector3<float> Vector3f;
-
- }
-}
-
-namespace AEMath = AsuraEngine::Math;
-
-#endif \ No newline at end of file