Browse Source

Doc++

Updated and simplified Main page of documentation, finally fixed doxygen
warnings with @copydoc in Math namespace.
vectorfields
Vladimír Vondruš 15 years ago
parent
commit
0d2f2c966f
  1. 22
      doc/MainPage.dox
  2. 8
      src/Math/Matrix3.h
  3. 8
      src/Math/Matrix4.h
  4. 6
      src/Math/Vector2.h
  5. 6
      src/Math/Vector3.h
  6. 6
      src/Math/Vector4.h
  7. 11
      src/MeshBuilder.h
  8. 2
      src/TypeTraits.h

22
doc/MainPage.dox

@ -1,22 +1,22 @@
namespace Magnum {
/** @mainpage
<p><strong>%Magnum</strong> is simple graphical engine written in C++11 and OpenGL 3 Core Profile. Features:</p>
<ul>
<li>Easy-to-use templated @ref Magnum::Math "mathematical library" for matrix/vector calculations.</li>
<li>Hierarchical @ref Magnum::Scene "scene graph" which supports transformation caching for better performance.</li>
<li>Classes for convenient usage of @ref Magnum::Shader "shaders", @ref Magnum::Buffer "buffers" and @ref Magnum::Texture "textures".</li>
<li>Easy-to-use templated @ref Math "mathematical library" for matrix/vector calculations.</li>
<li>Hierarchical @ref Scene "scene graph" which supports transformation caching for better performance.</li>
<li>Classes for convenient usage of @ref AbstractShaderProgram "shaders", @ref Buffer "buffers" and @ref Texture "textures".</li>
</ul>
@section BasicUsage Basic usage
<p>%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.</p>
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.</p>
<p>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".</p>
<p>Basic usage examples are in <tt>examples/</tt> subdirectory.</p>
you must reimplement Object::draw(), and for example bind an
@ref AbstractShaderProgram "shader", @ref Texture "texture" and
render an prepared @ref Mesh "mesh".</p>
*/
}

8
src/Math/Matrix3.h

@ -39,16 +39,16 @@ template<class T> class Matrix3: public Matrix<T, 3> {
/** @copydoc Matrix::operator=() */
inline Matrix3<T>& operator=(const Matrix<T, 3>& other) { return Matrix<T, 3>::operator=(other); }
/** @copydoc Matrix::at(size_t) */
/** @copydoc Matrix::at(size_t) const */
inline Vector3<T> at(size_t col) const { return Matrix<T, 3>::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<T, 3>::at(row, col); }
/** @copydoc Matrix::operator*(const Matrix<T, size>&) */
/** @copydoc Matrix::operator*(const Matrix<T, size>&) const */
inline Matrix3<T> operator*(const Matrix<T, 3>& other) const { return Matrix<T, 3>::operator*(other); }
/** @copydoc Matrix::operator*(const Vector<T, size>&) */
/** @copydoc Matrix::operator*(const Vector<T, size>&) const */
inline Vector3<T> operator*(const Vector<T, 3>& other) const { return Matrix<T, 3>::operator*(other); }
/** @copydoc Matrix::transposed() */

8
src/Math/Matrix4.h

@ -139,16 +139,16 @@ template<class T> class Matrix4: public Matrix<T, 4> {
/** @copydoc Matrix::operator=() */
inline Matrix4<T>& operator=(const Matrix<T, 4>& other) { return Matrix<T, 4>::operator=(other); }
/** @copydoc Matrix::at(size_t) */
/** @copydoc Matrix::at(size_t) const */
inline Vector4<T> at(size_t col) const { return Matrix<T, 4>::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<T, 4>::at(row, col); }
/** @copydoc Matrix::operator*(const Matrix<T, size>&) */
/** @copydoc Matrix::operator*(const Matrix<T, size>&) const */
inline Matrix4<T> operator*(const Matrix<T, 4>& other) const { return Matrix<T, 4>::operator*(other); }
/** @copydoc Matrix::operator*(const Vector<T, size>&) */
/** @copydoc Matrix::operator*(const Vector<T, size>&) const */
inline Vector4<T> operator*(const Vector<T, 4>& other) const { return Matrix<T, 4>::operator*(other); }
/** @copydoc Matrix::transposed() */

6
src/Math/Vector2.h

@ -53,10 +53,10 @@ template<class T> class Vector2: public Vector<T, 2> {
/** @copydoc Vector::operator=() */
inline Vector2<T>& operator=(const Vector<T, 2>& other) { return Vector<T, 2>::operator=(other); }
/** @copydoc Vector::operator*(const Vector<T, size>&) */
/** @copydoc Vector::operator*(const Vector<T, size>&) const */
inline T operator*(const Vector<T, 2>& other) const { return Vector<T, 2>::operator*(other); }
/** @copydoc Vector::operator*(T) */
/** @copydoc Vector::operator*(T) const */
inline Vector2<T> operator*(T number) const { return Vector<T, 2>::operator*(number); }
/** @copydoc Vector::operator/() */
@ -65,7 +65,7 @@ template<class T> class Vector2: public Vector<T, 2> {
/** @copydoc Vector::operator+() */
inline Vector2<T> operator+(const Vector<T, 2>& other) const { return Vector<T, 2>::operator+(other); }
/** @copydoc Vector::operator-(const Vector<T, size>&) */
/** @copydoc Vector::operator-(const Vector<T, size>&) const */
inline Vector2<T> operator-(const Vector<T, 2>& other) const { return Vector<T, 2>::operator-(other); }
/** @copydoc Vector::operator-() */

6
src/Math/Vector3.h

@ -80,10 +80,10 @@ template<class T> class Vector3: public Vector<T, 3> {
/** @copydoc Vector::operator=() */
inline Vector3<T>& operator=(const Vector<T, 3>& other) { return Vector<T, 3>::operator=(other); }
/** @copydoc Vector::operator*(const Vector<T, size>&) */
/** @copydoc Vector::operator*(const Vector<T, size>&) const */
inline T operator*(const Vector<T, 3>& other) const { return Vector<T, 3>::operator*(other); }
/** @copydoc Vector::operator*(T) */
/** @copydoc Vector::operator*(T) const */
inline Vector3<T> operator*(T number) const { return Vector<T, 3>::operator*(number); }
/** @copydoc Vector::operator/() */
@ -92,7 +92,7 @@ template<class T> class Vector3: public Vector<T, 3> {
/** @copydoc Vector::operator+() */
inline Vector3<T> operator+(const Vector<T, 3>& other) const { return Vector<T, 3>::operator+(other); }
/** @copydoc Vector::operator-(const Vector<T, size>&) */
/** @copydoc Vector::operator-(const Vector<T, size>&) const */
inline Vector3<T> operator-(const Vector<T, 3>& other) const { return Vector<T, 3>::operator-(other); }
/** @copydoc Vector::operator-() */

6
src/Math/Vector4.h

@ -96,10 +96,10 @@ template<class T> class Vector4: public Vector<T, 4> {
/** @copydoc Vector::operator=() */
inline Vector4<T>& operator=(const Vector<T, 4>& other) { return Vector<T, 4>::operator=(other); }
/** @copydoc Vector::operator*(const Vector<T, size>&) */
/** @copydoc Vector::operator*(const Vector<T, size>&) const */
inline T operator*(const Vector<T, 4>& other) const { return Vector<T, 4>::operator*(other); }
/** @copydoc Vector::operator*(T) */
/** @copydoc Vector::operator*(T) const */
inline Vector4<T> operator*(T number) const { return Vector<T, 4>::operator*(number); }
/** @copydoc Vector::operator/() */
@ -108,7 +108,7 @@ template<class T> class Vector4: public Vector<T, 4> {
/** @copydoc Vector::operator+() */
inline Vector4<T> operator+(const Vector<T, 4>& other) const { return Vector<T, 4>::operator+(other); }
/** @copydoc Vector::operator-(const Vector<T, size>&) */
/** @copydoc Vector::operator-(const Vector<T, size>&) const */
inline Vector4<T> operator-(const Vector<T, 4>& other) const { return Vector<T, 4>::operator-(other); }
/** @copydoc Vector::operator-() */

11
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 Vertex> 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 Vertex> 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 Vertex> class MeshBuilder {
/** @brief Array with vertices */
inline const std::vector<Vertex>& vertices() const { return _vertices; }
inline std::vector<Vertex>& vertices() { return _vertices; }
inline std::vector<Vertex>& vertices() { return _vertices; } /**< @copydoc vertices() const */
/** @brief Array with faces */
inline const std::vector<Face>& faces() const { return _faces; }
inline std::vector<Face>& faces() { return _faces; }
inline std::vector<Face>& faces() { return _faces; } /**< @copydoc faces() const */
/**
* @brief Set mesh data

2
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<class T> struct TypeTraits {

Loading…
Cancel
Save