Browse Source

Doc++

Missed some leftover && from 7e1a260286,
documented Matrix Implementation::SequenceGenerator a bit, added
constexpr todos.
pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
a23661a171
  1. 9
      src/Math/Matrix.h
  2. 2
      src/Math/Matrix3.h
  3. 4
      src/Math/Matrix4.h
  4. 1
      src/Math/Vector.h
  5. 1
      src/Math/Vector2.h
  6. 1
      src/Math/Vector3.h
  7. 1
      src/Math/Vector4.h

9
src/Math/Matrix.h

@ -29,11 +29,12 @@ namespace Implementation {
template<size_t ...> struct Sequence {};
template<size_t N, size_t ...S> struct GenerateSequence:
GenerateSequence<N-1, N-1, S...> {};
/* E.g. GenerateSequence<3>::Type is Sequence<0, 1, 2> */
template<size_t N, size_t ...sequence> struct GenerateSequence:
GenerateSequence<N-1, N-1, sequence...> {};
template<size_t ...S> struct GenerateSequence<0, S...> {
typedef Sequence<S...> Type;
template<size_t ...sequence> struct GenerateSequence<0, sequence...> {
typedef Sequence<sequence...> Type;
};
}
#endif

2
src/Math/Matrix3.h

@ -50,7 +50,7 @@ template<class T> class Matrix3: public Matrix<T, 3> {
0.0f, 0.0f, identity ? 1.0f : 0.0f
} {}
/** @copydoc Matrix::Matrix(T, U&&...) */
/** @copydoc Matrix::Matrix(T, U...) */
#ifndef DOXYGEN_GENERATING_OUTPUT
template<class ...U> inline constexpr Matrix3(T first, U... next): Matrix<T, 3>(first, next...) {}
#else

4
src/Math/Matrix4.h

@ -119,11 +119,11 @@ template<class T> class Matrix4: public Matrix<T, 4> {
0.0f, 0.0f, 0.0f, identity ? 1.0f : 0.0f
} {}
/** @copydoc Matrix::Matrix(T, U&&...) */
/** @copydoc Matrix::Matrix(T, U...) */
#ifndef DOXYGEN_GENERATING_OUTPUT
template<class ...U> inline constexpr Matrix4(T first, U... next): Matrix<T, 4>(first, next...) {}
#else
template<class ...U> inline constexpr Matrix4(T first, U&&... next) {}
template<class ...U> inline constexpr Matrix4(T first, U... next) {}
#endif
/** @copydoc Matrix::Matrix(const Matrix<T, size>&) */

1
src/Math/Vector.h

@ -87,6 +87,7 @@ template<class T, size_t size> class Vector {
* @param value Value for all fields
*/
inline explicit Vector(T value) {
/** @todo constexprize */
for(size_t i = 0; i != size; ++i)
_data[i] = value;
}

1
src/Math/Vector2.h

@ -37,6 +37,7 @@ template<class T> class Vector2: public Vector<T, 2> {
}
/** @copydoc Vector::Vector(T) */
/** @todo Use original constructor when it is constexpr */
inline constexpr explicit Vector2(T value = T()): Vector<T, 2>(value, value) {}
/** @copydoc Vector::Vector(const Vector&) */

1
src/Math/Vector3.h

@ -53,6 +53,7 @@ template<class T> class Vector3: public Vector<T, 3> {
}
/** @copydoc Vector::Vector(T) */
/** @todo Use original constructor when it is constexpr */
inline constexpr explicit Vector3(T value = T()): Vector<T, 3>(value, value, value) {}
/** @copydoc Vector::Vector(const Vector&) */

1
src/Math/Vector4.h

@ -44,6 +44,7 @@ template<class T> class Vector4: public Vector<T, 4> {
inline constexpr Vector4(): Vector<T, 4>(T(0), T(0), T(0), T(1)) {}
/** @copydoc Vector::Vector(T) */
/** @todo Use original constructor when it is constexpr */
inline constexpr explicit Vector4(T value): Vector<T, 4>(value, value, value, value) {}
/** @copydoc Vector::Vector(const Vector&) */

Loading…
Cancel
Save