Updated documentation of the Vector2 and Vector3 classes
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1237 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
b201b18f3d
commit
1d3a7e8375
4 changed files with 223 additions and 168 deletions
|
@ -23,8 +23,6 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Default constructor
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T>::Vector3() :
|
||||
|
@ -36,8 +34,6 @@ z(0)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Construct the color from its coordinates
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T>::Vector3(T X, T Y, T Z) :
|
||||
|
@ -49,8 +45,6 @@ z(Z)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator - overload ; returns the opposite of a vector
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T> operator -(const Vector3<T>& left)
|
||||
|
@ -59,8 +53,6 @@ inline Vector3<T> operator -(const Vector3<T>& left)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator += overload ; add two vectors and assign to the first op
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T>& operator +=(Vector3<T>& left, const Vector3<T>& right)
|
||||
|
@ -73,8 +65,6 @@ inline Vector3<T>& operator +=(Vector3<T>& left, const Vector3<T>& right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator -= overload ; subtract two vectors and assign to the first op
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T>& operator -=(Vector3<T>& left, const Vector3<T>& right)
|
||||
|
@ -87,8 +77,6 @@ inline Vector3<T>& operator -=(Vector3<T>& left, const Vector3<T>& right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator + overload ; adds two vectors
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T> operator +(const Vector3<T>& left, const Vector3<T>& right)
|
||||
|
@ -97,8 +85,6 @@ inline Vector3<T> operator +(const Vector3<T>& left, const Vector3<T>& right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator - overload ; subtracts two vectors
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T> operator -(const Vector3<T>& left, const Vector3<T>& right)
|
||||
|
@ -107,8 +93,6 @@ inline Vector3<T> operator -(const Vector3<T>& left, const Vector3<T>& right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator * overload ; multiply a vector by a scalar value
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T> operator *(const Vector3<T>& left, T right)
|
||||
|
@ -117,8 +101,6 @@ inline Vector3<T> operator *(const Vector3<T>& left, T right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator * overload ; multiply a scalar value by a vector
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T> operator *(T left, const Vector3<T>& right)
|
||||
|
@ -127,8 +109,6 @@ inline Vector3<T> operator *(T left, const Vector3<T>& right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator *= overload ; multiply-assign a vector by a scalar value
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T>& operator *=(Vector3<T>& left, T right)
|
||||
|
@ -141,8 +121,6 @@ inline Vector3<T>& operator *=(Vector3<T>& left, T right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator / overload ; divide a vector by a scalar value
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T> operator /(const Vector3<T>& left, T right)
|
||||
|
@ -151,8 +129,6 @@ inline Vector3<T> operator /(const Vector3<T>& left, T right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator /= overload ; divide-assign a vector by a scalar value
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline Vector3<T>& operator /=(Vector3<T>& left, T right)
|
||||
|
@ -165,8 +141,6 @@ inline Vector3<T>& operator /=(Vector3<T>& left, T right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator == overload ; compares the equality of two vectors
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline bool operator ==(const Vector3<T>& left, const Vector3<T>& right)
|
||||
|
@ -175,8 +149,6 @@ inline bool operator ==(const Vector3<T>& left, const Vector3<T>& right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Operator != overload ; compares the difference of two vectors
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
inline bool operator !=(const Vector3<T>& left, const Vector3<T>& right)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue