From 0d2f2c966f9f08263df8dcfb6df1dd822fac83d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 5 Dec 2011 16:41:28 +0100 Subject: [PATCH] Doc++ Updated and simplified Main page of documentation, finally fixed doxygen warnings with @copydoc in Math namespace. --- doc/MainPage.dox | 22 +++++++++++----------- src/Math/Matrix3.h | 8 ++++---- src/Math/Matrix4.h | 8 ++++---- src/Math/Vector2.h | 6 +++--- src/Math/Vector3.h | 6 +++--- src/Math/Vector4.h | 6 +++--- src/MeshBuilder.h | 11 ++++++----- src/TypeTraits.h | 2 +- 8 files changed, 35 insertions(+), 34 deletions(-) diff --git a/doc/MainPage.dox b/doc/MainPage.dox index b46a1f607..d14e58748 100644 --- a/doc/MainPage.dox +++ b/doc/MainPage.dox @@ -1,22 +1,22 @@ +namespace Magnum { /** @mainpage

%Magnum is simple graphical engine written in C++11 and OpenGL 3 Core Profile. Features:

@section BasicUsage Basic usage

%Scene in %Magnum is composed of hierarchically connected object instances. -To build the scene, you need @ref Magnum::Scene "Scene" object with assigned -@ref Magnum::Camera "Camera" and some @ref Magnum::Object "Object" instances. -When rendering using Magnum::Scene::draw(), the engine goes through all objects -connected to the scene and calls Magnum::Object::draw() on them.

+To build the scene, you need Scene object with assigned Camera and some Object +instances. When rendering using Scene::draw(), the engine goes through all +objects connected to the scene and calls Object::draw() on them.

All objects are by default empty. To make object renderable in the scene, -you must reimplement Magnum::Object::draw(), and for example bind an -@ref Magnum::AbstractShaderProgram "shader", @ref Magnum::Texture "texture" and -render an prepared @ref Magnum::Mesh "mesh".

-

Basic usage examples are in examples/ subdirectory.

+you must reimplement Object::draw(), and for example bind an +@ref AbstractShaderProgram "shader", @ref Texture "texture" and +render an prepared @ref Mesh "mesh".

*/ +} diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index 51ef33f17..4122d3c49 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -39,16 +39,16 @@ template class Matrix3: public Matrix { /** @copydoc Matrix::operator=() */ inline Matrix3& operator=(const Matrix& other) { return Matrix::operator=(other); } - /** @copydoc Matrix::at(size_t) */ + /** @copydoc Matrix::at(size_t) const */ inline Vector3 at(size_t col) const { return Matrix::at(col); } - /** @copydoc Matrix::at(size_t, size_t) */ + /** @copydoc Matrix::at(size_t, size_t) const */ inline T at(size_t row, size_t col) const { return Matrix::at(row, col); } - /** @copydoc Matrix::operator*(const Matrix&) */ + /** @copydoc Matrix::operator*(const Matrix&) const */ inline Matrix3 operator*(const Matrix& other) const { return Matrix::operator*(other); } - /** @copydoc Matrix::operator*(const Vector&) */ + /** @copydoc Matrix::operator*(const Vector&) const */ inline Vector3 operator*(const Vector& other) const { return Matrix::operator*(other); } /** @copydoc Matrix::transposed() */ diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index 68e1599f7..67e60f129 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -139,16 +139,16 @@ template class Matrix4: public Matrix { /** @copydoc Matrix::operator=() */ inline Matrix4& operator=(const Matrix& other) { return Matrix::operator=(other); } - /** @copydoc Matrix::at(size_t) */ + /** @copydoc Matrix::at(size_t) const */ inline Vector4 at(size_t col) const { return Matrix::at(col); } - /** @copydoc Matrix::at(size_t, size_t) */ + /** @copydoc Matrix::at(size_t, size_t) const */ inline T at(size_t row, size_t col) const { return Matrix::at(row, col); } - /** @copydoc Matrix::operator*(const Matrix&) */ + /** @copydoc Matrix::operator*(const Matrix&) const */ inline Matrix4 operator*(const Matrix& other) const { return Matrix::operator*(other); } - /** @copydoc Matrix::operator*(const Vector&) */ + /** @copydoc Matrix::operator*(const Vector&) const */ inline Vector4 operator*(const Vector& other) const { return Matrix::operator*(other); } /** @copydoc Matrix::transposed() */ diff --git a/src/Math/Vector2.h b/src/Math/Vector2.h index 90b4a3b6d..5b33a429c 100644 --- a/src/Math/Vector2.h +++ b/src/Math/Vector2.h @@ -53,10 +53,10 @@ template class Vector2: public Vector { /** @copydoc Vector::operator=() */ inline Vector2& operator=(const Vector& other) { return Vector::operator=(other); } - /** @copydoc Vector::operator*(const Vector&) */ + /** @copydoc Vector::operator*(const Vector&) const */ inline T operator*(const Vector& other) const { return Vector::operator*(other); } - /** @copydoc Vector::operator*(T) */ + /** @copydoc Vector::operator*(T) const */ inline Vector2 operator*(T number) const { return Vector::operator*(number); } /** @copydoc Vector::operator/() */ @@ -65,7 +65,7 @@ template class Vector2: public Vector { /** @copydoc Vector::operator+() */ inline Vector2 operator+(const Vector& other) const { return Vector::operator+(other); } - /** @copydoc Vector::operator-(const Vector&) */ + /** @copydoc Vector::operator-(const Vector&) const */ inline Vector2 operator-(const Vector& other) const { return Vector::operator-(other); } /** @copydoc Vector::operator-() */ diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index 343aa4208..b99eff31a 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -80,10 +80,10 @@ template class Vector3: public Vector { /** @copydoc Vector::operator=() */ inline Vector3& operator=(const Vector& other) { return Vector::operator=(other); } - /** @copydoc Vector::operator*(const Vector&) */ + /** @copydoc Vector::operator*(const Vector&) const */ inline T operator*(const Vector& other) const { return Vector::operator*(other); } - /** @copydoc Vector::operator*(T) */ + /** @copydoc Vector::operator*(T) const */ inline Vector3 operator*(T number) const { return Vector::operator*(number); } /** @copydoc Vector::operator/() */ @@ -92,7 +92,7 @@ template class Vector3: public Vector { /** @copydoc Vector::operator+() */ inline Vector3 operator+(const Vector& other) const { return Vector::operator+(other); } - /** @copydoc Vector::operator-(const Vector&) */ + /** @copydoc Vector::operator-(const Vector&) const */ inline Vector3 operator-(const Vector& other) const { return Vector::operator-(other); } /** @copydoc Vector::operator-() */ diff --git a/src/Math/Vector4.h b/src/Math/Vector4.h index db797c1af..01baaeeba 100644 --- a/src/Math/Vector4.h +++ b/src/Math/Vector4.h @@ -96,10 +96,10 @@ template class Vector4: public Vector { /** @copydoc Vector::operator=() */ inline Vector4& operator=(const Vector& other) { return Vector::operator=(other); } - /** @copydoc Vector::operator*(const Vector&) */ + /** @copydoc Vector::operator*(const Vector&) const */ inline T operator*(const Vector& other) const { return Vector::operator*(other); } - /** @copydoc Vector::operator*(T) */ + /** @copydoc Vector::operator*(T) const */ inline Vector4 operator*(T number) const { return Vector::operator*(number); } /** @copydoc Vector::operator/() */ @@ -108,7 +108,7 @@ template class Vector4: public Vector { /** @copydoc Vector::operator+() */ inline Vector4 operator+(const Vector& other) const { return Vector::operator+(other); } - /** @copydoc Vector::operator-(const Vector&) */ + /** @copydoc Vector::operator-(const Vector&) const */ inline Vector4 operator-(const Vector& other) const { return Vector::operator-(other); } /** @copydoc Vector::operator-() */ diff --git a/src/MeshBuilder.h b/src/MeshBuilder.h index 452001495..c3922aff5 100644 --- a/src/MeshBuilder.h +++ b/src/MeshBuilder.h @@ -31,17 +31,17 @@ namespace Magnum { /** @brief Mesh builder +@tparam Vertex Vertex data Class for building meshes with triangle primitive from scratch or from prefabricated data and modifying them (adding/removing faces, cleaning duplicate vertices etc.). -Vertex template can be absolutely anything (single integer, structure, class) -but it must have at least operator== implemented. +@todo Make it more generic for meshes with texture coordinates etc. */ template class MeshBuilder { public: - typedef size_t VertexPointer; + typedef size_t VertexPointer; /**< @brief Type for indexing vertices */ /** @brief Triangle face */ struct Face { @@ -58,6 +58,7 @@ template class MeshBuilder { /** @brief Vertex data */ VertexPointer vertices[3]; + /** @brief Comparison operator */ bool operator==(const Face& other) const { return other.vertices[0] == vertices[0] && other.vertices[1] == vertices[1] && @@ -86,11 +87,11 @@ template class MeshBuilder { /** @brief Array with vertices */ inline const std::vector& vertices() const { return _vertices; } - inline std::vector& vertices() { return _vertices; } + inline std::vector& vertices() { return _vertices; } /**< @copydoc vertices() const */ /** @brief Array with faces */ inline const std::vector& faces() const { return _faces; } - inline std::vector& faces() { return _faces; } + inline std::vector& faces() { return _faces; } /**< @copydoc faces() const */ /** * @brief Set mesh data diff --git a/src/TypeTraits.h b/src/TypeTraits.h index 272c32c64..ed6ff966a 100644 --- a/src/TypeTraits.h +++ b/src/TypeTraits.h @@ -31,7 +31,7 @@ the need for repeated code such as method overloading or template specialization for given types. This class and class methods are specialized only for types where it makes -sense, it has empty implementation for unknown type or type which doesn't +sense, it has empty implementation for unknown types or types which don't support given feature, thus forcing the compilation stop with an error. */ template struct TypeTraits {