From a3c37cd277cda93eaac2a632c5e186d6d81b8d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 15 Nov 2012 23:08:15 +0100 Subject: [PATCH] Doc++, minor cleanup. --- src/AbstractTexture.h | 7 ++++++- src/IndexedMesh.h | 2 ++ src/Math/Vector2.h | 12 +++++------ src/Math/Vector3.h | 12 +++++------ src/Mesh.h | 3 +++ src/MeshTools/CompressIndices.h | 6 +----- src/Platform/GlutApplication.h | 9 ++++----- src/Platform/NaClApplication.h | 36 +++++++++------------------------ src/Platform/Sdl2Application.h | 15 +++----------- src/Primitives/Capsule.h | 2 +- 10 files changed, 41 insertions(+), 63 deletions(-) diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index bcfe10cf5..cce734fde 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -576,7 +576,10 @@ class MAGNUM_EXPORT AbstractTexture { /** * @brief Max supported layer count * - * @see bind(GLint), @fn_gl{Get} with @def_gl{MAX_COMBINED_TEXTURE_IMAGE_UNITS}, + * The result is cached, repeated queries don't result in repeated + * OpenGL calls. + * @see @ref AbstractShaderProgram-subclassing, bind(GLint), + * @fn_gl{Get} with @def_gl{MAX_COMBINED_TEXTURE_IMAGE_UNITS}, * @fn_gl{ActiveTexture} */ static GLint maxSupportedLayerCount(); @@ -584,6 +587,8 @@ class MAGNUM_EXPORT AbstractTexture { /** * @brief Max supported anisotropy * + * The result is cached, repeated queries don't result in repeated + * OpenGL calls. * @see setMaxAnisotropy(), @fn_gl{Get} with @def_gl{MAX_TEXTURE_MAX_ANISOTROPY_EXT} * @requires_extension %Extension @extension{EXT,texture_filter_anisotropic} * @requires_es_extension %Extension @es_extension2{EXT,texture_filter_anisotropic,texture_filter_anisotropic} diff --git a/src/IndexedMesh.h b/src/IndexedMesh.h index 1a0b25e9f..8024ec614 100644 --- a/src/IndexedMesh.h +++ b/src/IndexedMesh.h @@ -81,6 +81,7 @@ class MAGNUM_EXPORT IndexedMesh: public Mesh { * @brief Set index count * @return Pointer to self (for method chaining) * + * Default is zero. * @see MeshTools::compressIndices() */ inline IndexedMesh* setIndexCount(GLsizei count) { @@ -95,6 +96,7 @@ class MAGNUM_EXPORT IndexedMesh: public Mesh { * @brief Set index type * @return Pointer to self (for method chaining) * + * Default is @ref Type "Type::UnsignedShort". * @see MeshTools::compressIndices() */ inline IndexedMesh* setIndexType(Type type) { diff --git a/src/Math/Vector2.h b/src/Math/Vector2.h index c4d26eb11..25361ea73 100644 --- a/src/Math/Vector2.h +++ b/src/Math/Vector2.h @@ -33,7 +33,7 @@ See @ref matrix-vector for brief introduction. template class Vector2: public Vector<2, T> { public: /** - * @brief %Vector in direction of X axis + * @brief %Vector in direction of X axis (right) * * Usable for translation in given axis, for example: * @code @@ -44,7 +44,7 @@ template class Vector2: public Vector<2, T> { inline constexpr static Vector2 xAxis(T length = T(1)) { return Vector2(length, T()); } /** - * @brief %Vector in direction of Y axis + * @brief %Vector in direction of Y axis (up) * * See xAxis() for more information. * @see yScale() @@ -52,7 +52,7 @@ template class Vector2: public Vector<2, T> { inline constexpr static Vector2 yAxis(T length = T(1)) { return Vector2(T(), length); } /** - * @brief Scaling vector in direction of X axis + * @brief Scaling vector in direction of X axis (width) * * Usable for scaling along given direction, for example: * @code @@ -63,7 +63,7 @@ template class Vector2: public Vector<2, T> { inline constexpr static Vector2 xScale(T scale) { return Vector2(scale, T(1)); } /** - * @brief Scaling vector in direction of Y axis + * @brief Scaling vector in direction of Y axis (height) * * See xScale() for more information. * @see yAxis() @@ -81,8 +81,8 @@ template class Vector2: public Vector<2, T> { /** * @brief Constructor - * @param x X value - * @param y Y value + * @param x X component + * @param y Y component */ inline constexpr Vector2(T x, T y): Vector<2, T>(x, y) {} diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index 51ce88517..f0668a352 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -34,7 +34,7 @@ homogeneous two-dimensional coordinates. template class Vector3: public Vector<3, T> { public: /** - * @brief %Vector in direction of X axis + * @brief %Vector in direction of X axis (right) * * Usable for translation or rotation along given axis, for example: * @code @@ -46,7 +46,7 @@ template class Vector3: public Vector<3, T> { inline constexpr static Vector3 xAxis(T length = T(1)) { return Vector3(length, T(), T()); } /** - * @brief %Vector in direction of Y axis + * @brief %Vector in direction of Y axis (up) * * See xAxis() for more information. * @see yScale() @@ -54,7 +54,7 @@ template class Vector3: public Vector<3, T> { inline constexpr static Vector3 yAxis(T length = T(1)) { return Vector3(T(), length, T()); } /** - * @brief %Vector in direction of Z axis + * @brief %Vector in direction of Z axis (backward) * * See xAxis() for more information. * @see zScale() @@ -62,7 +62,7 @@ template class Vector3: public Vector<3, T> { inline constexpr static Vector3 zAxis(T length = T(1)) { return Vector3(T(), T(), length); } /** - * @brief Scaling vector in direction of X axis + * @brief Scaling vector in direction of X axis (width) * * Usable for scaling along given direction, for example: * @code @@ -73,7 +73,7 @@ template class Vector3: public Vector<3, T> { inline constexpr static Vector3 xScale(T scale) { return Vector3(scale, T(1), T(1)); } /** - * @brief Scaling vector in direction of Y axis + * @brief Scaling vector in direction of Y axis (height) * * See xScale() for more information. * @see yAxis() @@ -81,7 +81,7 @@ template class Vector3: public Vector<3, T> { inline constexpr static Vector3 yScale(T scale) { return Vector3(T(1), scale, T(1)); } /** - * @brief Scaling vector in direction of Z axis + * @brief Scaling vector in direction of Z axis (depth) * * See xScale() for more information. * @see zAxis() diff --git a/src/Mesh.h b/src/Mesh.h index 78a1ee686..2a1104548 100644 --- a/src/Mesh.h +++ b/src/Mesh.h @@ -388,6 +388,8 @@ class MAGNUM_EXPORT Mesh { /** * @brief Set primitive type * @return Pointer to self (for method chaining) + * + * Default is @ref Primitive "Primitive::Triangles". */ inline Mesh* setPrimitive(Primitive primitive) { _primitive = primitive; @@ -401,6 +403,7 @@ class MAGNUM_EXPORT Mesh { * @brief Set vertex count * @return Pointer to self (for method chaining) * + * Default is zero. * @attention All bound attributes are reset after calling this * function, so you must call * addVertexBuffer()/addInterleavedVertexBuffer() afterwards. diff --git a/src/MeshTools/CompressIndices.h b/src/MeshTools/CompressIndices.h index 1ca638eba..e9bf40c9e 100644 --- a/src/MeshTools/CompressIndices.h +++ b/src/MeshTools/CompressIndices.h @@ -26,11 +26,7 @@ #include "magnumMeshToolsVisibility.h" -namespace Magnum { - -class IndexedMesh; - -namespace MeshTools { +namespace Magnum { namespace MeshTools { #ifndef DOXYGEN_GENERATING_OUTPUT namespace Implementation { diff --git a/src/Platform/GlutApplication.h b/src/Platform/GlutApplication.h index caf34fb17..56f0ff885 100644 --- a/src/Platform/GlutApplication.h +++ b/src/Platform/GlutApplication.h @@ -83,8 +83,8 @@ class GlutApplication { * @brief Viewport event * * Called when viewport size changes. You should pass the new size to - * Framebuffer::setViewport() or SceneGraph::Camera::setViewport(), - * if using scene graph. + * Framebuffer::setViewport() (and SceneGraph::AbstractCamera::setViewport(), + * if using scene graph). */ virtual void viewportEvent(const Math::Vector2& size) = 0; @@ -92,7 +92,7 @@ class GlutApplication { * @brief Draw event * * Here implement your drawing functions, such as calling - * SceneGraph::Camera::draw(). After drawing is finished, call + * SceneGraph::AbstractCamera::draw(). After drawing is finished, call * swapBuffers(). If you want to draw immediately again, call also * redraw(). */ @@ -110,7 +110,7 @@ class GlutApplication { /** * @brief Redraw immediately * - * Marks the window for redrawing, resulting in call of drawEvent() + * Marks the window for redrawing, resulting in call to drawEvent() * in the next iteration. */ virtual inline void redraw() { @@ -230,7 +230,6 @@ class GlutApplication { * * Called when any mouse button is pressed and mouse is moved. Default * implementation does nothing. - * * @see setMouseTracking() */ virtual void mouseMotionEvent(const Math::Vector2& position); diff --git a/src/Platform/NaClApplication.h b/src/Platform/NaClApplication.h index bb66000b5..17de3da1c 100644 --- a/src/Platform/NaClApplication.h +++ b/src/Platform/NaClApplication.h @@ -46,6 +46,9 @@ namespace Platform { /** @nosubgrouping @brief NaCl application +Application running in [Google Chrome Native Client](https://developers.google.com/native-client/). +Supports keyboard and mouse handling. + @section NaClApplication-usage Usage You need to implement at least drawEvent() and viewportEvent() to be able to @@ -71,41 +74,20 @@ class NaClApplication: public pp::Instance, public pp::Graphics3DClient { ~NaClApplication(); + protected: + /** @{ @name Drawing functions */ - protected: - /** - * @brief Viewport event - * - * Called when viewport size changes. You should pass the new size to - * Framebuffer::setViewport() or SceneGraph::Camera::setViewport(), - * if using scene graph. - */ + /** @copydoc GlutApplication::viewportEvent() */ virtual void viewportEvent(const Math::Vector2& size) = 0; - /** - * @brief Draw event - * - * Here implement your drawing functions, such as calling - * SceneGraph::Camera::draw(). After drawing is finished, call - * swapBuffers(). If you want to draw immediately again, call also - * redraw(). - */ + /** @copydoc GlutApplication::drawEvent() */ virtual void drawEvent() = 0; - /** - * @brief Swap buffers - * - * Paints currently rendered framebuffer on screen. - */ + /** @copydoc GlutApplication::swapBuffers() */ void swapBuffers(); - /** - * @brief Redraw immediately - * - * Marks the window for redrawing, resulting in call of drawEvent() - * in the next iteration. - */ + /** @copydoc GlutApplication::redraw() */ inline void redraw() { flags |= Flag::Redraw; } /*@}*/ diff --git a/src/Platform/Sdl2Application.h b/src/Platform/Sdl2Application.h index 59b978420..26cd10920 100644 --- a/src/Platform/Sdl2Application.h +++ b/src/Platform/Sdl2Application.h @@ -37,7 +37,8 @@ namespace Platform { /** @nosubgrouping @brief SDL2 application -Supports keyboard and mouse handling. +Application using [Simple DirectMedia Layer](www.libsdl.org/). Supports +keyboard and mouse handling. @section Sdl2Application-usage Usage @@ -223,7 +224,7 @@ class Sdl2Application { /** * @brief Mouse button * - * @see mouseEvent() + * @see mousePressEvent(), mouseReleaseEvent() */ enum class MouseButton: Uint8 { Left = SDL_BUTTON_LEFT, /**< Left button */ @@ -233,16 +234,6 @@ class Sdl2Application { WheelDown = 5 /**< Wheel down */ }; - /** - * @brief Mouse state - * - * @see mouseEvent() - */ - enum class MouseState: Uint8 { - Pressed = SDL_PRESSED, /**< Button pressed */ - Released = SDL_RELEASED /**< Button released */ - }; - protected: /** * @brief Mouse press event diff --git a/src/Primitives/Capsule.h b/src/Primitives/Capsule.h index 76dd89984..1d9e118a6 100644 --- a/src/Primitives/Capsule.h +++ b/src/Primitives/Capsule.h @@ -26,7 +26,7 @@ namespace Magnum { namespace Primitives { /** @brief 3D capsule primitive -Cylinder along Y axis with hemispheres instead of caps. Indexed triangle mesh +%Cylinder along Y axis with hemispheres instead of caps. Indexed triangle mesh with normals and optional 2D texture coordinates. */ class Capsule: public Trade::MeshData3D {