From 89f4ab09ad180d9a12247f344c44b0822220d173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 10 May 2014 17:26:48 +0200 Subject: [PATCH 01/47] Platform: added WindowlessWglApplication. --- CMakeLists.txt | 4 + doc/building.dox | 1 + doc/cmake.dox | 1 + modules/FindMagnum.cmake | 16 +- src/Magnum/Platform/CMakeLists.txt | 13 ++ .../Platform/WindowlessWglApplication.cpp | 132 +++++++++++ .../Platform/WindowlessWglApplication.h | 214 ++++++++++++++++++ 7 files changed, 375 insertions(+), 6 deletions(-) create mode 100644 src/Magnum/Platform/WindowlessWglApplication.cpp create mode 100644 src/Magnum/Platform/WindowlessWglApplication.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c82f0a837..74dbfe3ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,10 @@ elseif(CORRADE_TARGET_UNIX AND NOT APPLE) option(WITH_GLXAPPLICATION "Build GlxApplication library" OFF) cmake_dependent_option(WITH_WINDOWLESSGLXAPPLICATION "Build WindowlessGlxApplication library" OFF "NOT WITH_MAGNUMINFO;NOT WITH_FONTCONVERTER;NOT WITH_DISTANCEFIELDCONVERTER" ON) cmake_dependent_option(WITH_XEGLAPPLICATION "Build XEglApplication library" OFF "TARGET_GLES" OFF) + +# Windows-specific application libraries +elseif(CORRADE_TARGET_WINDOWS) + cmake_dependent_option(WITH_WINDOWLESSWGLAPPLICATION "Build WindowlessWglApplication library" OFF "NOT WITH_MAGNUMINFO;NOT WITH_FONTCONVERTER;NOT WITH_DISTANCEFIELDCONVERTER" ON) endif() # Platform-independent (almost) application libraries diff --git a/doc/building.dox b/doc/building.dox index 53ac127ee..3f07a5501 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -201,6 +201,7 @@ platform best: - `WITH_XEGLAPPLICATION` - @ref Platform::XEglApplication "XEglApplication" - `WITH_WINDOWLESSGLXAPPLICATION` - @ref Platform::WindowlessGlxApplication "WindowlessGlxApplication" - `WITH_WINDOWLESSNACLAPPLICATION` - @ref Platform::WindowlessNaClApplication "WindowlessNaClApplication" +- `WITH_WINDOWLESSWGLAPPLICATION` - @ref Platform::WindowlessWglApplication "WindowlessWglApplication" There are also a few command-line utilities. They are currently available only on Linux and are disabled by default: diff --git a/doc/cmake.dox b/doc/cmake.dox index c8cb7b1cb..35c0e1029 100644 --- a/doc/cmake.dox +++ b/doc/cmake.dox @@ -90,6 +90,7 @@ Platform namespace is split into more components: - `%XEglApplication` -- @ref Platform::XEglApplication "XEglApplication" - `%WindowlessGlxApplication` -- @ref Platform::WindowlessGlxApplication "WindowlessGlxApplication" - `%WindowlessNaClApplication` -- @ref Platform::WindowlessNaClApplication "WindowlessNaClApplication" +- `%WindowlessWglApplication` -- @ref Platform::WindowlessWglApplication "WindowlessWglApplication" The library also contains a set of plugins for importing essential file formats. Additional plugins are provided in separate plugin repository, see diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index fc3082a0f..f927e1cfd 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -49,6 +49,7 @@ # XEglApplication - X/EGL application # WindowlessGlxApplication - Windowless GLX application # WindowlessNaClApplication - Windowless NaCl application +# WindowlessWglApplication - Windowless WGL application # Example usage with specifying additional components is: # find_package(Magnum [REQUIRED|COMPONENTS] # MeshTools Primitives GlutApplication) @@ -329,7 +330,7 @@ foreach(component ${Magnum_FIND_COMPONENTS}) if(${component} STREQUAL AndroidApplication) find_package(EGL) if(EGL_FOUND) - set(_MAGNUM_${_COMPONENT}_LIBRARIES android ${EGL_LIBRARY} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY}) + set(_MAGNUM_${_COMPONENT}_LIBRARIES android ${EGL_LIBRARY}) set(_MAGNUM_${_COMPONENT}_INCLUDE_DIRS ${ANDROID_NATIVE_APP_GLUE_INCLUDE_DIR}) else() unset(MAGNUM_${_COMPONENT}_LIBRARY) @@ -340,7 +341,7 @@ foreach(component ${Magnum_FIND_COMPONENTS}) if(${component} STREQUAL GlutApplication) find_package(GLUT) if(GLUT_FOUND) - set(_MAGNUM_${_COMPONENT}_LIBRARIES ${GLUT_glut_LIBRARY} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY}) + set(_MAGNUM_${_COMPONENT}_LIBRARIES ${GLUT_glut_LIBRARY}) else() unset(MAGNUM_${_COMPONENT}_LIBRARY) endif() @@ -350,7 +351,7 @@ foreach(component ${Magnum_FIND_COMPONENTS}) if(${component} STREQUAL Sdl2Application) find_package(SDL2) if(SDL2_FOUND) - set(_MAGNUM_${_COMPONENT}_LIBRARIES ${SDL2_LIBRARY} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY}) + set(_MAGNUM_${_COMPONENT}_LIBRARIES ${SDL2_LIBRARY}) set(_MAGNUM_${_COMPONENT}_INCLUDE_DIRS ${SDL2_INCLUDE_DIR}) else() unset(MAGNUM_${_COMPONENT}_LIBRARY) @@ -359,14 +360,14 @@ foreach(component ${Magnum_FIND_COMPONENTS}) # (Windowless) NaCl application dependencies if(${component} STREQUAL NaClApplication OR ${component} STREQUAL WindowlessNaClApplication) - set(_MAGNUM_${_COMPONENT}_LIBRARIES ppapi_cpp ppapi ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY}) + set(_MAGNUM_${_COMPONENT}_LIBRARIES ppapi_cpp ppapi) endif() # GLX application dependencies if(${component} STREQUAL GlxApplication OR ${component} STREQUAL WindowlessGlxApplication) find_package(X11) if(X11_FOUND) - set(_MAGNUM_${_COMPONENT}_LIBRARIES ${X11_LIBRARIES} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY}) + set(_MAGNUM_${_COMPONENT}_LIBRARIES ${X11_LIBRARIES}) else() unset(MAGNUM_${_COMPONENT}_LIBRARY) endif() @@ -377,12 +378,15 @@ foreach(component ${Magnum_FIND_COMPONENTS}) find_package(EGL) find_package(X11) if(EGL_FOUND AND X11_FOUND) - set(_MAGNUM_${_COMPONENT}_LIBRARIES ${EGL_LIBRARY} ${X11_LIBRARIES} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY}) + set(_MAGNUM_${_COMPONENT}_LIBRARIES ${EGL_LIBRARY} ${X11_LIBRARIES}) else() unset(MAGNUM_${_COMPONENT}_LIBRARY) endif() endif() + # Common application dependencies + set(_MAGNUM_${_COMPONENT}_LIBRARIES ${_MAGNUM_${_COMPONENT}_LIBRARIES} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY}) + # Audio library elseif(${component} STREQUAL Audio) find_package(OpenAL) diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index e3a70508e..401244d6e 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -178,6 +178,19 @@ if(WITH_WINDOWLESSGLXAPPLICATION) ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) endif() +# Windowless WGL application +if(WITH_WINDOWLESSWGLAPPLICATION) + add_library(MagnumWindowlessWglApplication STATIC WindowlessWglApplication.cpp) + set_target_properties(MagnumWindowlessWglApplication PROPERTIES + COMPILE_FLAGS "-DUNICODE" + DEBUG_POSTFIX "-d") + install(FILES WindowlessWglApplication.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform) + install(TARGETS MagnumWindowlessWglApplication + RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) +endif() + # Abstract X application if(NEED_ABSTRACTXAPPLICATION) add_library(MagnumAbstractXApplication OBJECT AbstractXApplication.cpp) diff --git a/src/Magnum/Platform/WindowlessWglApplication.cpp b/src/Magnum/Platform/WindowlessWglApplication.cpp new file mode 100644 index 000000000..4ef4ef02c --- /dev/null +++ b/src/Magnum/Platform/WindowlessWglApplication.cpp @@ -0,0 +1,132 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include "WindowlessWglApplication.h" + +#include +#include +#include + +#include "Magnum/Context.h" + +namespace Magnum { namespace Platform { + +/** @todo Delegating constructor when support for GCC 4.6 is dropped */ + +#ifndef DOXYGEN_GENERATING_OUTPUT +int WindowlessWglApplication::create(LRESULT(CALLBACK windowProcedure)(HWND, UINT, WPARAM, LPARAM)) { + const WNDCLASS wc{ + 0, + windowProcedure, + 0, + 0, + GetModuleHandle(nullptr), + nullptr, + nullptr, + HBRUSH(COLOR_BACKGROUND), + nullptr, + L"Magnum Windowless Application" + }; + if(!RegisterClass(&wc)) return 1; + + CreateWindowW(wc.lpszClassName, L"Magnum Windowless Application", + WS_OVERLAPPEDWINDOW, 0, 0, 32, 32, 0, 0, wc.hInstance, 0); + + return 0; +} +#endif + +WindowlessWglApplication::WindowlessWglApplication(const Arguments& arguments, const Configuration& configuration): _window(arguments.window), _c(nullptr) { + createContext(configuration); +} + +#ifndef DOXYGEN_GENERATING_OUTPUT +WindowlessWglApplication::WindowlessWglApplication(const Arguments& arguments): _window(arguments.window), _c(nullptr) { + createContext(); +} +#endif + +WindowlessWglApplication::WindowlessWglApplication(const Arguments& arguments, std::nullptr_t): _window(arguments.window), _c(nullptr) {} + +void WindowlessWglApplication::createContext() { createContext({}); } + +void WindowlessWglApplication::createContext(const Configuration& configuration) { + if(!tryCreateContext(configuration)) std::exit(1); +} + +bool WindowlessWglApplication::tryCreateContext(const Configuration&) { + CORRADE_ASSERT(!_c, "Platform::WindowlessWglApplication::tryCreateContext(): context already created", false); + + /* Get device context */ + _deviceContext = GetDC(_window); + + /* Use first provided pixel format */ + constexpr static const PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), + 1, + /* Double-buffered with OpenGL support */ + PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER, + PFD_TYPE_RGBA, /* RGBA */ + 32, /* 32 bit */ + 0, 0, 0, 0, 0, 0, + 0, + 0, + 0, + 0, 0, 0, 0, + 24, /* 24-bit depth buffer */ + 8, /* 8-bit stencil buffer */ + 0, + PFD_MAIN_PLANE, + 0, + 0, 0, 0 + }; + const int pixelFormat = ChoosePixelFormat(_deviceContext, &pfd); + SetPixelFormat(_deviceContext, pixelFormat, &pfd); + + /* Create context and make it current */ + _renderingContext = wglCreateContext(_deviceContext); + if(!_renderingContext) { + Error() << "Platform::WindowlessWglApplication::tryCreateContext(): cannot create context:" << GetLastError(); + return false; + } + + /* Set OpenGL context as current */ + if(!wglMakeCurrent(_deviceContext, _renderingContext)) { + Error() << "Platform::WindowlessWglApplication::tryCreateContext(): cannot make context current:" << GetLastError(); + return false; + } + + _c = new Context; + return true; +} + +WindowlessWglApplication::~WindowlessWglApplication() { + delete _c; + + wglMakeCurrent(_deviceContext, nullptr); + wglDeleteContext(_renderingContext); +} + +}} diff --git a/src/Magnum/Platform/WindowlessWglApplication.h b/src/Magnum/Platform/WindowlessWglApplication.h new file mode 100644 index 000000000..c3623b901 --- /dev/null +++ b/src/Magnum/Platform/WindowlessWglApplication.h @@ -0,0 +1,214 @@ +#ifndef Magnum_Platform_WindowlessWglApplication_h +#define Magnum_Platform_WindowlessWglApplication_h +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +/** @file + * @brief Class @ref Magnum::Platform::WindowlessWglApplication + */ + +#include "Magnum/OpenGL.h" + +#include "Magnum/Magnum.h" + +namespace Magnum { namespace Platform { + +/** +@brief Windowless WGL application + +Application for offscreen rendering using pure WINAPI. + +This application library is available on desktop OpenGL on Windows. It is built +if `WITH_WINDOWLESSWGLAPPLICATION` is enabled in CMake. + +## Bootstrap application + +Fully contained windowless application using @ref WindowlessWglApplication +along with CMake setup is available in `windowless` branch of +[Magnum Bootstrap](https://github.com/mosra/magnum-bootstrap) repository, +download it as [tar.gz](https://github.com/mosra/magnum-bootstrap/archive/windowless.tar.gz) +or [zip](https://github.com/mosra/magnum-bootstrap/archive/windowless.zip) +file. After extracting the downloaded archive you can build and run the +application with these four commands: + + mkdir build && cd build + cmake .. + cmake --build . + ./src/MyApplication # or ./src/Debug/MyApplication + +## General usage + +In CMake you need to request `%WindowlessWglApplication` component, add +`${MAGNUM_WINDOWLESSWGLAPPLICATION_INCLUDE_DIRS}` to include path and link to +`${MAGNUM_WINDOWLESSWGLAPPLICATION_LIBRARIES}`. If no other windowless +application is requested, you can also use generic +`${MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS}` and +`${MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES}` aliases to simplify porting. See +@ref building and @ref cmake for more information. + +Place your code into @ref exec(). The subclass can be then used in main +function using @ref MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN() macro. See +@ref platform for more information. +@code +class MyApplication: public Platform::WindowlessWglApplication { + // implement required methods... +}; +MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(MyApplication) +@endcode + +If no other application header is included, this class is also aliased to +`Platform::WindowlessApplication` and the macro is aliased to +`MAGNUM_WINDOWLESSAPPLICATION_MAIN()` to simplify porting. +*/ +class WindowlessWglApplication { + public: + /** @brief Application arguments */ + struct Arguments { + int& argc; /**< @brief Argument count */ + char** argv; /**< @brief Argument values */ + #ifndef DOXYGEN_GENERATING_OUTPUT + HWND window; + #endif + }; + + class Configuration; + + #ifndef DOXYGEN_GENERATING_OUTPUT + static int create(LRESULT(CALLBACK windowProcedure)(HWND, UINT, WPARAM, LPARAM)); + #endif + + /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, const Configuration&) */ + #ifdef DOXYGEN_GENERATING_OUTPUT + explicit WindowlessWglApplication(const Arguments& arguments, const Configuration& configuration = Configuration()); + #else + /* To avoid "invalid use of incomplete type" */ + explicit WindowlessWglApplication(const Arguments& arguments, const Configuration& configuration); + explicit WindowlessWglApplication(const Arguments& arguments); + #endif + + /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, std::nullptr_t) */ + explicit WindowlessWglApplication(const Arguments& arguments, std::nullptr_t); + + /** @brief Copying is not allowed */ + WindowlessWglApplication(const WindowlessWglApplication&) = delete; + + /** @brief Moving is not allowed */ + WindowlessWglApplication(WindowlessWglApplication&&) = delete; + + /** @brief Copying is not allowed */ + WindowlessWglApplication& operator=(const WindowlessWglApplication&) = delete; + + /** @brief Moving is not allowed */ + WindowlessWglApplication& operator=(WindowlessWglApplication&&) = delete; + + /** + * @brief Execute application + * @return Value for returning from `main()` + * + * See @ref MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN() for usage + * information. + */ + virtual int exec() = 0; + + protected: + /* Nobody will need to have (and delete) WindowlessWglApplication*, + thus this is faster than public pure virtual destructor */ + ~WindowlessWglApplication(); + + /** @copydoc Sdl2Application::createContext() */ + #ifdef DOXYGEN_GENERATING_OUTPUT + void createContext(const Configuration& configuration = Configuration()); + #else + /* To avoid "invalid use of incomplete type" */ + void createContext(const Configuration& configuration); + void createContext(); + #endif + + /** @copydoc Sdl2Application::tryCreateContext() */ + bool tryCreateContext(const Configuration& configuration); + + private: + HWND _window; + HDC _deviceContext; + HGLRC _renderingContext; + + Context* _c; +}; + +/** +@brief %Configuration + +@see @ref WindowlessWglApplication(), @ref createContext(), + @ref tryCreateContext() +*/ +class WindowlessWglApplication::Configuration { + public: + constexpr /*implicit*/ Configuration() {} +}; + +/** @hideinitializer +@brief Entry point for windowless WGL application +@param className Class name + +See @ref Magnum::Platform::WindowlessWglApplication "Platform::WindowlessWglApplication" +for usage information. This macro abstracts out platform-specific entry point +code, see @ref portability-applications for more information. When no other +windowless application header is included this macro is also aliased to +`MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. +*/ +#define MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(className) \ + int globalArgc; char** globalArgv; \ + LRESULT CALLBACK windowProcedure(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); \ + LRESULT CALLBACK windowProcedure(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { \ + switch(message) { \ + case WM_CREATE: \ + { \ + className app({globalArgc, globalArgv, hWnd}); \ + app.exec(); \ + } \ + PostQuitMessage(0); \ + break; \ + default: return DefWindowProc(hWnd, message, wParam, lParam); \ + } \ + return 0; \ + } \ + int main(int argc, char** argv) { \ + globalArgc = argc; \ + globalArgv = argv; \ + return Magnum::Platform::WindowlessWglApplication::create(windowProcedure); \ + } + +#ifndef DOXYGEN_GENERATING_OUTPUT +#ifndef MAGNUM_WINDOWLESSAPPLICATION_MAIN +typedef WindowlessWglApplication WindowlessApplication; +#define MAGNUM_WINDOWLESSAPPLICATION_MAIN(className) MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(className) +#else +#undef MAGNUM_WINDOWLESSAPPLICATION_MAIN +#endif +#endif + +}} + +#endif From 8e1e8ee30efb7fc6aedca0ac7da71b9eab594b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 10 May 2014 17:28:56 +0200 Subject: [PATCH 02/47] Platform: enable magnum-info on Windows. --- CMakeLists.txt | 4 ++-- src/Magnum/Platform/CMakeLists.txt | 2 ++ src/Magnum/Platform/magnum-info.cpp | 9 +++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74dbfe3ca..a3f06d528 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,8 +75,8 @@ if(NOT CORRADE_TARGET_NACL AND NOT CORRADE_TARGET_ANDROID) option(WITH_SDL2APPLICATION "Build Sdl2Application library" OFF) endif() -# Magnum Info (currently only using GLX or NaCl) -if((CORRADE_TARGET_UNIX AND NOT APPLE) OR CORRADE_TARGET_NACL) +# Magnum Info (currently only using GLX or WGL or on NaCl) +if((CORRADE_TARGET_UNIX AND NOT APPLE) OR CORRADE_TARGET_NACL OR CORRADE_TARGET_WINDOWS) option(WITH_MAGNUMINFO "Build magnum-info utility" OFF) endif() diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index 401244d6e..1597e2204 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -226,6 +226,8 @@ if(WITH_MAGNUMINFO) target_link_libraries(magnum-info MagnumWindowlessGlxApplication ${X11_LIBRARIES}) elseif(CORRADE_TARGET_NACL) target_link_libraries(magnum-info MagnumWindowlessNaClApplication ppapi_cpp ppapi) + elseif(CORRADE_TARGET_WINDOWS) + target_link_libraries(magnum-info MagnumWindowlessWglApplication) else() message(FATAL_ERROR "magnum-info is not available on this platform. Set WITH_MAGNUMINFO to OFF to skip building it.") endif() diff --git a/src/Magnum/Platform/magnum-info.cpp b/src/Magnum/Platform/magnum-info.cpp index 3930c0eb9..1f61d915d 100644 --- a/src/Magnum/Platform/magnum-info.cpp +++ b/src/Magnum/Platform/magnum-info.cpp @@ -50,10 +50,15 @@ #ifndef MAGNUM_TARGET_GLES2 #include "Magnum/TextureArray.h" #endif -#ifndef CORRADE_TARGET_NACL + +#ifdef CORRADE_TARGET_NACL +#include "Magnum/Platform/WindowlessNaClApplication.h" +#elif defined(CORRADE_TARGET_UNIX) #include "Magnum/Platform/WindowlessGlxApplication.h" +#elif defined(CORRADE_TARGET_WINDOWS) +#include "Magnum/Platform/WindowlessWglApplication.h" #else -#include "Magnum/Platform/WindowlessNaClApplication.h" +#error No windowless application available on this platform #endif namespace Magnum { From df26073620cf85fd716ccc897648ca333b12f827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 10 May 2014 17:29:49 +0200 Subject: [PATCH 03/47] Enabled other utilities on Windows. --- CMakeLists.txt | 4 ++-- doc/building.dox | 2 +- src/Magnum/Text/CMakeLists.txt | 14 +++++++++----- src/Magnum/Text/fontconverter.cpp | 9 ++++++++- src/Magnum/TextureTools/CMakeLists.txt | 14 +++++++++----- src/Magnum/TextureTools/distancefieldconverter.cpp | 9 ++++++++- 6 files changed, 37 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3f06d528..bd221393c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,8 +80,8 @@ if((CORRADE_TARGET_UNIX AND NOT APPLE) OR CORRADE_TARGET_NACL OR CORRADE_TARGET_ option(WITH_MAGNUMINFO "Build magnum-info utility" OFF) endif() -# Utilities (currently depending on WindowlessGlxApplication) -if(CORRADE_TARGET_UNIX AND NOT APPLE) +# Utilities (currently only using GLX or WGL) +if((CORRADE_TARGET_UNIX AND NOT APPLE) OR CORRADE_TARGET_WINDOWS) cmake_dependent_option(WITH_FONTCONVERTER "Build magnum-fontconverter utility" OFF "NOT TARGET_GLES" OFF) cmake_dependent_option(WITH_DISTANCEFIELDCONVERTER "Build magnum-distancefieldconverter utility" OFF "NOT TARGET_GLES" OFF) endif() diff --git a/doc/building.dox b/doc/building.dox index 3f07a5501..1bcf0c0a8 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -204,7 +204,7 @@ platform best: - `WITH_WINDOWLESSWGLAPPLICATION` - @ref Platform::WindowlessWglApplication "WindowlessWglApplication" There are also a few command-line utilities. They are currently available only -on Linux and are disabled by default: +on Linux and Windows, also disabled by default: - `WITH_MAGNUMINFO` - `magnum-info` executable, provides information about the engine and OpenGL capabilities. diff --git a/src/Magnum/Text/CMakeLists.txt b/src/Magnum/Text/CMakeLists.txt index c742bd3f8..418e4999b 100644 --- a/src/Magnum/Text/CMakeLists.txt +++ b/src/Magnum/Text/CMakeLists.txt @@ -60,17 +60,21 @@ install(TARGETS MagnumText install(FILES ${MagnumText_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Text) if(WITH_FONTCONVERTER) - if(NOT UNIX OR TARGET_GLES) - message(FATAL_ERROR "magnum-fontconverter is not available on this platform. Set WITH_FONTCONVERTER to OFF to suppress this warning.") - endif() - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/configure.h) include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) add_executable(magnum-fontconverter fontconverter.cpp) - target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES}) + + if(UNIX AND NOT TARGET_GLES) + target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES}) + elseif(WIN32) + target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessWglApplication) + else() + message(FATAL_ERROR "magnum-fontconverter is not available on this platform. Set WITH_FONTCONVERTER to OFF to suppress this warning.") + endif() + install(TARGETS magnum-fontconverter DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}) endif() diff --git a/src/Magnum/Text/fontconverter.cpp b/src/Magnum/Text/fontconverter.cpp index df510b7aa..4f2b04db1 100644 --- a/src/Magnum/Text/fontconverter.cpp +++ b/src/Magnum/Text/fontconverter.cpp @@ -27,12 +27,19 @@ #include #include -#include "Magnum/Platform/WindowlessGlxApplication.h" #include "Magnum/Text/AbstractFont.h" #include "Magnum/Text/AbstractFontConverter.h" #include "Magnum/Text/DistanceFieldGlyphCache.h" #include "Magnum/Trade/AbstractImageConverter.h" +#ifdef CORRADE_TARGET_UNIX +#include "Magnum/Platform/WindowlessGlxApplication.h" +#elif defined(CORRADE_TARGET_WINDOWS) +#include "Magnum/Platform/WindowlessWglApplication.h" +#else +#error No windowless application available on this platform +#endif + #include "configure.h" namespace Magnum { namespace Text { diff --git a/src/Magnum/TextureTools/CMakeLists.txt b/src/Magnum/TextureTools/CMakeLists.txt index 19e06bb5c..e1e2b9318 100644 --- a/src/Magnum/TextureTools/CMakeLists.txt +++ b/src/Magnum/TextureTools/CMakeLists.txt @@ -49,17 +49,21 @@ endif() target_link_libraries(MagnumTextureTools Magnum) if(WITH_DISTANCEFIELDCONVERTER) - if(NOT UNIX OR TARGET_GLES) - message(FATAL_ERROR "magnum-distancefieldconverter is not available on this platform. Set WITH_DISTANCEFIELDCONVERTER to OFF to suppress this warning.") - endif() - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/distancefieldconverterConfigure.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/distancefieldconverterConfigure.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(magnum-distancefieldconverter distancefieldconverter.cpp) - target_link_libraries(magnum-distancefieldconverter MagnumTextureTools Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES}) + + if(UNIX AND NOT TARGET_GLES) + target_link_libraries(magnum-distancefieldconverter MagnumTextureTools Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES}) + elseif(WIN32) + target_link_libraries(magnum-distancefieldconverter MagnumTextureTools MagnumWindowlessWglApplication Magnum) + else() + message(FATAL_ERROR "magnum-distancefieldconverter is not available on this platform. Set WITH_DISTANCEFIELDCONVERTER to OFF to suppress this warning.") + endif() + install(TARGETS magnum-distancefieldconverter DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}) endif() diff --git a/src/Magnum/TextureTools/distancefieldconverter.cpp b/src/Magnum/TextureTools/distancefieldconverter.cpp index 3787e7a77..d53f316ee 100644 --- a/src/Magnum/TextureTools/distancefieldconverter.cpp +++ b/src/Magnum/TextureTools/distancefieldconverter.cpp @@ -32,12 +32,19 @@ #include "Magnum/Renderer.h" #include "Magnum/Texture.h" #include "Magnum/TextureFormat.h" -#include "Magnum/Platform/WindowlessGlxApplication.h" #include "Magnum/TextureTools/DistanceField.h" #include "Magnum/Trade/AbstractImporter.h" #include "Magnum/Trade/AbstractImageConverter.h" #include "Magnum/Trade/ImageData.h" +#ifdef CORRADE_TARGET_UNIX +#include "Magnum/Platform/WindowlessGlxApplication.h" +#elif defined(CORRADE_TARGET_WINDOWS) +#include "Magnum/Platform/WindowlessWglApplication.h" +#else +#error No windowless application available on this platform +#endif + #include "distancefieldconverterConfigure.h" namespace Magnum { namespace TextureTools { From 4e50aeee31f8251cccd73ab47f31eadfd258c987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 10 May 2014 20:04:09 +0200 Subject: [PATCH 04/47] Ability to reset internal state tracker. --- src/Magnum/AbstractFramebuffer.cpp | 2 + src/Magnum/AbstractShaderProgram.cpp | 4 +- src/Magnum/AbstractTexture.cpp | 1 + src/Magnum/Buffer.cpp | 1 + src/Magnum/Context.cpp | 24 +++++++++++ src/Magnum/Context.h | 43 +++++++++++++++++++ src/Magnum/Framebuffer.cpp | 1 + src/Magnum/Implementation/BufferState.cpp | 6 +++ src/Magnum/Implementation/BufferState.h | 2 + .../Implementation/FramebufferState.cpp | 7 +++ src/Magnum/Implementation/FramebufferState.h | 2 + src/Magnum/Implementation/MeshState.cpp | 6 +++ src/Magnum/Implementation/MeshState.h | 2 + .../Implementation/ShaderProgramState.cpp | 6 +++ .../Implementation/ShaderProgramState.h | 2 + src/Magnum/Implementation/State.h | 3 ++ src/Magnum/Implementation/TextureState.cpp | 6 +++ src/Magnum/Implementation/TextureState.h | 2 + src/Magnum/Mesh.cpp | 1 + 19 files changed, 120 insertions(+), 1 deletion(-) diff --git a/src/Magnum/AbstractFramebuffer.cpp b/src/Magnum/AbstractFramebuffer.cpp index 9500c4b7f..c0c5f2f7e 100644 --- a/src/Magnum/AbstractFramebuffer.cpp +++ b/src/Magnum/AbstractFramebuffer.cpp @@ -158,6 +158,8 @@ AbstractFramebuffer& AbstractFramebuffer::setViewport(const Range2Di& rectangle) void AbstractFramebuffer::setViewportInternal() { Implementation::FramebufferState* state = Context::current()->state().framebuffer; + /* We are using empty viewport to indicate disengaged state */ + CORRADE_INTERNAL_ASSERT(_viewport != Range2Di{}); CORRADE_INTERNAL_ASSERT(state->drawBinding == _id); /* Already up-to-date, nothing to do */ diff --git a/src/Magnum/AbstractShaderProgram.cpp b/src/Magnum/AbstractShaderProgram.cpp index b72dcf562..572fc72ba 100644 --- a/src/Magnum/AbstractShaderProgram.cpp +++ b/src/Magnum/AbstractShaderProgram.cpp @@ -196,7 +196,9 @@ Int AbstractShaderProgram::maxTexelOffset() { } #endif -AbstractShaderProgram::AbstractShaderProgram(): _id(glCreateProgram()) {} +AbstractShaderProgram::AbstractShaderProgram(): _id(glCreateProgram()) { + CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding); +} AbstractShaderProgram::AbstractShaderProgram(AbstractShaderProgram&& other) noexcept: _id(other._id) { other._id = 0; diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index 6e9049a4f..56b005e64 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -171,6 +171,7 @@ void AbstractTexture::bindImplementationMulti(const GLint firstTextureUnit, std: AbstractTexture::AbstractTexture(GLenum target): _target(target) { glGenTextures(1, &_id); + CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding); } AbstractTexture::~AbstractTexture() { diff --git a/src/Magnum/Buffer.cpp b/src/Magnum/Buffer.cpp index d37f253ae..37d96f8fc 100644 --- a/src/Magnum/Buffer.cpp +++ b/src/Magnum/Buffer.cpp @@ -114,6 +114,7 @@ Buffer::Buffer(Buffer::Target targetHint): _targetHint(targetHint) #endif { glGenBuffers(1, &_id); + CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding); } Buffer::~Buffer() { diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index e835284ae..ad57fa6be 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -45,6 +45,11 @@ #include "Magnum/Renderer.h" #include "Implementation/State.h" +#include "Implementation/BufferState.h" +#include "Implementation/FramebufferState.h" +#include "Implementation/MeshState.h" +#include "Implementation/ShaderProgramState.h" +#include "Implementation/TextureState.h" namespace Magnum { @@ -526,6 +531,25 @@ Version Context::supportedVersion(std::initializer_list versions) const #endif } +void Context::resetState(const States states) { + if(states & State::Buffers) + _state->buffer->reset(); + if(states & State::Framebuffers) + _state->framebuffer->reset(); + if(states & State::Meshes) + _state->mesh->reset(); + + /* Nothing to reset for renderer yet */ + + if(states & State::Shaders) { + /* Nothing to reset for shaders */ + _state->shaderProgram->reset(); + } + + if(states & State::Textures) + _state->texture->reset(); +} + #ifndef DOXYGEN_GENERATING_OUTPUT Debug operator<<(Debug debug, const Context::Flag value) { switch(value) { diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index f74fd887e..df00aa1dc 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -137,6 +137,38 @@ class MAGNUM_EXPORT Context { #endif }; + /** + * @brief State to reset + * + * @see @ref States, @ref resetState() + */ + enum class State: UnsignedInt { + /** Reset tracked buffer-related bindings and state */ + Buffers = 1 << 0, + + /** Reset tracked framebuffer-related bindings and state */ + Framebuffers = 1 << 1, + + /** Reset tracked mesh-related bindings */ + Meshes = 1 << 2, + + /** Reset tracked renderer-related state */ + Renderer = 1 << 3, + + /** Reset tracked shader-related bindings */ + Shaders = 1 << 4, + + /** Reset tracked texture-related bindings and state */ + Textures = 1 << 5 + }; + + /** + * @brief States to reset + * + * @see @ref resetState() + */ + typedef Containers::EnumSet States; + /** * @brief Context flags * @@ -382,6 +414,17 @@ class MAGNUM_EXPORT Context { return isVersionSupported(extension._requiredVersion) && extensionStatus[extension._index] && !isVersionSupported(_extensionRequiredVersion[extension._index]); } + /** + * @brief Reset internal state tracker + * @param states Tracked states to reset. Default is all state. + * + * The engine internally tracks object bindings and other state to + * avoid redundant OpenGL calls. In some cases (e.g. when non-Magnum + * code makes GL calls) the internal tracker no longer reflects actual + * state and needs to be reset to avoid strange issues. + */ + void resetState(States states = ~States{}); + #ifndef DOXYGEN_GENERATING_OUTPUT Implementation::State& state() { return *_state; } #endif diff --git a/src/Magnum/Framebuffer.cpp b/src/Magnum/Framebuffer.cpp index d0fd4ef75..1c707507e 100644 --- a/src/Magnum/Framebuffer.cpp +++ b/src/Magnum/Framebuffer.cpp @@ -82,6 +82,7 @@ Framebuffer::Framebuffer(const Range2Di& viewport) { _viewport = viewport; glGenFramebuffers(1, &_id); + CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding); } Framebuffer::~Framebuffer() { diff --git a/src/Magnum/Implementation/BufferState.cpp b/src/Magnum/Implementation/BufferState.cpp index 6be8f2945..d9e0b1d3d 100644 --- a/src/Magnum/Implementation/BufferState.cpp +++ b/src/Magnum/Implementation/BufferState.cpp @@ -30,6 +30,8 @@ #include "Magnum/Context.h" #include "Magnum/Extensions.h" +#include "State.h" + namespace Magnum { namespace Implementation { const Buffer::Target BufferState::targetForIndex[] = { @@ -136,4 +138,8 @@ BufferState::BufferState(Context& context, std::vector& extensions) #endif } +void BufferState::reset() { + std::fill_n(bindings, TargetCount, State::DisengagedBinding); +} + }} diff --git a/src/Magnum/Implementation/BufferState.h b/src/Magnum/Implementation/BufferState.h index 4e16abb18..9c255c37a 100644 --- a/src/Magnum/Implementation/BufferState.h +++ b/src/Magnum/Implementation/BufferState.h @@ -46,6 +46,8 @@ struct BufferState { explicit BufferState(Context& context, std::vector& extensions); + void reset(); + #ifndef MAGNUM_TARGET_GLES2 void(*copyImplementation)(Buffer&, Buffer&, GLintptr, GLintptr, GLsizeiptr); #endif diff --git a/src/Magnum/Implementation/FramebufferState.cpp b/src/Magnum/Implementation/FramebufferState.cpp index 4b6a99803..0f6f3c121 100644 --- a/src/Magnum/Implementation/FramebufferState.cpp +++ b/src/Magnum/Implementation/FramebufferState.cpp @@ -29,6 +29,8 @@ #include "Magnum/Extensions.h" #include "Magnum/Renderbuffer.h" +#include "State.h" + namespace Magnum { namespace Implementation { FramebufferState::FramebufferState(Context& context, std::vector& extensions): readBinding(0), drawBinding(0), renderbufferBinding(0), maxDrawBuffers(0), maxColorAttachments(0), maxRenderbufferSize(0), maxSamples(0) @@ -138,4 +140,9 @@ FramebufferState::FramebufferState(Context& context, std::vector& e } } +void FramebufferState::reset() { + readBinding = drawBinding = renderbufferBinding = State::DisengagedBinding; + viewport = {}; +} + }} diff --git a/src/Magnum/Implementation/FramebufferState.h b/src/Magnum/Implementation/FramebufferState.h index f8ecde63c..25c55fe29 100644 --- a/src/Magnum/Implementation/FramebufferState.h +++ b/src/Magnum/Implementation/FramebufferState.h @@ -35,6 +35,8 @@ namespace Magnum { namespace Implementation { struct FramebufferState { explicit FramebufferState(Context& context, std::vector& extensions); + void reset(); + GLenum(AbstractFramebuffer::*checkStatusImplementation)(FramebufferTarget); void(AbstractFramebuffer::*drawBuffersImplementation)(GLsizei, const GLenum*); void(AbstractFramebuffer::*drawBufferImplementation)(GLenum); diff --git a/src/Magnum/Implementation/MeshState.cpp b/src/Magnum/Implementation/MeshState.cpp index 66d56fb57..9af9a0d76 100644 --- a/src/Magnum/Implementation/MeshState.cpp +++ b/src/Magnum/Implementation/MeshState.cpp @@ -28,6 +28,8 @@ #include "Magnum/Context.h" #include "Magnum/Extensions.h" +#include "State.h" + namespace Magnum { namespace Implementation { MeshState::MeshState(Context& context, std::vector& extensions): currentVAO(0) @@ -138,4 +140,8 @@ MeshState::MeshState(Context& context, std::vector& extensions): cu #endif } +void MeshState::reset() { + currentVAO = State::DisengagedBinding; +} + }} diff --git a/src/Magnum/Implementation/MeshState.h b/src/Magnum/Implementation/MeshState.h index 2c39037fc..c5ba22bef 100644 --- a/src/Magnum/Implementation/MeshState.h +++ b/src/Magnum/Implementation/MeshState.h @@ -35,6 +35,8 @@ namespace Magnum { namespace Implementation { struct MeshState { explicit MeshState(Context& context, std::vector& extensions); + void reset(); + void(Mesh::*createImplementation)(); void(Mesh::*destroyImplementation)(); void(Mesh::*attributePointerImplementation)(const Mesh::Attribute&); diff --git a/src/Magnum/Implementation/ShaderProgramState.cpp b/src/Magnum/Implementation/ShaderProgramState.cpp index 3e375e8c0..680ad4bad 100644 --- a/src/Magnum/Implementation/ShaderProgramState.cpp +++ b/src/Magnum/Implementation/ShaderProgramState.cpp @@ -29,6 +29,8 @@ #include "Magnum/Context.h" #include "Magnum/Extensions.h" +#include "State.h" + namespace Magnum { namespace Implementation { ShaderProgramState::ShaderProgramState(Context& context, std::vector& extensions): current(0), maxVertexAttributes(0) @@ -185,4 +187,8 @@ ShaderProgramState::ShaderProgramState(Context& context, std::vector& extensions); + void reset(); + void(AbstractShaderProgram::*uniform1fvImplementation)(GLint, GLsizei, const GLfloat*); void(AbstractShaderProgram::*uniform2fvImplementation)(GLint, GLsizei, const Math::Vector<2, GLfloat>*); void(AbstractShaderProgram::*uniform3fvImplementation)(GLint, GLsizei, const Math::Vector<3, GLfloat>*); diff --git a/src/Magnum/Implementation/State.h b/src/Magnum/Implementation/State.h index 207594cd2..f8e9c6a7f 100644 --- a/src/Magnum/Implementation/State.h +++ b/src/Magnum/Implementation/State.h @@ -26,6 +26,7 @@ */ #include "Magnum/Magnum.h" +#include "Magnum/OpenGL.h" namespace Magnum { namespace Implementation { @@ -44,6 +45,8 @@ struct State { ~State(); + enum: GLuint { DisengagedBinding = ~0u }; + BufferState* buffer; DebugState* debug; FramebufferState* framebuffer; diff --git a/src/Magnum/Implementation/TextureState.cpp b/src/Magnum/Implementation/TextureState.cpp index 0e5c5e23b..60c031784 100644 --- a/src/Magnum/Implementation/TextureState.cpp +++ b/src/Magnum/Implementation/TextureState.cpp @@ -34,6 +34,8 @@ #include "Magnum/Context.h" #include "Magnum/Extensions.h" +#include "State.h" + namespace Magnum { namespace Implementation { TextureState::TextureState(Context& context, std::vector& extensions): maxSize{}, max3DSize{}, maxCubeMapSize{}, @@ -228,4 +230,8 @@ TextureState::TextureState(Context& context, std::vector& extension TextureState::~TextureState() = default; +void TextureState::reset() { + std::fill_n(bindings.begin(), bindings.size(), std::pair{{}, State::DisengagedBinding}); +} + }} diff --git a/src/Magnum/Implementation/TextureState.h b/src/Magnum/Implementation/TextureState.h index 9075a58f8..c4acf3e5d 100644 --- a/src/Magnum/Implementation/TextureState.h +++ b/src/Magnum/Implementation/TextureState.h @@ -37,6 +37,8 @@ struct TextureState { explicit TextureState(Context& context, std::vector& extensions); ~TextureState(); + void reset(); + void(*unbindImplementation)(GLint); void(*bindMultiImplementation)(GLint, std::initializer_list); void(AbstractTexture::*bindImplementation)(GLint); diff --git a/src/Magnum/Mesh.cpp b/src/Magnum/Mesh.cpp index 219b004ff..c91a8059f 100644 --- a/src/Magnum/Mesh.cpp +++ b/src/Magnum/Mesh.cpp @@ -307,6 +307,7 @@ void Mesh::createImplementationVAO() { //glGenVertexArraysOES(1, &_id); CORRADE_INTERNAL_ASSERT(false); #endif + CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding); } void Mesh::destroyImplementationDefault() {} From 436d629687df6784dc70232013abf110d8c39825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 12 May 2014 23:46:48 +0200 Subject: [PATCH 05/47] Make Doxygen debug operator command usable with enums. --- Doxyfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doxyfile b/Doxyfile index ec1dd4e2d..e5aff0b02 100644 --- a/Doxyfile +++ b/Doxyfile @@ -202,7 +202,9 @@ TAB_SIZE = 8 # You can put \n's in the value part of an alias to insert newlines. ALIASES = \ - "debugoperator{1}=@relates \1\n@brief Debug output operator @xrefitem debugoperators \"Debug output operator\" \"Debug output operators for custom types\" Allows printing \1 with Corrade::Utility::Debug and friends." \ + "debugoperator{1}=@relates \1\n@brief Debug output operator @xrefitem debugoperators \"Debug output operator\" \"Debug output operators for custom types\" Allows printing @ref \1 with @ref Corrade::Utility::Debug and friends." \ + "debugoperatorenum{1}=\n@brief Debug output operator @xrefitem debugoperators \"Debug output operator\" \"Debug output operators for custom types\" Allows printing @ref \1 with @ref Corrade::Utility::Debug and friends." \ + "debugoperatorclassenum{2}=@relates \1\n@brief Debug output operator @xrefitem debugoperators \"Debug output operator\" \"Debug output operators for custom types\" Allows printing @ref \2 with @ref Corrade::Utility::Debug and friends." \ "configurationvalueref{1}=@see @ref configurationvalues \"Corrade::Utility::ConfigurationValue<\1>\"" \ "configurationvalue{1}=@brief %Configuration value parser and writer @xrefitem configurationvalues \"Configuration value parser and writer\" \"Configuration value parsers and writers for custom types\" Allows parsing and writing \1 from and to Corrade::Utility::Configuration." \ "collisionoccurenceoperator{2}=@relates \1\n@brief %Collision occurence of %\1 and %\2\n@see \2::operator%(const \1&) const" \ From bef951a5820197c887927e66d49107ac2d2684a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 17:26:22 +0200 Subject: [PATCH 06/47] Audio: completed documentation review. --- src/Magnum/Audio/AbstractImporter.h | 43 +++++++++++++++-------------- src/Magnum/Audio/Audio.h | 2 +- src/Magnum/Audio/Buffer.h | 4 +-- src/Magnum/Audio/Context.h | 8 +++--- src/Magnum/Audio/Renderer.h | 8 +++--- src/Magnum/Audio/Source.h | 8 +++--- 6 files changed, 37 insertions(+), 36 deletions(-) diff --git a/src/Magnum/Audio/AbstractImporter.h b/src/Magnum/Audio/AbstractImporter.h index 2307bb262..40c388138 100644 --- a/src/Magnum/Audio/AbstractImporter.h +++ b/src/Magnum/Audio/AbstractImporter.h @@ -25,8 +25,8 @@ DEALINGS IN THE SOFTWARE. */ -/** @file Audio/AbstractImporter.h - * @brief Class Magnum::Audio::AbstractImporter +/** @file + * @brief Class @ref Magnum::Audio::AbstractImporter */ #include @@ -45,16 +45,17 @@ importer plugins. @section Audio-AbstractImporter-subclassing Subclassing -Plugin implements function doFeatures(), doIsOpened(), one of or both -doOpenData() and doOpenFile() functions, function doClose() and data access -functions doFormat(), doFrequency() and doData(). +Plugin implements function @ref doFeatures(), @ref doIsOpened(), one of or both +@ref doOpenData() and @ref doOpenFile() functions, function @ref doClose() and +data access functions @ref doFormat(), @ref doFrequency() and @ref doData(). You don't need to do most of the redundant sanity checks, these things are checked by the implementation: -- Functions doOpenData() and doOpenFile() are called after the previous file - was closed, function doClose() is called only if there is any file opened. -- Function doOpenData() is called only if @ref Feature::OpenData is +- Functions @ref doOpenData() and @ref doOpenFile() are called after the + previous file was closed, function @ref doClose() is called only if there + is any file opened. +- Function @ref doOpenData() is called only if @ref Feature::OpenData is supported. - All `do*()` implementations working on opened file are called only if there is any file opened. @@ -66,17 +67,17 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractPlugin /** * @brief Features supported by this importer * - * @see Features, features() + * @see @ref Features, @ref features() */ enum class Feature: UnsignedByte { - /** Opening files from raw data using openData() */ + /** Opening files from raw data using @ref openData() */ OpenData = 1 << 0 }; /** * @brief Features supported by this importer * - * @see features() + * @see @ref features() */ typedef Containers::EnumSet Features; @@ -98,7 +99,7 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractPlugin * Closes previous file, if it was opened, and tries to open given * file. Available only if @ref Feature::OpenData is supported. Returns * `true` on success, `false` otherwise. - * @see features(), openFile() + * @see @ref features(), @ref openFile() */ bool openData(Containers::ArrayReference data); @@ -107,7 +108,7 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractPlugin * * Closes previous file, if it was opened, and tries to open given * file. Returns `true` on success, `false` otherwise. - * @see features(), openData() + * @see @ref features(), @ref openData() */ bool openFile(const std::string& filename); @@ -132,33 +133,33 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractPlugin #else protected: #endif - /** @brief Implementation for features() */ + /** @brief Implementation for @ref features() */ virtual Features doFeatures() const = 0; - /** @brief Implementation for isOpened() */ + /** @brief Implementation for @ref isOpened() */ virtual bool doIsOpened() const = 0; - /** @brief Implementation for openData() */ + /** @brief Implementation for @ref openData() */ virtual void doOpenData(Containers::ArrayReference data); /** - * @brief Implementation for openFile() + * @brief Implementation for @ref openFile() * * If @ref Feature::OpenData is supported, default implementation opens * the file and calls @ref doOpenData() with its contents. */ virtual void doOpenFile(const std::string& filename); - /** @brief Implementation for close() */ + /** @brief Implementation for @ref close() */ virtual void doClose() = 0; - /** @brief Implementation for format() */ + /** @brief Implementation for @ref format() */ virtual Buffer::Format doFormat() const = 0; - /** @brief Implementation for frequency() */ + /** @brief Implementation for @ref frequency() */ virtual UnsignedInt doFrequency() const = 0; - /** @brief Implementation for data() */ + /** @brief Implementation for @ref data() */ virtual Containers::Array doData() = 0; }; diff --git a/src/Magnum/Audio/Audio.h b/src/Magnum/Audio/Audio.h index 72ba9e27a..46865200d 100644 --- a/src/Magnum/Audio/Audio.h +++ b/src/Magnum/Audio/Audio.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Forward declarations for Magnum::Audio namespace + * @brief Forward declarations for @ref Magnum::Audio namespace */ namespace Magnum { namespace Audio { diff --git a/src/Magnum/Audio/Buffer.h b/src/Magnum/Audio/Buffer.h index f42829334..de7147355 100644 --- a/src/Magnum/Audio/Buffer.h +++ b/src/Magnum/Audio/Buffer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Audio::Buffer + * @brief Class @ref Magnum::Audio::Buffer */ #include @@ -104,7 +104,7 @@ class Buffer { ALuint _id; }; -/** @debugoperator{Magnum::Audio::Buffer} */ +/** @debugoperatorclassenum{Magnum::Audio::Buffer,Magnum::Audio::Buffer::Format} */ Debug MAGNUM_AUDIO_EXPORT operator<<(Debug debug, Buffer::Format value); inline Buffer::Buffer(Buffer&& other): _id(other._id) { diff --git a/src/Magnum/Audio/Context.h b/src/Magnum/Audio/Context.h index 1864f9c91..2ef9c37d5 100644 --- a/src/Magnum/Audio/Context.h +++ b/src/Magnum/Audio/Context.h @@ -25,8 +25,8 @@ DEALINGS IN THE SOFTWARE. */ -/** @file Audio/Context.h - * @brief Class Magnum::Audio::Context +/** @file + * @brief Class @ref Magnum::Audio::Context */ #include @@ -66,14 +66,14 @@ class MAGNUM_AUDIO_EXPORT Context { /** * @brief Vendor string * - * @see rendererString(), @fn_al{GetString} with @def_al{VENDOR} + * @see @ref rendererString(), @fn_al{GetString} with @def_al{VENDOR} */ std::string vendorString() const { return alGetString(AL_VENDOR); } /** * @brief %Renderer string * - * @see vendorString(), @fn_al{GetString} with @def_al{RENDERER} + * @see @ref vendorString(), @fn_al{GetString} with @def_al{RENDERER} */ std::string rendererString() const { return alGetString(AL_RENDERER); } diff --git a/src/Magnum/Audio/Renderer.h b/src/Magnum/Audio/Renderer.h index ca31f9bbe..c70969c8e 100644 --- a/src/Magnum/Audio/Renderer.h +++ b/src/Magnum/Audio/Renderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Audio::Renderer + * @brief Class @ref Magnum::Audio::Renderer */ #include @@ -45,7 +45,7 @@ class Renderer { /** * @brief Error status * - * @see error() + * @see @ref error() */ enum class Error: ALenum { NoError = AL_NO_ERROR, /**< No error occured */ @@ -116,7 +116,7 @@ class Renderer { /** * @brief Distance model * - * @see setDistanceModel() + * @see @ref setDistanceModel() */ enum class DistanceModel: ALenum { /** No distance attenuation calculation */ @@ -185,7 +185,7 @@ class Renderer { /*@}*/ }; -/** @debugoperator{Magnum::Audio::Renderer} */ +/** @debugoperatorclassenum{Magnum::Audio::Renderer,Magnum::Audio::Renderer::Error} */ Debug MAGNUM_AUDIO_EXPORT operator<<(Debug debug, Renderer::Error value); inline void Renderer::setListenerOrientation(const Vector3& forward, const Vector3& up) { diff --git a/src/Magnum/Audio/Source.h b/src/Magnum/Audio/Source.h index 2c9402f15..ff5b3ae29 100644 --- a/src/Magnum/Audio/Source.h +++ b/src/Magnum/Audio/Source.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Audio::Source + * @brief Class @ref Magnum::Audio::Source */ #include @@ -338,7 +338,7 @@ class MAGNUM_AUDIO_EXPORT Source { }; /** - * @brief Source type + * @brief %Source type * * @see @ref setBuffer(), @fn_al{GetSourcei} with @def_al{SOURCE_TYPE} */ @@ -346,7 +346,7 @@ class MAGNUM_AUDIO_EXPORT Source { /** * @brief Attach buffer - * @param buffer Buffer to attach or `nullptr` + * @param buffer %Buffer to attach or `nullptr` * @return Reference to self (for method chaining) * * If an buffer is attached, changes source type to @ref Type::Static, @@ -586,7 +586,7 @@ class MAGNUM_AUDIO_EXPORT Source { ALuint _id; }; -/** @debugoperator{Magnum::Audio::Source} */ +/** @debugoperatorclassenum{Magnum::Audio::Source,Magnum::Audio::Source::State} */ Debug MAGNUM_AUDIO_EXPORT operator<<(Debug debug, Source::State value); inline Source::Source(Source&& other): _id(other._id) { From e3d87fb00bf3e6025b220990ed2483a882a0d552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 17:30:18 +0200 Subject: [PATCH 07/47] DebugTools: completed documentation review. --- src/Magnum/DebugTools/DebugTools.h | 2 +- src/Magnum/DebugTools/ForceRenderer.h | 5 ++--- src/Magnum/DebugTools/ObjectRenderer.h | 5 ++--- src/Magnum/DebugTools/Profiler.h | 24 ++++++++++++------------ src/Magnum/DebugTools/ResourceManager.h | 2 +- src/Magnum/DebugTools/ShapeRenderer.h | 10 +++++----- 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/Magnum/DebugTools/DebugTools.h b/src/Magnum/DebugTools/DebugTools.h index 6b6ed238a..a8ff1c809 100644 --- a/src/Magnum/DebugTools/DebugTools.h +++ b/src/Magnum/DebugTools/DebugTools.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Forward declarations for Magnum::DebugTools namespace + * @brief Forward declarations for @ref Magnum::DebugTools namespace */ #include "Magnum/Types.h" diff --git a/src/Magnum/DebugTools/ForceRenderer.h b/src/Magnum/DebugTools/ForceRenderer.h index 74d67c8c7..80c97837a 100644 --- a/src/Magnum/DebugTools/ForceRenderer.h +++ b/src/Magnum/DebugTools/ForceRenderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ForceRenderer, Magnum::DebugTools::ForceRendererOptions, typedef Magnum::DebugTools::ForceRenderer2D, Magnum::DebugTools::ForceRenderer3D + * @brief Class @ref Magnum::DebugTools::ForceRenderer, @ref Magnum::DebugTools::ForceRendererOptions, typedef @ref Magnum::DebugTools::ForceRenderer2D, @ref Magnum::DebugTools::ForceRenderer3D */ #include "Magnum/Color.h" @@ -122,10 +122,9 @@ template class MAGNUM_DEBUGTOOLS_EXPORT ForceRenderer: p /** @overload */ ForceRenderer(SceneGraph::AbstractObject&, const typename DimensionTraits::VectorType&, typename DimensionTraits::VectorType&&, ResourceKey = ResourceKey(), SceneGraph::DrawableGroup* = nullptr) = delete; - protected: + private: void draw(const typename DimensionTraits::MatrixType& transformationMatrix, SceneGraph::AbstractCamera& camera) override; - private: const typename DimensionTraits::VectorType forcePosition; const typename DimensionTraits::VectorType& force; diff --git a/src/Magnum/DebugTools/ObjectRenderer.h b/src/Magnum/DebugTools/ObjectRenderer.h index 79a352142..70371d95f 100644 --- a/src/Magnum/DebugTools/ObjectRenderer.h +++ b/src/Magnum/DebugTools/ObjectRenderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ObjectRenderer, Magnum::DebugTools::ObjectRendererOptions, typedef Magnum::DebugTools::ObjectRenderer2D, Magnum::DebugTools::ObjectRenderer3D + * @brief Class @ref Magnum::DebugTools::ObjectRenderer, @ref Magnum::DebugTools::ObjectRendererOptions, typedef @ref Magnum::DebugTools::ObjectRenderer2D, @ref Magnum::DebugTools::ObjectRenderer3D */ #include "Magnum/Resource.h" @@ -97,10 +97,9 @@ template class MAGNUM_DEBUGTOOLS_EXPORT ObjectRenderer: */ explicit ObjectRenderer(SceneGraph::AbstractObject& object, ResourceKey options = ResourceKey(), SceneGraph::DrawableGroup* drawables = nullptr); - protected: + private: void draw(const typename DimensionTraits::MatrixType& transformationMatrix, SceneGraph::AbstractCamera& camera) override; - private: Resource options; Resource> shader; Resource mesh; diff --git a/src/Magnum/DebugTools/Profiler.h b/src/Magnum/DebugTools/Profiler.h index 9c6a4cfff..a824988a4 100644 --- a/src/Magnum/DebugTools/Profiler.h +++ b/src/Magnum/DebugTools/Profiler.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::Profiler + * @brief Class @ref Magnum::DebugTools::Profiler */ #include @@ -43,7 +43,7 @@ namespace Magnum { namespace DebugTools { @brief %Profiler Measures time passed during specified sections of each frame. It's meant to be -used in rendering and event loops (e.g. Platform::Sdl2Application::drawEvent()), +used in rendering and event loops (e.g. @ref Platform::Sdl2Application::drawEvent()), but it's possible to use it standalone elsewhere. Example usage: @code DebugTools::Profiler p; @@ -94,7 +94,7 @@ p.printStatistics(); @endcode It's possible to start profiler only for certain parts of the code and then -stop it again using stop(), if you are not interested in profiling the rest. +stop it again using @ref stop(), if you are not interested in profiling the rest. @todo Some unit testing @todo More time intervals @@ -104,14 +104,14 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { /** * @brief Section ID * - * @see otherSection, addSection(), start(Section) + * @see @ref otherSection, @ref addSection(), @ref start(Section) */ typedef UnsignedInt Section; /** * @brief Default section * - * @see start() + * @see @ref start() */ static const Section otherSection = 0; @@ -130,15 +130,15 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { * @brief Add named section * * @attention This function cannot be called if profiling is enabled. - * @see otherSection, start(Section), stop() + * @see @ref otherSection, @ref start(Section), @ref stop() */ Section addSection(const std::string& name); /** * @brief Whether profiling is enabled * - * If the profiling is not enabled, calls to start() and stop() have - * no effect. + * If the profiling is not enabled, calls to @ref start() and + * @ref stop() have no effect. */ bool isEnabled() { return enabled; } @@ -146,14 +146,14 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { * @brief Enable profiling * * Clears already mesaured data. - * @see disable(), isEnabled() + * @see @ref disable(), @ref isEnabled() */ void enable(); /** * @brief Disable profiling * - * @see enable(), isEnabled() + * @see @ref enable(), @ref isEnabled() */ void disable(); @@ -162,14 +162,14 @@ class MAGNUM_DEBUGTOOLS_EXPORT Profiler { * * If profiling is already running, current time is saved for previous * section. - * @see @ref otherSection, start(Section) + * @see @ref otherSection, @ref start(Section) */ void start(Section section); /** * @brief Start profiling of "other" section * - * Same as calling `start(Profiler::otherSection)`. + * Same as calling `start(DebugTools::Profiler::otherSection)`. * @note Does nothing if profiling is disabled. */ void start() { start(otherSection); } diff --git a/src/Magnum/DebugTools/ResourceManager.h b/src/Magnum/DebugTools/ResourceManager.h index 06b18acac..d47742059 100644 --- a/src/Magnum/DebugTools/ResourceManager.h +++ b/src/Magnum/DebugTools/ResourceManager.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ResourceManager + * @brief Class @ref Magnum::DebugTools::ResourceManager */ #ifndef MAGNUM_RESOURCEMANAGER_DEFINE_INTERNALINSTANCE diff --git a/src/Magnum/DebugTools/ShapeRenderer.h b/src/Magnum/DebugTools/ShapeRenderer.h index d1b62165a..4c8aa875a 100644 --- a/src/Magnum/DebugTools/ShapeRenderer.h +++ b/src/Magnum/DebugTools/ShapeRenderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::DebugTools::ShapeRenderer, Magnum::DebugTools::ShapeRendererOptions, typedef Magnum::DebugTools::ShapeRenderer2D, Magnum::DebugTools::ShapeRenderer3D + * @brief Class @ref Magnum::DebugTools::ShapeRenderer, @ref Magnum::DebugTools::ShapeRendererOptions, typedef @ref Magnum::DebugTools::ShapeRenderer2D, @ref Magnum::DebugTools::ShapeRenderer3D */ #include "Magnum/Color.h" @@ -56,7 +56,7 @@ class ShapeRendererOptions { /** * @brief Shape rendering mode * - * @see setRenderMode() + * @see @ref setRenderMode() */ enum class RenderMode: UnsignedByte { Wireframe, /**< Wireframe rendering */ @@ -138,7 +138,9 @@ new DebugTools::ShapeRenderer2D(shape, "red", debugDrawables); @todo Different drawing style for inverted shapes? (marking the "inside" somehow) */ template class MAGNUM_DEBUGTOOLS_EXPORT ShapeRenderer: public SceneGraph::Drawable { + #ifndef DOXYGEN_GENERATING_OUTPUT friend void Implementation::createDebugMesh<>(ShapeRenderer&, const Shapes::Implementation::AbstractShape&); + #endif public: /** @@ -157,11 +159,9 @@ template class MAGNUM_DEBUGTOOLS_EXPORT ShapeRenderer: p ~ShapeRenderer(); - protected: - /** @todoc Remove Float when Doxygen properly treats this as override */ + private: void draw(const typename DimensionTraits::MatrixType& transformationMatrix, SceneGraph::AbstractCamera& camera) override; - private: Resource options; std::vector*> renderers; }; From 81039fc2c912fbd4c8cbc718c4425df8ad16192c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 12 May 2014 23:40:38 +0200 Subject: [PATCH 08/47] Math: completed documentation review. --- src/Magnum/Math/Algorithms/GaussJordan.h | 9 +- src/Magnum/Math/Algorithms/GramSchmidt.h | 10 +- src/Magnum/Math/Algorithms/Svd.h | 2 +- src/Magnum/Math/Angle.h | 20 ++-- src/Magnum/Math/BoolVector.h | 12 ++- src/Magnum/Math/Complex.h | 58 +++++++---- src/Magnum/Math/Constants.h | 6 +- src/Magnum/Math/Dual.h | 6 +- src/Magnum/Math/DualComplex.h | 47 +++++---- src/Magnum/Math/DualQuaternion.h | 81 ++++++++------- src/Magnum/Math/Functions.h | 14 +-- src/Magnum/Math/Geometry/Distance.h | 29 +++--- src/Magnum/Math/Geometry/Intersection.h | 6 +- src/Magnum/Math/Math.h | 2 +- src/Magnum/Math/Matrix.h | 24 +++-- src/Magnum/Math/Matrix3.h | 87 +++++++++------- src/Magnum/Math/Matrix4.h | 123 ++++++++++++++--------- src/Magnum/Math/Quaternion.h | 91 ++++++++++------- src/Magnum/Math/Range.h | 6 +- src/Magnum/Math/RectangularMatrix.h | 60 ++++++----- src/Magnum/Math/Swizzle.h | 2 +- src/Magnum/Math/TypeTraits.h | 6 +- src/Magnum/Math/Unit.h | 4 +- src/Magnum/Math/Vector.h | 88 ++++++++++------ src/Magnum/Math/Vector2.h | 28 +++--- src/Magnum/Math/Vector3.h | 9 +- src/Magnum/Math/Vector4.h | 3 +- 27 files changed, 497 insertions(+), 336 deletions(-) diff --git a/src/Magnum/Math/Algorithms/GaussJordan.h b/src/Magnum/Math/Algorithms/GaussJordan.h index c978e3199..b749696dc 100644 --- a/src/Magnum/Math/Algorithms/GaussJordan.h +++ b/src/Magnum/Math/Algorithms/GaussJordan.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::Math::Algorithms::gaussJordanInPlaceTransposed(), Magnum::Math::Algorithms::gaussJordanInPlace() + * @brief Function @ref Magnum::Math::Algorithms::gaussJordanInPlaceTransposed(), @ref Magnum::Math::Algorithms::gaussJordanInPlace() */ #include "Magnum/Math/RectangularMatrix.h" @@ -42,7 +42,8 @@ namespace Magnum { namespace Math { namespace Algorithms { As Gauss-Jordan elimination works on rows and matrices in OpenGL are column-major, it is more efficient to operate on transposed matrices and treat -columns as rows. See also gaussJordanInPlace() which works with non-transposed matrices. +columns as rows. See also @ref gaussJordanInPlace() which works with +non-transposed matrices. The function eliminates matrix @p a and solves @p t in place. For efficiency reasons, only pure Gaussian elimination is done on @p a and the final @@ -94,8 +95,8 @@ template bool gaussJordanInPlaceTra /** @brief In-place Gauss-Jordan elimination -Transposes the matrices, calls gaussJordanInPlaceTransposed() on them and then -transposes them back. +Transposes the matrices, calls @ref gaussJordanInPlaceTransposed() on them and +then transposes them back. */ template bool gaussJordanInPlace(RectangularMatrix& a, RectangularMatrix& t) { a = a.transposed(); diff --git a/src/Magnum/Math/Algorithms/GramSchmidt.h b/src/Magnum/Math/Algorithms/GramSchmidt.h index 2e1ec677b..a35aa392e 100644 --- a/src/Magnum/Math/Algorithms/GramSchmidt.h +++ b/src/Magnum/Math/Algorithms/GramSchmidt.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::Math::Algorithms::gramSchmidtOrthogonalizeInPlace(), Magnum::Math::Algorithms::gramSchmidtOrthogonalize(), Magnum::Math::Algorithms::gramSchmidtOrthonormalizeInPlace(), Magnum::Math::Algorithms::gramSchmidtOrthonormalize() + * @brief Function @ref Magnum::Math::Algorithms::gramSchmidtOrthogonalizeInPlace(), @ref Magnum::Math::Algorithms::gramSchmidtOrthogonalize(), @ref Magnum::Math::Algorithms::gramSchmidtOrthonormalizeInPlace(), @ref Magnum::Math::Algorithms::gramSchmidtOrthonormalize() */ #include "Magnum/Math/RectangularMatrix.h" @@ -48,8 +48,8 @@ template void gramSchmidtOrthogonal /** @brief Gram-Schmidt matrix orthogonalization -Unlike gramSchmidtOrthogonalizeInPlace() returns the modified matrix instead -of performing the orthogonalization in-place. +Unlike @ref gramSchmidtOrthogonalizeInPlace() returns the modified matrix +instead of performing the orthogonalization in-place. */ template RectangularMatrix gramSchmidtOrthogonalize(RectangularMatrix matrix) { gramSchmidtOrthogonalizeInPlace(matrix); @@ -72,8 +72,8 @@ template void gramSchmidtOrthonorma /** @brief Gram-Schmidt matrix orthonormalization -Unlike gramSchmidtOrthonormalizeInPlace() returns the modified matrix instead -of performing the orthonormalization in-place. +Unlike @ref gramSchmidtOrthonormalizeInPlace() returns the modified matrix +instead of performing the orthonormalization in-place. */ template RectangularMatrix gramSchmidtOrthonormalize(RectangularMatrix matrix) { gramSchmidtOrthonormalizeInPlace(matrix); diff --git a/src/Magnum/Math/Algorithms/Svd.h b/src/Magnum/Math/Algorithms/Svd.h index e53c24ddf..c8db73760 100644 --- a/src/Magnum/Math/Algorithms/Svd.h +++ b/src/Magnum/Math/Algorithms/Svd.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::Math::Algorithms::svd() + * @brief Function @ref Magnum::Math::Algorithms::svd() */ #include diff --git a/src/Magnum/Math/Angle.h b/src/Magnum/Math/Angle.h index f67811fb3..f75447f0a 100644 --- a/src/Magnum/Math/Angle.h +++ b/src/Magnum/Math/Angle.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Deg, Magnum::Math::Rad and related operators. + * @brief Class @ref Magnum::Math::Deg, @ref Magnum::Math::Rad and related operators. */ #include @@ -119,7 +119,7 @@ std::sin(Float(Rad(b)); // required explicit conversion hints to user // (i.e., conversion to radians) @endcode -@see Magnum::Deg, Magnum::Degd +@see @ref Magnum::Deg, @ref Magnum::Degd */ template class Deg: public Unit { public: @@ -157,7 +157,8 @@ Double cosine = Math::cos(60.0_deg); // cosine = 0.5 Double cosine = Math::cos(1.047_rad); // cosine = 0.5 @endcode @see Magnum::operator""_deg(), operator""_degf(), operator""_rad() -@note Not available on GCC < 4.7. Use Deg::Deg(T) instead. +@todoc Make references explicit when Doxygen can link to operator"" +@note Not available on GCC < 4.7. Use @ref Deg::Deg(T) instead. @requires_gl Only single-precision types are available in OpenGL ES. */ constexpr Deg operator "" _deg(long double value) { return Deg(value); } @@ -172,7 +173,8 @@ Float tangent = Math::tan(60.0_degf); // tangent = 1.732f Float tangent = Math::tan(1.047_radf); // tangent = 1.732f @endcode @see Magnum::operator""_degf(), operator""_deg(), operator""_radf() -@note Not available on GCC < 4.7. Use Deg::Deg(T) instead. +@todoc Make references explicit when Doxygen can link to operator"" +@note Not available on GCC < 4.7. Use @ref Deg::Deg(T) instead. @requires_gl Only single-precision types are available in OpenGL ES. */ constexpr Deg operator "" _degf(long double value) { return Deg(value); } @@ -181,8 +183,8 @@ constexpr Deg operator "" _degf(long double value) { return Deg(va /** @brief Angle in radians -See Deg for more information. -@see Magnum::Rad, Magnum::Radd +See @ref Deg for more information. +@see @ref Magnum::Rad, @ref Magnum::Radd */ template class Rad: public Unit { public: @@ -216,7 +218,8 @@ template class Rad: public Unit { See operator""_rad() for more information. @see Magnum::operator""_rad(), operator""_radf(), operator""_deg() -@note Not available on GCC < 4.7. Use Rad::Rad(T) instead. +@todoc Make references explicit when Doxygen can link to operator"" +@note Not available on GCC < 4.7. Use @ref Rad::Rad(T) instead. */ constexpr Rad operator "" _rad(long double value) { return Rad(value); } #endif @@ -226,7 +229,8 @@ constexpr Rad operator "" _rad(long double value) { return Rad(v See operator""_degf() for more information. @see Magnum::operator""_radf(), operator""_rad(), operator""_degf() -@note Not available on GCC < 4.7. Use Rad::Rad(T) instead. +@todoc Make references explicit when Doxygen can link to operator"" +@note Not available on GCC < 4.7. Use @ref Rad::Rad(T) instead. */ constexpr Rad operator "" _radf(long double value) { return Rad(value); } #endif diff --git a/src/Magnum/Math/BoolVector.h b/src/Magnum/Math/BoolVector.h index 58d74f6f8..03da7127b 100644 --- a/src/Magnum/Math/BoolVector.h +++ b/src/Magnum/Math/BoolVector.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::BoolVector + * @brief Class @ref Magnum::Math::BoolVector */ #include @@ -59,8 +59,8 @@ namespace Implementation { Result of component-wise comparison from Vector. The boolean values are stored as bits in array of unsigned bytes, unused bits have undefined value which -doesn't affect comparison or all() / none() / any() functions. See also -@ref matrix-vector for brief introduction. +doesn't affect comparison or @ref all() / @ref none() / @ref any() functions. +See also @ref matrix-vector for brief introduction. */ template class BoolVector { static_assert(size != 0, "BoolVector cannot have zero elements"); @@ -106,7 +106,8 @@ template class BoolVector { * @brief Raw data * @return %Array of DataSize length * - * @see operator[](), set() + * @todoc Make reference explicit when Doxygen can link to operator[] + * @see operator[](), @ref set() */ UnsignedByte* data() { return _data; } constexpr const UnsignedByte* data() const { return _data; } /**< @overload */ @@ -158,6 +159,7 @@ template class BoolVector { * @brief Bitwise AND * * @see operator&=() + * @todoc Make explicit reference when Doxygen can handle operators */ BoolVector operator&(const BoolVector& other) const { return BoolVector(*this) &= other; @@ -179,6 +181,7 @@ template class BoolVector { * @brief Bitwise OR * * @see operator|=() + * @todoc Make explicit reference when Doxygen can handle operators */ BoolVector operator|(const BoolVector& other) const { return BoolVector(*this) |= other; @@ -200,6 +203,7 @@ template class BoolVector { * @brief Bitwise XOR * * @see operator^=() + * @todoc Make explicit reference when Doxygen can handle operators */ BoolVector operator^(const BoolVector& other) const { return BoolVector(*this) ^= other; diff --git a/src/Magnum/Math/Complex.h b/src/Magnum/Math/Complex.h index 84c97fd31..ab8fd8b4a 100644 --- a/src/Magnum/Math/Complex.h +++ b/src/Magnum/Math/Complex.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Complex + * @brief Class @ref Magnum::Math::Complex */ #include @@ -51,11 +51,11 @@ namespace Implementation { @tparam T Data type Represents 2D rotation. See @ref transformations for brief introduction. -@see Magnum::Complex, Magnum::Complexd, Matrix3 +@see @ref Magnum::Complex, @ref Magnum::Complexd, @ref Matrix3 */ template class Complex { public: - typedef T Type; /**< @brief Underlying data type */ + typedef T Type; /**< @brief Underlying data type */ /** * @brief Dot product @@ -64,6 +64,7 @@ template class Complex { * c_0 \cdot c_1 = a_0 a_1 + b_0 b_1 * @f] * @see dot() const + * @todoc Explicit reference when Doxygen can handle const */ static T dot(const Complex& a, const Complex& b) { return a._real*b._real + a._imaginary*b._imaginary; @@ -75,7 +76,8 @@ template class Complex { * Expects that both complex numbers are normalized. @f[ * \theta = acos \left( \frac{Re(c_0 \cdot c_1))}{|c_0| |c_1|} \right) = acos (a_0 a_1 + b_0 b_1) * @f] - * @see isNormalized(), Quaternion::angle(), Vector::angle() + * @see @ref isNormalized(), @ref Quaternion::angle(), + * @ref Vector::angle() */ static Rad angle(const Complex& normalizedA, const Complex& normalizedB) { CORRADE_ASSERT(normalizedA.isNormalized() && normalizedB.isNormalized(), @@ -90,7 +92,8 @@ template class Complex { * @f[ * c = cos \theta + i sin \theta * @f] - * @see angle(), Matrix3::rotation(), Quaternion::rotation() + * @see @ref angle(), @ref Matrix3::rotation(), + * @ref Quaternion::rotation() */ static Complex rotation(Rad angle) { return {std::cos(T(angle)), std::sin(T(angle))}; @@ -100,7 +103,8 @@ template class Complex { * @brief Create complex number from rotation matrix * * Expects that the matrix is orthogonal (i.e. pure rotation). - * @see toMatrix(), DualComplex::fromMatrix(), Matrix::isOrthogonal() + * @see @ref toMatrix(), @ref DualComplex::fromMatrix(), + * @ref Matrix::isOrthogonal() */ static Complex fromMatrix(const Matrix<2, T>& matrix) { CORRADE_ASSERT(matrix.isOrthogonal(), @@ -132,7 +136,8 @@ template class Complex { * To be used in transformations later. @f[ * c = v_x + iv_y * @f] - * @see operator Vector2(), transformVector() + * @see operator Vector2(), @ref transformVector() + * @todoc Make explicit reference when Doxygen can handle operators */ constexpr explicit Complex(const Vector2& vector): _real(vector.x()), _imaginary(vector.y()) {} @@ -153,7 +158,7 @@ template class Complex { * Complex number is normalized if it has unit length: @f[ * |c \cdot c - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon * @f] - * @see dot(), normalized() + * @see @ref dot(), @ref normalized() */ bool isNormalized() const { return Implementation::isNormalizedSquared(dot()); @@ -182,7 +187,7 @@ template class Complex { * @f[ * \theta = atan2(b, a) * @f] - * @see rotation() + * @see @ref rotation() */ Rad angle() const { return Rad(std::atan2(_imaginary, _real)); @@ -197,8 +202,8 @@ template class Complex { * b & a * \end{pmatrix} * @f] - * @see fromMatrix(), DualComplex::toMatrix(), - * Matrix3::from(const Matrix<2, T>&, const Vector2&) + * @see @ref fromMatrix(), @ref DualComplex::toMatrix(), + * @ref Matrix3::from(const Matrix<2, T>&, const Vector2&) */ Matrix<2, T> toMatrix() const { return {Vector<2, T>(_real, _imaginary), @@ -222,6 +227,7 @@ template class Complex { * @brief Add complex number * * @see operator+=() + * @todoc Explicit reference when Doxygen can handle operators */ Complex operator+(const Complex& other) const { return Complex(*this) += other; @@ -255,6 +261,7 @@ template class Complex { * @brief Subtract complex number * * @see operator-=() + * @todoc Make explicit reference when Doxygen can handle operators */ Complex operator-(const Complex& other) const { return Complex(*this) -= other; @@ -277,6 +284,7 @@ template class Complex { * @brief Multiply with scalar * * @see operator*=(T) + * @todoc Make explicit reference when Doxygen can handle operators */ Complex operator*(T scalar) const { return Complex(*this) *= scalar; @@ -299,6 +307,7 @@ template class Complex { * @brief Divide with scalar * * @see operator/=(T) + * @todoc Make explicit reference when Doxygen can handle operators */ Complex operator/(T scalar) const { return Complex(*this) /= scalar; @@ -319,11 +328,12 @@ template class Complex { /** * @brief Dot product of the complex number * - * Should be used instead of length() for comparing complex number length - * with other values, because it doesn't compute the square root. @f[ + * Should be used instead of @ref length() for comparing complex number + * length with other values, because it doesn't compute the square + * root. @f[ * c \cdot c = a^2 + b^2 * @f] - * @see dot(const Complex&, const Complex&), isNormalized() + * @see @ref dot(const Complex&, const Complex&), @ref isNormalized() */ T dot() const { return dot(*this, *this); @@ -332,11 +342,11 @@ template class Complex { /** * @brief %Complex number length * - * See also dot() const which is faster for comparing length with other - * values. @f[ + * See also @ref dot() const which is faster for comparing length with + * other values. @f[ * |c| = \sqrt{c \cdot c} * @f] - * @see isNormalized() + * @see @ref isNormalized() */ T length() const { /** @todo Remove when newlib has this fixed */ @@ -350,7 +360,7 @@ template class Complex { /** * @brief Normalized complex number (of unit length) * - * @see isNormalized() + * @see @ref isNormalized() */ Complex normalized() const { return (*this)/length(); @@ -370,7 +380,7 @@ template class Complex { /** * @brief Inverted complex number * - * See invertedNormalized() which is faster for normalized + * See @ref invertedNormalized() which is faster for normalized * complex numbers. @f[ * c^{-1} = \frac{c^*}{|c|^2} = \frac{c^*}{c \cdot c} * @f] @@ -382,11 +392,11 @@ template class Complex { /** * @brief Inverted normalized complex number * - * Equivalent to conjugated(). Expects that the complex number is + * Equivalent to @ref conjugated(). Expects that the complex number is * normalized. @f[ * c^{-1} = \frac{c^*}{c \cdot c} = c^* * @f] - * @see isNormalized(), inverted() + * @see @ref isNormalized(), @ref inverted() */ Complex invertedNormalized() const { CORRADE_ASSERT(isNormalized(), @@ -401,7 +411,9 @@ template class Complex { * @f[ * v' = c v = c (v_x + iv_y) * @f] - * @see Complex(const Vector2&), operator Vector2(), Matrix3::transformVector() + * @see @ref Complex(const Vector2&), operator Vector2(), + * @ref Matrix3::transformVector() + * @todoc Make explicit reference when Doxygen can handle operators */ Vector2 transformVector(const Vector2& vector) const { return Vector2((*this)*Complex(vector)); @@ -415,6 +427,7 @@ template class Complex { @brief Multiply scalar with complex Same as Complex::operator*(T) const. +@todoc Make explicit reference when Doxygen can handle operators */ template inline Complex operator*(T scalar, const Complex& complex) { return complex*scalar; @@ -427,6 +440,7 @@ template inline Complex operator*(T scalar, const Complex& comple \frac t c = \frac t a + i \frac t b @f] @see Complex::operator/() +@todoc Make explicit reference when Doxygen can handle operators */ template inline Complex operator/(T scalar, const Complex& complex) { return {scalar/complex.real(), scalar/complex.imaginary()}; diff --git a/src/Magnum/Math/Constants.h b/src/Magnum/Math/Constants.h index 576e8f7f9..fc14397f6 100644 --- a/src/Magnum/Math/Constants.h +++ b/src/Magnum/Math/Constants.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Constants + * @brief Class @ref Magnum::Math::Constants */ #include "Magnum/Types.h" @@ -36,7 +36,7 @@ namespace Magnum { namespace Math { /** @brief Numeric constants -@see Magnum::Constants, Magnum::Constantsd +@see @ref Magnum::Constants, @ref Magnum::Constantsd */ template struct Constants { Constants() = delete; @@ -46,7 +46,7 @@ template struct Constants { /** * @brief Pi * - * @see Deg, Rad + * @see @ref Deg, @ref Rad */ static constexpr T pi(); diff --git a/src/Magnum/Math/Dual.h b/src/Magnum/Math/Dual.h index dacb48869..982a311c3 100644 --- a/src/Magnum/Math/Dual.h +++ b/src/Magnum/Math/Dual.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Dual + * @brief Class @ref Magnum::Math::Dual */ #include @@ -96,6 +96,7 @@ template class Dual { * @brief Add dual number * * @see operator+=() + * @todoc Make explicit reference when Doxygen can handle operators */ Dual operator+(const Dual& other) const { return Dual(*this)+=other; @@ -129,6 +130,7 @@ template class Dual { * @brief Subtract dual number * * @see operator-=() + * @todoc Make explicit reference when Doxygen can handle operators */ Dual operator-(const Dual& other) const { return Dual(*this)-=other; @@ -213,7 +215,7 @@ template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb @f[ \sqrt{\hat a} = \sqrt{a_0} + \epsilon \frac{a_\epsilon}{2 \sqrt{a_0}} @f] -@see Math::sqrt(const T&) +@see @ref Math::sqrt(const T&) */ template Dual sqrt(const Dual& dual) { T sqrt0 = std::sqrt(dual.real()); diff --git a/src/Magnum/Math/DualComplex.h b/src/Magnum/Math/DualComplex.h index d5109510a..0b5ba54f8 100644 --- a/src/Magnum/Math/DualComplex.h +++ b/src/Magnum/Math/DualComplex.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::DualComplex + * @brief Class @ref Magnum::Math::DualComplex */ #include "Magnum/Math/Complex.h" @@ -41,7 +41,8 @@ namespace Magnum { namespace Math { Represents 2D rotation and translation. See @ref transformations for brief introduction. -@see Magnum::DualComplex, Magnum::DualComplexd, Dual, Complex, Matrix3 +@see @ref Magnum::DualComplex, @ref Magnum::DualComplexd, @ref Dual, + @ref Complex, @ref Matrix3 @todo Can this be done similarly as in dual quaternions? It sort of works, but the math beneath is weird. */ @@ -56,8 +57,8 @@ template class DualComplex: public Dual> { * @f[ * \hat c = (cos \theta + i sin \theta) + \epsilon (0 + i0) * @f] - * @see angle(), Complex::rotation(), Matrix3::rotation(), - * DualQuaternion::rotation() + * @see @ref Complex::rotation(), @ref Matrix3::rotation(), + * @ref DualQuaternion::rotation() */ static DualComplex rotation(Rad angle) { return {Complex::rotation(angle), {{}, {}}}; @@ -70,8 +71,11 @@ template class DualComplex: public Dual> { * @f[ * \hat c = (0 + i1) + \epsilon (v_x + iv_y) * @f] - * @see translation() const, Matrix3::translation(const Vector2&), - * DualQuaternion::translation(), Vector2::xAxis(), Vector2::yAxis() + * @see translation() const, + * @ref Matrix3::translation(const Vector2&), + * @ref DualQuaternion::translation(), @ref Vector2::xAxis(), + * @ref Vector2::yAxis() + * @todoc Explicit reference when Doxygen can handle const */ static DualComplex translation(const Vector2& vector) { return {{}, {vector.x(), vector.y()}}; @@ -81,8 +85,8 @@ template class DualComplex: public Dual> { * @brief Create dual complex number from rotation matrix * * Expects that the matrix represents rigid transformation. - * @see toMatrix(), Complex::fromMatrix(), - * Matrix3::isRigidTransformation() + * @see @ref toMatrix(), @ref Complex::fromMatrix(), + * @ref Matrix3::isRigidTransformation() */ static DualComplex fromMatrix(const Matrix3& matrix) { CORRADE_ASSERT(matrix.isRigidTransformation(), @@ -136,7 +140,7 @@ template class DualComplex: public Dual> { * Dual complex number is normalized if its real part has unit length: @f[ * |c_0|^2 = |c_0| = 1 * @f] - * @see Complex::dot(), normalized() + * @see @ref Complex::dot(), @ref normalized() * @todoc Improve the equation as in Complex::isNormalized() */ bool isNormalized() const { @@ -146,7 +150,7 @@ template class DualComplex: public Dual> { /** * @brief Rotation part of dual complex number * - * @see Complex::angle() + * @see @ref Complex::angle() */ constexpr Complex rotation() const { return Dual>::real(); @@ -158,7 +162,7 @@ template class DualComplex: public Dual> { * @f[ * \boldsymbol a = (c_\epsilon c_0^*) * @f] - * @see translation(const Vector2&) + * @see @ref translation(const Vector2&) */ Vector2 translation() const { return Vector2(Dual>::dual()); @@ -167,7 +171,7 @@ template class DualComplex: public Dual> { /** * @brief Convert dual complex number to transformation matrix * - * @see fromMatrix(), Complex::toMatrix() + * @see @ref fromMatrix(), @ref Complex::toMatrix() */ Matrix3 toMatrix() const { return Matrix3::from(Dual>::real().toMatrix(), translation()); @@ -191,7 +195,8 @@ template class DualComplex: public Dual> { * @f[ * \hat c^* = c^*_0 + c^*_\epsilon * @f] - * @see dualConjugated(), conjugated(), Complex::conjugated() + * @see @ref dualConjugated(), @ref conjugated(), + * @ref Complex::conjugated() */ DualComplex complexConjugated() const { return {Dual>::real().conjugated(), Dual>::dual().conjugated()}; @@ -203,7 +208,8 @@ template class DualComplex: public Dual> { * @f[ * \overline{\hat c} = c_0 - \epsilon c_\epsilon * @f] - * @see complexConjugated(), conjugated(), Dual::conjugated() + * @see @ref complexConjugated(), @ref conjugated(), + * @ref Dual::conjugated() */ DualComplex dualConjugated() const { return Dual>::conjugated(); @@ -215,8 +221,8 @@ template class DualComplex: public Dual> { * Both complex and dual conjugation. @f[ * \overline{\hat c^*} = c^*_0 - \epsilon c^*_\epsilon = c^*_0 + \epsilon(-a_\epsilon + ib_\epsilon) * @f] - * @see complexConjugated(), dualConjugated(), Complex::conjugated(), - * Dual::conjugated() + * @see @ref complexConjugated(), @ref dualConjugated(), + * @ref Complex::conjugated(), @ref Dual::conjugated() */ DualComplex conjugated() const { return {Dual>::real().conjugated(), {-Dual>::dual().real(), Dual>::dual().imaginary()}}; @@ -254,7 +260,7 @@ template class DualComplex: public Dual> { * @f[ * c' = \frac{c_0}{|c_0|} * @f] - * @see isNormalized() + * @see @ref isNormalized() * @todo can this be done similarly to dual quaternions? */ DualComplex normalized() const { @@ -280,7 +286,7 @@ template class DualComplex: public Dual> { * Expects that the complex number is normalized. @f[ * \hat c^{-1} = c_0^{-1} - \epsilon c_\epsilon = c_0^* - \epsilon c_\epsilon * @f] - * @see isNormalized(), inverted() + * @see @ref isNormalized(), @ref inverted() * @todo can this be done similarly to dual quaternions? */ DualComplex invertedNormalized() const { @@ -294,8 +300,9 @@ template class DualComplex: public Dual> { * complex number. @f[ * v' = \hat c v = \hat c ((0 + i) + \epsilon(v_x + iv_y)) * @f] - * @see DualComplex(const Vector2&), dual(), Matrix3::transformPoint(), - * Complex::transformVector(), DualQuaternion::transformPoint() + * @see @ref DualComplex(const Vector2&), @ref dual(), + * @ref Matrix3::transformPoint(), @ref Complex::transformVector(), + * @ref DualQuaternion::transformPoint() */ Vector2 transformPoint(const Vector2& vector) const { return Vector2(((*this)*DualComplex(vector)).dual()); diff --git a/src/Magnum/Math/DualQuaternion.h b/src/Magnum/Math/DualQuaternion.h index 020459421..8c086ffa3 100644 --- a/src/Magnum/Math/DualQuaternion.h +++ b/src/Magnum/Math/DualQuaternion.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::DualQuaternion + * @brief Class @ref Magnum::Math::DualQuaternion */ #include "Magnum/Math/Dual.h" @@ -41,7 +41,8 @@ namespace Magnum { namespace Math { Represents 3D rotation and translation. See @ref transformations for brief introduction. -@see Magnum::DualQuaternion, Magnum::DualQuaterniond, Dual, Quaternion, Matrix4 +@see @ref Magnum::DualQuaternion, @ref Magnum::DualQuaterniond, @ref Dual, + @ref Quaternion, @ref Matrix4 */ template class DualQuaternion: public Dual> { public: @@ -55,9 +56,11 @@ template class DualQuaternion: public Dual> { * Expects that the rotation axis is normalized. @f[ * \hat q = [\boldsymbol a \cdot sin \frac \theta 2, cos \frac \theta 2] + \epsilon [\boldsymbol 0, 0] * @f] - * @see rotation() const, Quaternion::rotation(), Matrix4::rotation(), - * DualComplex::rotation(), Vector3::xAxis(), Vector3::yAxis(), - * Vector3::zAxis(), Vector::isNormalized() + * @see rotation() const, @ref Quaternion::rotation(), + * @ref Matrix4::rotation(), @ref DualComplex::rotation(), + * @ref Vector3::xAxis(), @ref Vector3::yAxis(), + * @ref Vector3::zAxis(), @ref Vector::isNormalized() + * @todoc Explicit reference when Doxygen can handle const */ static DualQuaternion rotation(Rad angle, const Vector3& normalizedAxis) { return {Quaternion::rotation(angle, normalizedAxis), {{}, T(0)}}; @@ -72,9 +75,11 @@ template class DualQuaternion: public Dual> { * @f[ * \hat q = [\boldsymbol 0, 1] + \epsilon [\frac{\boldsymbol v}{2}, 0] * @f] - * @see translation() const, Matrix4::translation(const Vector3&), - * DualComplex::translation(), Vector3::xAxis(), Vector3::yAxis(), - * Vector3::zAxis() + * @see translation() const, + * @ref Matrix4::translation(const Vector3&), + * @ref DualComplex::translation(), @ref Vector3::xAxis(), + * @ref Vector3::yAxis(), @ref Vector3::zAxis() + * @todoc Explicit reference when Doxygen can handle const */ static DualQuaternion translation(const Vector3& vector) { return {{}, {vector/T(2), T(0)}}; @@ -84,8 +89,8 @@ template class DualQuaternion: public Dual> { * @brief Create dual quaternion from transformation matrix * * Expects that the matrix represents rigid transformation. - * @see toMatrix(), Quaternion::fromMatrix(), - * Matrix4::isRigidTransformation() + * @see @ref toMatrix(), @ref Quaternion::fromMatrix(), + * @ref Matrix4::isRigidTransformation() */ static DualQuaternion fromMatrix(const Matrix4& matrix) { CORRADE_ASSERT(matrix.isRigidTransformation(), @@ -124,7 +129,7 @@ template class DualQuaternion: public Dual> { * To be used in transformations later. @f[ * \hat q = [\boldsymbol 0, 1] + \epsilon [\boldsymbol v, 0] * @f] - * @see transformPointNormalized() + * @see @ref transformPointNormalized() * @todoc Remove workaround when Doxygen is predictable */ #ifdef DOXYGEN_GENERATING_OUTPUT @@ -142,7 +147,7 @@ template class DualQuaternion: public Dual> { * Dual quaternion is normalized if it has unit length: @f[ * |\hat q|^2 = |\hat q| = 1 + \epsilon 0 * @f] - * @see lengthSquared(), normalized() + * @see @ref lengthSquared(), @ref normalized() * @todoc Improve the equation as in Quaternion::isNormalized() */ bool isNormalized() const { @@ -156,7 +161,7 @@ template class DualQuaternion: public Dual> { /** * @brief Rotation part of unit dual quaternion * - * @see Quaternion::angle(), Quaternion::axis() + * @see @ref Quaternion::angle(), @ref Quaternion::axis() */ constexpr Quaternion rotation() const { return Dual>::real(); @@ -168,7 +173,7 @@ template class DualQuaternion: public Dual> { * @f[ * \boldsymbol a = 2 (q_\epsilon q_0^*)_V * @f] - * @see translation(const Vector3&) + * @see @ref translation(const Vector3&) */ Vector3 translation() const { return (Dual>::dual()*Dual>::real().conjugated()).vector()*T(2); @@ -177,7 +182,7 @@ template class DualQuaternion: public Dual> { /** * @brief Convert dual quaternion to transformation matrix * - * @see fromMatrix(), Quaternion::toMatrix() + * @see @ref fromMatrix(), @ref Quaternion::toMatrix() */ Matrix4 toMatrix() const { return Matrix4::from(Dual>::real().toMatrix(), translation()); @@ -189,7 +194,8 @@ template class DualQuaternion: public Dual> { * @f[ * \hat q^* = q_0^* + q_\epsilon^* * @f] - * @see dualConjugated(), conjugated(), Quaternion::conjugated() + * @see @ref dualConjugated(), @ref conjugated(), + * @ref Quaternion::conjugated() */ DualQuaternion quaternionConjugated() const { return {Dual>::real().conjugated(), Dual>::dual().conjugated()}; @@ -201,7 +207,8 @@ template class DualQuaternion: public Dual> { * @f[ * \overline{\hat q} = q_0 - \epsilon q_\epsilon * @f] - * @see quaternionConjugated(), conjugated(), Dual::conjugated() + * @see @ref quaternionConjugated(), @ref conjugated(), + * @ref Dual::conjugated() */ DualQuaternion dualConjugated() const { return Dual>::conjugated(); @@ -213,8 +220,8 @@ template class DualQuaternion: public Dual> { * Both quaternion and dual conjugation. @f[ * \overline{\hat q^*} = q_0^* - \epsilon q_\epsilon^* = q_0^* + \epsilon [\boldsymbol q_{V \epsilon}, -q_{S \epsilon}] * @f] - * @see quaternionConjugated(), dualConjugated(), Quaternion::conjugated(), - * Dual::conjugated() + * @see @ref quaternionConjugated(), @ref dualConjugated(), + * @ref Quaternion::conjugated(), @ref Dual::conjugated() */ DualQuaternion conjugated() const { return {Dual>::real().conjugated(), {Dual>::dual().vector(), -Dual>::dual().scalar()}}; @@ -223,8 +230,9 @@ template class DualQuaternion: public Dual> { /** * @brief %Dual quaternion length squared * - * Should be used instead of length() for comparing dual quaternion - * length with other values, because it doesn't compute the square root. @f[ + * Should be used instead of @ref length() for comparing dual + * quaternion length with other values, because it doesn't compute the + * square root. @f[ * |\hat q|^2 = \sqrt{\hat q^* \hat q}^2 = q_0 \cdot q_0 + \epsilon 2 (q_0 \cdot q_\epsilon) * @f] */ @@ -235,7 +243,7 @@ template class DualQuaternion: public Dual> { /** * @brief %Dual quaternion length * - * See lengthSquared() which is faster for comparing length with other + * See @ref lengthSquared() which is faster for comparing length with other * values. @f[ * |\hat q| = \sqrt{\hat q^* \hat q} = |q_0| + \epsilon \frac{q_0 \cdot q_\epsilon}{|q_0|} * @f] @@ -247,7 +255,7 @@ template class DualQuaternion: public Dual> { /** * @brief Normalized dual quaternion (of unit length) * - * @see isNormalized() + * @see @ref isNormalized() */ DualQuaternion normalized() const { return (*this)/length(); @@ -256,7 +264,7 @@ template class DualQuaternion: public Dual> { /** * @brief Inverted dual quaternion * - * See invertedNormalized() which is faster for normalized dual + * See @ref invertedNormalized() which is faster for normalized dual * quaternions. @f[ * \hat q^{-1} = \frac{\hat q^*}{|\hat q|^2} * @f] @@ -268,11 +276,11 @@ template class DualQuaternion: public Dual> { /** * @brief Inverted normalized dual quaternion * - * Equivalent to quaternionConjugated(). Expects that the quaternion is - * normalized. @f[ + * Equivalent to @ref quaternionConjugated(). Expects that the + * quaternion is normalized. @f[ * \hat q^{-1} = \frac{\hat q^*}{|\hat q|^2} = \hat q^* * @f] - * @see isNormalized(), inverted() + * @see @ref isNormalized(), @ref inverted() */ DualQuaternion invertedNormalized() const { CORRADE_ASSERT(isNormalized(), @@ -283,12 +291,14 @@ template class DualQuaternion: public Dual> { /** * @brief Rotate and translate point with dual quaternion * - * See transformPointNormalized(), which is faster for normalized dual - * quaternions. @f[ + * See @ref transformPointNormalized(), which is faster for normalized + * dual quaternions. @f[ * v' = \hat q v \overline{\hat q^{-1}} = \hat q ([\boldsymbol 0, 1] + \epsilon [\boldsymbol v, 0]) \overline{\hat q^{-1}} * @f] - * @see DualQuaternion(const Vector3&), dual(), Matrix4::transformPoint(), - * Quaternion::transformVector(), DualComplex::transformPoint() + * @see @ref DualQuaternion(const Vector3&), @ref dual(), + * @ref Matrix4::transformPoint(), + * @ref Quaternion::transformVector(), + * @ref DualComplex::transformPoint() */ Vector3 transformPoint(const Vector3& vector) const { return ((*this)*DualQuaternion(vector)*inverted().dualConjugated()).dual().vector(); @@ -297,13 +307,14 @@ template class DualQuaternion: public Dual> { /** * @brief Rotate and translate point with normalized dual quaternion * - * Faster alternative to transformPoint(), expects that the dual + * Faster alternative to @ref transformPoint(), expects that the dual * quaternion is normalized. @f[ * v' = \hat q v \overline{\hat q^{-1}} = \hat q v \overline{\hat q^*} = \hat q ([\boldsymbol 0, 1] + \epsilon [\boldsymbol v, 0]) \overline{\hat q^*} * @f] - * @see isNormalized(), DualQuaternion(const Vector3&), dual(), - * Matrix4::transformPoint(), Quaternion::transformVectorNormalized(), - * DualComplex::transformPointNormalized() + * @see @ref isNormalized(), @ref DualQuaternion(const Vector3&), + * @ref dual(), @ref Matrix4::transformPoint(), + * @ref Quaternion::transformVectorNormalized(), + * @ref DualComplex::transformPoint() */ Vector3 transformPointNormalized(const Vector3& vector) const { CORRADE_ASSERT(isNormalized(), diff --git a/src/Magnum/Math/Functions.h b/src/Magnum/Math/Functions.h index a1a42d060..94d89f6b5 100644 --- a/src/Magnum/Math/Functions.h +++ b/src/Magnum/Math/Functions.h @@ -67,7 +67,7 @@ template constexpr T pow(T base) { * @brief Base-2 integral logarithm * * Returns integral logarithm of given number with base `2`. - * @see log() + * @see @ref log() */ UnsignedInt MAGNUM_EXPORT log2(UnsignedInt number); @@ -75,7 +75,7 @@ UnsignedInt MAGNUM_EXPORT log2(UnsignedInt number); * @brief Integral logarithm * * Returns integral logarithm of given number with given base. - * @see log2() + * @see @ref log2() */ UnsignedInt MAGNUM_EXPORT log(UnsignedInt base, UnsignedInt number); @@ -289,7 +289,7 @@ template Vector ceil(const Vector& /** @brief Square root -@see sqrtInverted(), Vector::length() +@see @ref sqrtInverted(), @ref Vector::length() */ #ifdef DOXYGEN_GENERATING_OUTPUT template inline T sqrt(const T& a); @@ -308,7 +308,7 @@ template Vector sqrt(const Vector& /** @brief Inverse square root -@see sqrt(), Vector::lengthInverted() +@see @ref sqrt(), @ref Vector::lengthInverted() */ #ifdef DOXYGEN_GENERATING_OUTPUT template inline T sqrtInverted(const T& a); @@ -326,7 +326,7 @@ template Vector sqrtInverted(const Vector inline T clamp(const T& value, U min, U max); @@ -351,7 +351,7 @@ template Vector clamp(const Vector& The interpolation for vectors is done as in following, similarly for scalars: @f[ \boldsymbol v_{LERP} = (1 - t) \boldsymbol v_A + t \boldsymbol v_B @f] -@see lerpInverted(), Quaternion::lerp() +@see @ref lerpInverted(), @ref Quaternion::lerp() @todo http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ (when SIMD is in place) */ @@ -375,7 +375,7 @@ template inline Vector lerp(const V Returns interpolation phase *t*: @f[ t = \frac{\boldsymbol v_{LERP} - \boldsymbol v_A}{\boldsymbol v_B - \boldsymbol v_A} @f] -@see lerp() +@see @ref lerp() */ #ifdef DOXYGEN_GENERATING_OUTPUT template inline T lerpInverted(const T& a, const T& b, const T& lerp); diff --git a/src/Magnum/Math/Geometry/Distance.h b/src/Magnum/Math/Geometry/Distance.h index 8a4b23791..69254294b 100644 --- a/src/Magnum/Math/Geometry/Distance.h +++ b/src/Magnum/Math/Geometry/Distance.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Geometry::Distance + * @brief Class @ref Magnum::Math::Geometry::Distance */ #include "Magnum/Math/Functions.h" @@ -50,7 +50,7 @@ class Distance { * d = \frac{|(\boldsymbol b - \boldsymbol a)_\bot \cdot (\boldsymbol a - \boldsymbol p)|} {|\boldsymbol b - \boldsymbol a|} * @f] * Source: http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html - * @see linePointSquared(const Vector2&, const Vector2&, const Vector2&) + * @see @ref linePointSquared(const Vector2&, const Vector2&, const Vector2&) */ template static T linePoint(const Vector2& a, const Vector2& b, const Vector2& point) { const Vector2 bMinusA = b - a; @@ -63,7 +63,8 @@ class Distance { * @param b Second point of the line * @param point Point * - * More efficient than linePoint(const Vector2&, const Vector2&, const Vector2&) + * More efficient than + * @ref linePoint(const Vector2&, const Vector2&, const Vector2&) * for comparing distance with other values, because it doesn't * compute the square root. */ @@ -84,7 +85,7 @@ class Distance { * {|\boldsymbol b - \boldsymbol a|} * @f] * Source: http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html - * @see linePointSquared(const Vector3&, const Vector3&, const Vector3&) + * @see @ref linePointSquared(const Vector3&, const Vector3&, const Vector3&) */ template static T linePoint(const Vector3& a, const Vector3& b, const Vector3& point) { return std::sqrt(linePointSquared(a, b, point)); @@ -93,7 +94,7 @@ class Distance { /** * @brief %Distance of line and point in 3D, squared * - * More efficient than linePoint(const Vector3&, const Vector3&, const Vector3&) + * More efficient than @ref linePoint(const Vector3&, const Vector3&, const Vector3&) * for comparing distance with other values, because it doesn't * compute the square root. */ @@ -121,19 +122,19 @@ class Distance { * @f] * The last alternative is when the following equation applies. The * point then lies between **a** and **b** and the distance is - * computed the same way as in linePoint(). @f[ + * computed the same way as in @ref linePoint(). @f[ * |\boldsymbol b - \boldsymbol a|^2 > |\boldsymbol p - \boldsymbol a|^2 + |\boldsymbol p - \boldsymbol b|^2 * @f] * - * @see lineSegmentPointSquared() + * @see @ref lineSegmentPointSquared() */ template static T lineSegmentPoint(const Vector2& a, const Vector2& b, const Vector2& point); /** * @brief %Distance of point from line segment in 2D, squared * - * More efficient than lineSegmentPoint() for comparing distance with - * other values, because it doesn't compute the square root. + * More efficient than @ref lineSegmentPoint() for comparing distance + * with other values, because it doesn't compute the square root. */ template static T lineSegmentPointSquared(const Vector2& a, const Vector2& b, const Vector2& point); @@ -144,9 +145,9 @@ class Distance { * @param point Point * * Similar to 2D implementation - * lineSegmentPoint(const Vector2&, const Vector2&, const Vector2&). + * @ref lineSegmentPoint(const Vector2&, const Vector2&, const Vector2&). * - * @see lineSegmentPointSquared(const Vector3&, const Vector3&, const Vector3&) + * @see @ref lineSegmentPointSquared(const Vector3&, const Vector3&, const Vector3&) */ template static T lineSegmentPoint(const Vector3& a, const Vector3& b, const Vector3& point) { return std::sqrt(lineSegmentPointSquared(a, b, point)); @@ -155,8 +156,10 @@ class Distance { /** * @brief %Distance of point from line segment in 3D, squared * - * More efficient than lineSegmentPoint(const Vector3&, const Vector3&, const Vector3&) for comparing distance with - * other values, because it doesn't compute the square root. + * More efficient than + * @ref lineSegmentPoint(const Vector3&, const Vector3&, const Vector3&) + * for comparing distance with other values, because it doesn't compute + * the square root. */ template static T lineSegmentPointSquared(const Vector3& a, const Vector3& b, const Vector3& point); }; diff --git a/src/Magnum/Math/Geometry/Intersection.h b/src/Magnum/Math/Geometry/Intersection.h index 550d4462a..fc06ec9cd 100644 --- a/src/Magnum/Math/Geometry/Intersection.h +++ b/src/Magnum/Math/Geometry/Intersection.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Geometry::Intersection + * @brief Class @ref Magnum::Math::Geometry::Intersection */ #include "Magnum/Math/Vector3.h" @@ -66,7 +66,7 @@ class Intersection { * \end{array} * @f] * - * See also lineSegmentLine() which computes only **t**, which is + * See also @ref lineSegmentLine() which computes only **t**, which is * useful if you don't need to test that the intersection lies inside * line segment defined by `q` and `q + s`. */ @@ -89,7 +89,7 @@ class Intersection { * value is in range @f$ [ 0 ; 1 ] @f$, the intersection is inside * the line segment defined by `p` and `p + r`. * - * Unlike lineSegmentLineSegment() computes only **t**. + * Unlike @ref lineSegmentLineSegment() computes only **t**. */ template static T lineSegmentLine(const Vector2& p, const Vector2& r, const Vector2& q, const Vector2& s) { return Vector2::cross(q - p, s)/Vector2::cross(r, s); diff --git a/src/Magnum/Math/Math.h b/src/Magnum/Math/Math.h index 56e9a2bd3..a9acb5c95 100644 --- a/src/Magnum/Math/Math.h +++ b/src/Magnum/Math/Math.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Forward declarations for Magnum::Math namespace + * @brief Forward declarations for @ref Magnum::Math namespace */ #include diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index d01e2371c..0b088714e 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Matrix + * @brief Class @ref Magnum::Math::Matrix, typedef @ref Magnum::Math::Matrix2x2, @ref Magnum::Math::Matrix3x3, @ref Magnum::Math::Matrix4x4 */ #include "Magnum/Math/RectangularMatrix.h" @@ -57,7 +57,7 @@ template class Matrix: public RectangularMatrix class Matrix: public RectangularMatrix(typename Implementation::GenerateSequence::Type(), @@ -113,8 +113,9 @@ template class Matrix: public RectangularMatrix class Matrix: public RectangularMatrix inverted() const; /** * @brief Inverted orthogonal matrix * - * Equivalent to transposed(), expects that the matrix is orthogonal. @f[ + * Equivalent to @ref transposed(), expects that the matrix is + * orthogonal. @f[ * A^{-1} = A^T * @f] - * @see inverted(), isOrthogonal(), Matrix3::invertedRigid(), - * Matrix4::invertedRigid() + * @see @ref inverted(), @ref isOrthogonal(), + * @ref Matrix3::invertedRigid(), + * @ref Matrix4::invertedRigid() */ Matrix invertedOrthogonal() const { CORRADE_ASSERT(isOrthogonal(), diff --git a/src/Magnum/Math/Matrix3.h b/src/Magnum/Math/Matrix3.h index eac1ce9b3..2fabe56be 100644 --- a/src/Magnum/Math/Matrix3.h +++ b/src/Magnum/Math/Matrix3.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Matrix3 + * @brief Class @ref Magnum::Math::Matrix3 */ #include "Magnum/Math/Matrix.h" @@ -40,8 +40,8 @@ namespace Magnum { namespace Math { Represents 2D transformation. See @ref matrix-vector and @ref transformations for brief introduction. -@see Magnum::Matrix3, Magnum::Matrix3d, DualComplex, - SceneGraph::MatrixTransformation2D +@see @ref Magnum::Matrix3, @ref Magnum::Matrix3d, @ref DualComplex, + @ref SceneGraph::MatrixTransformation2D @configurationvalueref{Magnum::Math::Matrix3} */ template class Matrix3: public Matrix<3, T> { @@ -50,9 +50,10 @@ template class Matrix3: public Matrix<3, T> { * @brief 2D translation matrix * @param vector Translation vector * - * @see translation(), DualComplex::translation(), - * Matrix4::translation(const Vector3&), Vector2::xAxis(), - * Vector2::yAxis() + * @see translation() const, @ref DualComplex::translation(), + * @ref Matrix4::translation(const Vector3&), + * @ref Vector2::xAxis(), @ref Vector2::yAxis() + * @todoc Explicit reference when Doxygen can handle const */ constexpr static Matrix3 translation(const Vector2& vector) { return {{ T(1), T(0), T(0)}, @@ -64,8 +65,9 @@ template class Matrix3: public Matrix<3, T> { * @brief 2D scaling matrix * @param vector Scaling vector * - * @see rotationScaling() const, Matrix4::scaling(const Vector3&), - * Vector2::xScale(), Vector2::yScale() + * @see @ref rotationScaling(), + * @ref Matrix4::scaling(const Vector3&), + * @ref Vector2::xScale(), @ref Vector2::yScale() */ constexpr static Matrix3 scaling(const Vector2& vector) { return {{vector.x(), T(0), T(0)}, @@ -77,8 +79,10 @@ template class Matrix3: public Matrix<3, T> { * @brief 2D rotation matrix * @param angle Rotation angle (counterclockwise) * - * @see rotation() const, Complex::rotation(), DualComplex::rotation(), - * Matrix4::rotation(Rad, const Vector3&) + * @see rotation() const, @ref Complex::rotation(), + * @ref DualComplex::rotation(), + * @ref Matrix4::rotation(Rad, const Vector3&) + * @todoc Explicit reference when Doxygen can handle const */ static Matrix3 rotation(Rad angle); @@ -87,7 +91,7 @@ template class Matrix3: public Matrix<3, T> { * @param normal Normal of the line through which to reflect * * Expects that the normal is normalized. - * @see Matrix4::reflection(), Vector::isNormalized() + * @see @ref Matrix4::reflection(), @ref Vector::isNormalized() */ static Matrix3 reflection(const Vector2& normal) { CORRADE_ASSERT(normal.isNormalized(), @@ -99,7 +103,8 @@ template class Matrix3: public Matrix<3, T> { * @brief 2D projection matrix * @param size Size of the view * - * @see Matrix4::orthographicProjection(), Matrix4::perspectiveProjection() + * @see @ref Matrix4::orthographicProjection(), + * @ref Matrix4::perspectiveProjection() */ static Matrix3 projection(const Vector2& size) { return scaling(2.0f/size); @@ -112,7 +117,8 @@ template class Matrix3: public Matrix<3, T> { * @param translation Translation part (first two elements of * third column) * - * @see rotationScaling() const, translation() const + * @see @ref rotationScaling(), translation() const + * @todoc Explicit reference when Doxygen can handle const */ constexpr static Matrix3 from(const Matrix<2, T>& rotationScaling, const Vector2& translation) { return {{rotationScaling[0], T(0)}, @@ -127,8 +133,8 @@ template class Matrix3: public Matrix<3, T> { * @brief Default constructor * * Creates identity matrix. You can also explicitly call this - * constructor with `Matrix3 m(Matrix3::Identity);`. Optional parameter - * @p value allows you to specify value on diagonal. + * constructor with `%Matrix3 m(Matrix3::Identity);`. Optional + * parameter @p value allows you to specify value on diagonal. */ constexpr /*implicit*/ Matrix3(typename Matrix<3, T>::IdentityType = (Matrix<3, T>::Identity), T value = T(1)): Matrix<3, T>(Matrix<3, T>::Identity, value) {} @@ -149,7 +155,7 @@ template class Matrix3: public Matrix<3, T> { * * Rigid transformation consists only of rotation and translation (i.e. * no scaling or projection). - * @see isOrthogonal() + * @see @ref isOrthogonal() */ bool isRigidTransformation() const { return rotationScaling().isOrthogonal() && row(2) == Vector3(T(0), T(0), T(1)); @@ -159,9 +165,11 @@ template class Matrix3: public Matrix<3, T> { * @brief 2D rotation and scaling part of the matrix * * Upper-left 2x2 part of the matrix. - * @see from(const Matrix<2, T>&, const Vector2&), rotation() const - * rotationNormalized(), @ref uniformScaling(), rotation(T), - * Matrix4::rotationScaling() const + * @see @ref from(const Matrix<2, T>&, const Vector2&), + * rotation() const, @ref rotationNormalized(), + * @ref uniformScaling(), @ref rotation(Rad), + * @ref Matrix4::rotationScaling() + * @todoc Explicit reference when Doxygen can handle const */ constexpr Matrix<2, T> rotationScaling() const { return {(*this)[0].xy(), @@ -176,6 +184,7 @@ template class Matrix3: public Matrix<3, T> { * @see rotation() const, @ref uniformScaling(), * @ref Matrix4::rotationNormalized() * @todo assert also orthogonality or this is good enough? + * @todoc Explicit reference when Doxygen can handle const */ Matrix<2, T> rotationNormalized() const { CORRADE_ASSERT((*this)[0].xy().isNormalized() && (*this)[1].xy().isNormalized(), @@ -189,8 +198,10 @@ template class Matrix3: public Matrix<3, T> { * * Normalized upper-left 2x2 part of the matrix. Expects uniform * scaling. - * @see rotationNormalized(), rotationScaling(), @ref uniformScaling(), - * rotation(T), Matrix4::rotation() const + * @see @ref rotationNormalized(), @ref rotationScaling(), + * @ref uniformScaling(), @ref rotation(Rad), + * Matrix4::rotation() const + * @todoc Explicit reference when Doxygen can handle const */ Matrix<2, T> rotation() const { CORRADE_ASSERT(TypeTraits::equals((*this)[0].xy().dot(), (*this)[1].xy().dot()), @@ -206,9 +217,10 @@ template class Matrix3: public Matrix<3, T> { * Expects that the scaling is the same in all axes. Faster alternative * to @ref uniformScaling(), because it doesn't compute the square * root. - * @see @ref rotationScaling(), @ref rotation(), + * @see @ref rotationScaling(), rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector2&), * @ref Matrix4::uniformScaling() + * @todoc Explicit reference when Doxygen can handle const */ T uniformScalingSquared() const { const T scalingSquared = (*this)[0].xy().dot(); @@ -223,9 +235,10 @@ template class Matrix3: public Matrix<3, T> { * Length of vectors in upper-left 2x2 part of the matrix. Expects that * the scaling is the same in all axes. Use faster alternative * @ref uniformScalingSquared() where possible. - * @see @ref rotationScaling(), @ref rotation(), + * @see @ref rotationScaling(), rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector2&), * @ref Matrix4::uniformScaling() + * @todoc Explicit reference when Doxygen can handle const */ T uniformScaling() const { return std::sqrt(uniformScalingSquared()); } @@ -233,7 +246,7 @@ template class Matrix3: public Matrix<3, T> { * @brief Right-pointing 2D vector * * First two elements of first column. - * @see up(), Vector2::xAxis(), Matrix4::right() + * @see @ref up(), @ref Vector2::xAxis(), @ref Matrix4::right() */ Vector2& right() { return (*this)[0].xy(); } constexpr Vector2 right() const { return (*this)[0].xy(); } /**< @overload */ @@ -242,7 +255,7 @@ template class Matrix3: public Matrix<3, T> { * @brief Up-pointing 2D vector * * First two elements of second column. - * @see right(), Vector2::yAxis(), Matrix4::up() + * @see @ref right(), @ref Vector2::yAxis(), @ref Matrix4::up() */ Vector2& up() { return (*this)[1].xy(); } constexpr Vector2 up() const { return (*this)[1].xy(); } /**< @overload */ @@ -251,8 +264,9 @@ template class Matrix3: public Matrix<3, T> { * @brief 2D translation part of the matrix * * First two elements of third column. - * @see from(const Matrix<2, T>&, const Vector2&), - * translation(const Vector2&), Matrix4::translation() + * @see @ref from(const Matrix<2, T>&, const Vector2&), + * @ref translation(const Vector2&), + * @ref Matrix4::translation() */ Vector2& translation() { return (*this)[2].xy(); } constexpr Vector2 translation() const { return (*this)[2].xy(); } /**< @overload */ @@ -261,20 +275,22 @@ template class Matrix3: public Matrix<3, T> { * @brief Inverted rigid transformation matrix * * Expects that the matrix represents rigid transformation. - * Significantly faster than the general algorithm in inverted(). - * @see isRigidTransformation(), invertedOrthogonal(), - * rotationScaling() const, translation() const + * Significantly faster than the general algorithm in @ref inverted(). + * @see @ref isRigidTransformation(), @ref invertedOrthogonal(), + * @ref rotationScaling(), translation() const + * @todoc Explicit reference when Doxygen can handle const */ Matrix3 invertedRigid() const; /** * @brief Transform 2D vector with the matrix * - * Unlike in transformPoint(), translation is not involved in the + * Unlike in @ref transformPoint(), translation is not involved in the * transformation. @f[ * \boldsymbol v' = \boldsymbol M \begin{pmatrix} v_x \\ v_y \\ 0 \end{pmatrix} * @f] - * @see Complex::transformVector(), Matrix4::transformVector() + * @see @ref Complex::transformVector(), + * @ref Matrix4::transformVector() * @todo extract 2x2 matrix and multiply directly? (benchmark that) */ Vector2 transformVector(const Vector2& vector) const { @@ -284,11 +300,12 @@ template class Matrix3: public Matrix<3, T> { /** * @brief Transform 2D point with the matrix * - * Unlike in transformVector(), translation is also involved in the - * transformation. @f[ + * Unlike in @ref transformVector(), translation is also involved in + * the transformation. @f[ * \boldsymbol v' = \boldsymbol M \begin{pmatrix} v_x \\ v_y \\ 1 \end{pmatrix} * @f] - * @see DualComplex::transformPoint(), Matrix4::transformPoint() + * @see @ref DualComplex::transformPoint(), + * @ref Matrix4::transformPoint() */ Vector2 transformPoint(const Vector2& vector) const { return ((*this)*Vector3(vector, T(1))).xy(); diff --git a/src/Magnum/Math/Matrix4.h b/src/Magnum/Math/Matrix4.h index f2564d0f4..05c666482 100644 --- a/src/Magnum/Math/Matrix4.h +++ b/src/Magnum/Math/Matrix4.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Matrix4 + * @brief Class @ref Magnum::Math::Matrix4 */ #include "Magnum/Math/Matrix.h" @@ -45,8 +45,8 @@ namespace Magnum { namespace Math { Represents 3D transformation. See @ref matrix-vector and @ref transformations for brief introduction. -@see Magnum::Matrix4, Magnum::Matrix4d, DualQuaternion, - SceneGraph::MatrixTransformation3D +@see @ref Magnum::Matrix4, @ref Magnum::Matrix4d, @ref DualQuaternion, + @ref SceneGraph::MatrixTransformation3D @configurationvalueref{Magnum::Math::Matrix4} */ template class Matrix4: public Matrix<4, T> { @@ -55,9 +55,10 @@ template class Matrix4: public Matrix<4, T> { * @brief 3D translation * @param vector Translation vector * - * @see translation(), DualQuaternion::translation(), - * Matrix3::translation(const Vector2&), Vector3::xAxis(), - * Vector3::yAxis(), Vector3::zAxis() + * @see @ref translation(), @ref DualQuaternion::translation(), + * @ref Matrix3::translation(const Vector2&), + * @ref Vector3::xAxis(), @ref Vector3::yAxis(), + * @ref Vector3::zAxis() */ constexpr static Matrix4 translation(const Vector3& vector) { return {{ T(1), T(0), T(0), T(0)}, @@ -70,8 +71,10 @@ template class Matrix4: public Matrix<4, T> { * @brief 3D scaling * @param vector Scaling vector * - * @see rotationScaling() const, Matrix3::scaling(const Vector2&), - * Vector3::xScale(), Vector3::yScale(), Vector3::zScale() + * @see @ref rotationScaling(), + * @ref Matrix3::scaling(const Vector2&), + * @ref Vector3::xScale(), @ref Vector3::yScale(), + * @ref Vector3::zScale() */ constexpr static Matrix4 scaling(const Vector3& vector) { return {{vector.x(), T(0), T(0), T(0)}, @@ -86,10 +89,13 @@ template class Matrix4: public Matrix<4, T> { * @param normalizedAxis Normalized rotation axis * * Expects that the rotation axis is normalized. If possible, use - * faster alternatives like rotationX(), rotationY() and rotationZ(). - * @see rotation() const, Quaternion::rotation(), DualQuaternion::rotation(), - * Matrix3::rotation(Rad), Vector3::xAxis(), Vector3::yAxis(), - * Vector3::zAxis(), Vector::isNormalized() + * faster alternatives like @ref rotationX(), @ref rotationY() and + * @ref rotationZ(). + * @see rotation() const, @ref Quaternion::rotation(), + * @ref DualQuaternion::rotation(), @ref Matrix3::rotation(Rad), + * @ref Vector3::xAxis(), @ref Vector3::yAxis(), + * @ref Vector3::zAxis(), @ref Vector::isNormalized() + * @todoc Explicit reference when Doxygen can handle const */ static Matrix4 rotation(Rad angle, const Vector3& normalizedAxis); @@ -97,9 +103,11 @@ template class Matrix4: public Matrix<4, T> { * @brief 3D rotation around X axis * @param angle Rotation angle (counterclockwise) * - * Faster than calling `Matrix4::rotation(angle, Vector3::xAxis())`. - * @see rotation(Rad, const Vector3&), rotationY(), rotationZ(), - * rotation() const, Quaternion::rotation(), Matrix3::rotation(Rad) + * Faster than calling `%Matrix4::rotation(angle, %Vector3::xAxis())`. + * @see @ref rotation(Rad, const Vector3&), @ref rotationY(), + * @ref rotationZ(), rotation() const, + * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) + * @todoc Explicit reference when Doxygen can handle const */ static Matrix4 rotationX(Rad angle); @@ -107,9 +115,11 @@ template class Matrix4: public Matrix<4, T> { * @brief 3D rotation around Y axis * @param angle Rotation angle (counterclockwise) * - * Faster than calling `Matrix4::rotation(angle, Vector3::yAxis())`. - * @see rotation(Rad, const Vector3&), rotationX(), rotationZ(), - * rotation() const, Quaternion::rotation(), Matrix3::rotation(Rad) + * Faster than calling `%Matrix4::rotation(angle, %Vector3::yAxis())`. + * @see @ref rotation(Rad, const Vector3&), @ref rotationX(), + * @ref rotationZ(), rotation() const, + * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) + * @todoc Explicit reference when Doxygen can handle const */ static Matrix4 rotationY(Rad angle); @@ -117,9 +127,11 @@ template class Matrix4: public Matrix<4, T> { * @brief 3D rotation matrix around Z axis * @param angle Rotation angle (counterclockwise) * - * Faster than calling `Matrix4::rotation(angle, Vector3::zAxis())`. - * @see rotation(Rad, const Vector3&), rotationX(), rotationY(), - * rotation() const, Quaternion::rotation(), Matrix3::rotation(Rad) + * Faster than calling `%Matrix4::rotation(angle, %Vector3::zAxis())`. + * @see @ref rotation(Rad, const Vector3&), @ref rotationX(), + * @ref rotationY(), rotation() const, + * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) + * @todoc Explicit reference when Doxygen can handle const */ static Matrix4 rotationZ(Rad angle); @@ -128,7 +140,7 @@ template class Matrix4: public Matrix<4, T> { * @param normal Normal of the plane through which to reflect * * Expects that the normal is normalized. - * @see Matrix3::reflection(), Vector::isNormalized() + * @see @ref Matrix3::reflection(), @ref Vector::isNormalized() */ static Matrix4 reflection(const Vector3& normal); @@ -138,7 +150,7 @@ template class Matrix4: public Matrix<4, T> { * @param near Near clipping plane * @param far Far clipping plane * - * @see perspectiveProjection(), Matrix3::projection() + * @see @ref perspectiveProjection(), @ref Matrix3::projection() */ static Matrix4 orthographicProjection(const Vector2& size, T near, T far); @@ -148,7 +160,7 @@ template class Matrix4: public Matrix<4, T> { * @param near Near clipping plane * @param far Far clipping plane * - * @see orthographicProjection(), Matrix3::projection() + * @see @ref orthographicProjection(), @ref Matrix3::projection() */ static Matrix4 perspectiveProjection(const Vector2& size, T near, T far); @@ -159,7 +171,7 @@ template class Matrix4: public Matrix<4, T> { * @param near Near clipping plane * @param far Far clipping plane * - * @see orthographicProjection(), Matrix3::projection() + * @see @ref orthographicProjection(), @ref Matrix3::projection() */ static Matrix4 perspectiveProjection(Rad fov, T aspectRatio, T near, T far) { const T xyScale = 2*std::tan(T(fov)/2)*near; @@ -173,7 +185,8 @@ template class Matrix4: public Matrix<4, T> { * @param translation Translation part (first three elements of * fourth column) * - * @see rotationScaling() const, translation() const + * @see @ref rotationScaling(), translation() const + * @todoc Explicit reference when Doxygen can handle const */ constexpr static Matrix4 from(const Matrix<3, T>& rotationScaling, const Vector3& translation) { return {{rotationScaling[0], T(0)}, @@ -189,8 +202,8 @@ template class Matrix4: public Matrix<4, T> { * @brief Default constructor * * Creates identity matrix. You can also explicitly call this - * constructor with `Matrix4 m(Matrix4::Identity);`. Optional parameter - * @p value allows you to specify value on diagonal. + * constructor with `%Matrix4 m(Matrix4::Identity);`. Optional + * parameter @p value allows you to specify value on diagonal. */ constexpr /*implicit*/ Matrix4(typename Matrix<4, T>::IdentityType = (Matrix<4, T>::Identity), T value = T(1)): Matrix<4, T>(Matrix<4, T>::Identity, value) {} @@ -211,7 +224,7 @@ template class Matrix4: public Matrix<4, T> { * * Rigid transformation consists only of rotation and translation (i.e. * no scaling or projection). - * @see isOrthogonal() + * @see @ref isOrthogonal() */ bool isRigidTransformation() const { return rotationScaling().isOrthogonal() && row(3) == Vector4(T(0), T(0), T(0), T(1)); @@ -221,9 +234,11 @@ template class Matrix4: public Matrix<4, T> { * @brief 3D rotation and scaling part of the matrix * * Upper-left 3x3 part of the matrix. - * @see from(const Matrix<3, T>&, const Vector3&), rotation() const, - * rotationNormalized(), @ref uniformScaling(), - * rotation(T, const Vector3&), Matrix3::rotationScaling() const + * @see @ref from(const Matrix<3, T>&, const Vector3&), + * rotation() const, @ref rotationNormalized(), + * @ref uniformScaling(), @ref rotation(Rad, const Vector3&), + * Matrix3::rotationScaling() const + * @todoc Explicit reference when Doxygen can handle const */ /* Not Matrix3, because it is for affine 2D transformations */ constexpr Matrix<3, T> rotationScaling() const { @@ -240,6 +255,7 @@ template class Matrix4: public Matrix<4, T> { * @see rotation() const, @ref uniformScaling(), * @ref Matrix3::rotationNormalized() * @todo assert also orthogonality or this is good enough? + * @todoc Explicit reference when Doxygen can handle const */ /* Not Matrix3, because it is for affine 2D transformations */ Matrix<3, T> rotationNormalized() const { @@ -255,9 +271,10 @@ template class Matrix4: public Matrix<4, T> { * * Normalized upper-left 3x3 part of the matrix. Expects uniform * scaling. - * @see rotationNormalized(), rotationScaling() const, - * @ref uniformScaling(), rotation(T, const Vector3&), + * @see @ref rotationNormalized(), @ref rotationScaling(), + * @ref uniformScaling(), @ref rotation(Rad, const Vector3&), * Matrix3::rotation() const + * @todoc Explicit reference when Doxygen can handle const */ /* Not Matrix3, because it is for affine 2D transformations */ Matrix<3, T> rotation() const; @@ -269,9 +286,10 @@ template class Matrix4: public Matrix<4, T> { * Expects that the scaling is the same in all axes. Faster alternative * to @ref uniformScaling(), because it doesn't compute the square * root. - * @see @ref rotationScaling(), @ref rotation(), + * @see @ref rotationScaling(), rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector3&), * @ref Matrix3::uniformScaling() + * @todoc Explicit reference when Doxygen can handle const */ T uniformScalingSquared() const; @@ -281,9 +299,10 @@ template class Matrix4: public Matrix<4, T> { * Length of vectors in upper-left 3x3 part of the matrix. Expects that * the scaling is the same in all axes. Use faster alternative * @ref uniformScalingSquared() where possible. - * @see @ref rotationScaling(), @ref rotation(), + * @see @ref rotationScaling(), rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector3&), * @ref Matrix3::uniformScaling() + * @todoc Explicit reference when Doxygen can handle const */ T uniformScaling() const { return std::sqrt(uniformScalingSquared()); } @@ -291,7 +310,8 @@ template class Matrix4: public Matrix<4, T> { * @brief Right-pointing 3D vector * * First three elements of first column. - * @see up(), backward(), Vector3::xAxis(), Matrix3::right() + * @see @ref up(), @ref backward(), @ref Vector3::xAxis(), + * @ref Matrix3::right() */ Vector3& right() { return (*this)[0].xyz(); } constexpr Vector3 right() const { return (*this)[0].xyz(); } /**< @overload */ @@ -300,7 +320,8 @@ template class Matrix4: public Matrix<4, T> { * @brief Up-pointing 3D vector * * First three elements of second column. - * @see right(), backward(), Vector3::yAxis(), Matrix3::up() + * @see @ref right(), @ref backward(), @ref Vector3::yAxis(), + * @ref Matrix3::up() */ Vector3& up() { return (*this)[1].xyz(); } constexpr Vector3 up() const { return (*this)[1].xyz(); } /**< @overload */ @@ -309,7 +330,7 @@ template class Matrix4: public Matrix<4, T> { * @brief Backward-pointing 3D vector * * First three elements of third column. - * @see right(), up(), Vector3::yAxis() + * @see @ref right(), @ref up(), @ref Vector3::yAxis() */ Vector3& backward() { return (*this)[2].xyz(); } constexpr Vector3 backward() const { return (*this)[2].xyz(); } /**< @overload */ @@ -318,8 +339,9 @@ template class Matrix4: public Matrix<4, T> { * @brief 3D translation part of the matrix * * First three elements of fourth column. - * @see from(const Matrix<3, T>&, const Vector3&), - * translation(const Vector3&), Matrix3::translation() + * @see @ref from(const Matrix<3, T>&, const Vector3&), + * @ref translation(const Vector3&), + * @ref Matrix3::translation() */ Vector3& translation() { return (*this)[3].xyz(); } constexpr Vector3 translation() const { return (*this)[3].xyz(); } /**< @overload */ @@ -328,20 +350,22 @@ template class Matrix4: public Matrix<4, T> { * @brief Inverted rigid transformation matrix * * Expects that the matrix represents rigid transformation. - * Significantly faster than the general algorithm in inverted(). - * @see isRigidTransformation(), invertedOrthogonal(), - * rotationScaling() const, translation() const + * Significantly faster than the general algorithm in @ref inverted(). + * @see @ref isRigidTransformation(), @ref invertedOrthogonal(), + * @ref rotationScaling(), translation() const + * @todoc Explicit reference when Doxygen can handle const */ Matrix4 invertedRigid() const; /** * @brief Transform 3D vector with the matrix * - * Unlike in transformVector(), translation is not involved in the + * Unlike in @ref transformVector(), translation is not involved in the * transformation. @f[ * \boldsymbol v' = \boldsymbol M \begin{pmatrix} v_x \\ v_y \\ v_z \\ 0 \end{pmatrix} * @f] - * @see Quaternion::transformVector(), Matrix3::transformVector() + * @see @ref Quaternion::transformVector(), + * @ref Matrix3::transformVector() * @todo extract 3x3 matrix and multiply directly? (benchmark that) */ Vector3 transformVector(const Vector3& vector) const { @@ -351,11 +375,12 @@ template class Matrix4: public Matrix<4, T> { /** * @brief Transform 3D point with the matrix * - * Unlike in transformVector(), translation is also involved in the - * transformation. @f[ + * Unlike in @ref transformVector(), translation is also involved in + * the transformation. @f[ * \boldsymbol v' = \boldsymbol M \begin{pmatrix} v_x \\ v_y \\ v_z \\ 1 \end{pmatrix} * @f] - * @see DualQuaternion::transformPoint(), Matrix3::transformPoint() + * @see @ref DualQuaternion::transformPoint(), + * @ref Matrix3::transformPoint() */ Vector3 transformPoint(const Vector3& vector) const { return ((*this)*Vector4(vector, T(1))).xyz(); diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index f613e1476..035249ec5 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Quaternion + * @brief Class @ref Magnum::Math::Quaternion */ #include @@ -44,11 +44,12 @@ namespace Magnum { namespace Math { @tparam T Underlying data type Represents 3D rotation. See @ref transformations for brief introduction. -@see Magnum::Quaternion, Magnum::Quaterniond, DualQuaternion, Matrix4 +@see @ref Magnum::Quaternion, @ref Magnum::Quaterniond, @ref DualQuaternion, + @ref Matrix4 */ template class Quaternion { public: - typedef T Type; /**< @brief Underlying data type */ + typedef T Type; /**< @brief Underlying data type */ /** * @brief Dot product @@ -57,6 +58,7 @@ template class Quaternion { * p \cdot q = \boldsymbol p_V \cdot \boldsymbol q_V + p_S q_S * @f] * @see dot() const + * @todoc Explicit reference when Doxygen can handle const */ static T dot(const Quaternion& a, const Quaternion& b) { /** @todo Use four-component SIMD implementation when available */ @@ -69,7 +71,8 @@ template class Quaternion { * Expects that both quaternions are normalized. @f[ * \theta = acos \left( \frac{p \cdot q}{|p| |q|} \right) = acos(p \cdot q) * @f] - * @see isNormalized(), Complex::angle(), Vector::angle() + * @see @ref isNormalized(), @ref Complex::angle(), + * @ref Vector::angle() */ static Rad angle(const Quaternion& normalizedA, const Quaternion& normalizedB); @@ -82,7 +85,7 @@ template class Quaternion { * Expects that both quaternions are normalized. @f[ * q_{LERP} = \frac{(1 - t) q_A + t q_B}{|(1 - t) q_A + t q_B|} * @f] - * @see isNormalized(), slerp(), Math::lerp() + * @see @ref isNormalized(), @ref slerp(), @ref Math::lerp() */ static Quaternion lerp(const Quaternion& normalizedA, const Quaternion& normalizedB, T t); @@ -97,7 +100,7 @@ template class Quaternion { * ~~~~~~~~~~ * \theta = acos \left( \frac{q_A \cdot q_B}{|q_A| \cdot |q_B|} \right) = acos(q_A \cdot q_B) * @f] - * @see isNormalized(), lerp() + * @see @ref isNormalized(), @ref lerp() */ static Quaternion slerp(const Quaternion& normalizedA, const Quaternion& normalizedB, T t); @@ -109,9 +112,10 @@ template class Quaternion { * Expects that the rotation axis is normalized. @f[ * q = [\boldsymbol a \cdot sin \frac \theta 2, cos \frac \theta 2] * @f] - * @see angle(), axis(), DualQuaternion::rotation(), - * Matrix4::rotation(), Complex::rotation(), Vector3::xAxis(), - * Vector3::yAxis(), Vector3::zAxis(), Vector::isNormalized() + * @see @ref angle(), @ref axis(), @ref DualQuaternion::rotation(), + * @ref Matrix4::rotation(), @ref Complex::rotation(), + * @ref Vector3::xAxis(), @ref Vector3::yAxis(), + * @ref Vector3::zAxis(), @ref Vector::isNormalized() */ static Quaternion rotation(Rad angle, const Vector3& normalizedAxis); @@ -119,7 +123,8 @@ template class Quaternion { * @brief Create quaternion from rotation matrix * * Expects that the matrix is orthogonal (i.e. pure rotation). - * @see toMatrix(), DualComplex::fromMatrix(), Matrix::isOrthogonal() + * @see @ref toMatrix(), @ref DualComplex::fromMatrix(), + * @ref Matrix::isOrthogonal() */ static Quaternion fromMatrix(const Matrix<3, T>& matrix); @@ -147,7 +152,7 @@ template class Quaternion { * To be used in transformations later. @f[ * q = [\boldsymbol v, 0] * @f] - * @see transformVector(), transformVectorNormalized() + * @see @ref transformVector(), @ref transformVectorNormalized() */ constexpr explicit Quaternion(const Vector3& vector): _vector(vector), _scalar(T(0)) {} @@ -164,10 +169,10 @@ template class Quaternion { /** * @brief Whether the quaternion is normalized * - * Quaternion is normalized if it has unit length: @f[ + * %Quaternion is normalized if it has unit length: @f[ * |q \cdot q - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon * @f] - * @see dot(), normalized() + * @see @ref dot(), @ref normalized() */ bool isNormalized() const { return Implementation::isNormalizedSquared(dot()); @@ -185,7 +190,7 @@ template class Quaternion { * Expects that the quaternion is normalized. @f[ * \theta = 2 \cdot acos q_S * @f] - * @see isNormalized(), axis(), rotation() + * @see @ref isNormalized(), @ref axis(), @ref rotation() */ Rad angle() const; @@ -197,15 +202,15 @@ template class Quaternion { * default-constructed quaternion. @f[ * \boldsymbol a = \frac{\boldsymbol q_V}{\sqrt{1 - q_S^2}} * @f] - * @see isNormalized(), angle(), rotation() + * @see @ref isNormalized(), @ref angle(), @ref rotation() */ Vector3 axis() const; /** * @brief Convert quaternion to rotation matrix * - * @see fromMatrix(), DualQuaternion::toMatrix(), - * Matrix4::from(const Matrix<3, T>&, const Vector3&) + * @see @ref fromMatrix(), @ref DualQuaternion::toMatrix(), + * @ref Matrix4::from(const Matrix<3, T>&, const Vector3&) */ Matrix<3, T> toMatrix() const; @@ -226,6 +231,7 @@ template class Quaternion { * @brief Add quaternion * * @see operator+=() + * @todoc Make explicit reference when Doxygen can handle operators */ Quaternion operator+(const Quaternion& other) const { return Quaternion(*this) += other; @@ -256,7 +262,7 @@ template class Quaternion { /** * @brief Subtract quaternion * - * @see operator-=() + * @see @ref operator-=() */ Quaternion operator-(const Quaternion& other) const { return Quaternion(*this) -= other; @@ -279,6 +285,7 @@ template class Quaternion { * @brief Multiply with scalar * * @see operator*=(T) + * @todoc Make explicit reference when Doxygen can handle operators */ Quaternion operator*(T scalar) const { return Quaternion(*this) *= scalar; @@ -301,6 +308,7 @@ template class Quaternion { * @brief Divide with scalar * * @see operator/=(T) + * @todoc Make explicit reference when Doxygen can handle operators */ Quaternion operator/(T scalar) const { return Quaternion(*this) /= scalar; @@ -319,29 +327,32 @@ template class Quaternion { /** * @brief Dot product of the quaternion * - * Should be used instead of length() for comparing quaternion length - * with other values, because it doesn't compute the square root. @f[ + * Should be used instead of @ref length() for comparing quaternion + * length with other values, because it doesn't compute the square + * root. @f[ * q \cdot q = \boldsymbol q_V \cdot \boldsymbol q_V + q_S^2 * @f] - * @see isNormalized(), dot(const Quaternion&, const Quaternion&) + * @see @ref isNormalized(), + * @ref dot(const Quaternion&, const Quaternion&) */ T dot() const { return dot(*this, *this); } /** * @brief %Quaternion length * - * See also dot() const which is faster for comparing length with other - * values. @f[ + * See also dot() const which is faster for comparing length with + * other values. @f[ * |q| = \sqrt{q \cdot q} * @f] - * @see isNormalized() + * @see @ref isNormalized() + * @todoc Explicit reference when Doxygen can handle const */ T length() const { return std::sqrt(dot()); } /** * @brief Normalized quaternion (of unit length) * - * @see isNormalized() + * @see @ref isNormalized() */ Quaternion normalized() const { return (*this)/length(); } @@ -357,7 +368,7 @@ template class Quaternion { /** * @brief Inverted quaternion * - * See invertedNormalized() which is faster for normalized + * See @ref invertedNormalized() which is faster for normalized * quaternions. @f[ * q^{-1} = \frac{q^*}{|q|^2} = \frac{q^*}{q \cdot q} * @f] @@ -367,23 +378,25 @@ template class Quaternion { /** * @brief Inverted normalized quaternion * - * Equivalent to conjugated(). Expects that the quaternion is + * Equivalent to @ref conjugated(). Expects that the quaternion is * normalized. @f[ * q^{-1} = \frac{q^*}{|q|^2} = q^* * @f] - * @see isNormalized(), inverted() + * @see @ref isNormalized(), @ref inverted() */ Quaternion invertedNormalized() const; /** * @brief Rotate vector with quaternion * - * See transformVectorNormalized(), which is faster for normalized + * See @ref transformVectorNormalized(), which is faster for normalized * quaternions. @f[ * v' = qvq^{-1} = q [\boldsymbol v, 0] q^{-1} * @f] - * @see Quaternion(const Vector3&), vector(), Matrix4::transformVector(), - * DualQuaternion::transformPoint(), Complex::transformVector() + * @see @ref Quaternion(const Vector3&), @ref vector(), + * @ref Matrix4::transformVector(), + * @ref DualQuaternion::transformPoint(), + * @ref Complex::transformVector() */ Vector3 transformVector(const Vector3& vector) const { return ((*this)*Quaternion(vector)*inverted()).vector(); @@ -392,12 +405,14 @@ template class Quaternion { /** * @brief Rotate vector with normalized quaternion * - * Faster alternative to transformVector(), expects that the quaternion - * is normalized. @f[ + * Faster alternative to @ref transformVector(), expects that the + * quaternion is normalized. @f[ * v' = qvq^{-1} = qvq^* = q [\boldsymbol v, 0] q^* * @f] - * @see isNormalized(), Quaternion(const Vector3&), vector(), Matrix4::transformVector(), - * DualQuaternion::transformPointNormalized(), Complex::transformVector() + * @see @ref isNormalized(), @ref Quaternion(const Vector3&), + * @ref vector(), @ref Matrix4::transformVector(), + * @ref DualQuaternion::transformPointNormalized(), + * @ref Complex::transformVector() */ Vector3 transformVectorNormalized(const Vector3& vector) const; @@ -420,6 +435,7 @@ template class Quaternion { @brief Multiply scalar with quaternion Same as Quaternion::operator*(T) const. +@todoc Make explicit reference when Doxygen can handle operators */ template inline Quaternion operator*(T scalar, const Quaternion& quaternion) { return quaternion*scalar; @@ -432,6 +448,7 @@ template inline Quaternion operator*(T scalar, const Quaternion& \frac a q = [\frac a {\boldsymbol q_V}, \frac a {q_S}] @f] @see Quaternion::operator/() +@todoc Make explicit reference when Doxygen can handle operators */ template inline Quaternion operator/(T scalar, const Quaternion& quaternion) { return {scalar/quaternion.vector(), scalar/quaternion.scalar()}; @@ -446,12 +463,16 @@ template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb return debug; } +/** @todoc Remove the workaround when Doxygen is really able to preprocessor */ + /* Explicit instantiation for commonly used types */ #ifndef DOXYGEN_GENERATING_OUTPUT +/** @privatesection */ extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Quaternion&); #ifndef MAGNUM_TARGET_GLES extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Quaternion&); #endif +/** @endprivatesection */ #endif namespace Implementation { diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 0bfa6562b..6f9fe0b25 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -62,7 +62,7 @@ template class Range { /** * Create range from minimal coordinates and size * @param min Minimal coordinates - * @param size Range size + * @param size %Range size */ static Range fromSize(const VectorType& min, const VectorType& size) { return {min, min+size}; @@ -122,7 +122,7 @@ template class Range { constexpr const VectorType max() const { return _max; } /**< @overload */ /** - * @brief Range size + * @brief %Range size * * @see @ref min(), @ref max(), @ref Range2D::sizeX(), * @ref Range2D::sizeY(), @ref Range3D::sizeX(), @@ -131,7 +131,7 @@ template class Range { VectorType size() const { return _max - _min; } /** - * @brief Range center + * @brief %Range center * * @see @ref Range2D::centerX(), @ref Range2D::centerY(), * @ref Range3D::centerX(), @ref Range3D::centerY(), diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index f93a9a71c..dd160b4ca 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::RectangularMatrix + * @brief Class @ref Magnum::Math::RectangularMatrix, typedef @ref Magnum::Math::Matrix2x3, @ref Magnum::Math::Matrix3x2, @ref Magnum::Math::Matrix2x4, @ref Magnum::Math::Matrix4x2, @ref Magnum::Math::Matrix3x4, @ref Magnum::Math::Matrix4x3 */ #include "Magnum/Math/Vector.h" @@ -43,8 +43,8 @@ namespace Implementation { @tparam rows Row count @tparam T Underlying data type -See @ref matrix-vector for brief introduction. See also Matrix (square) and -Vector. +See @ref matrix-vector for brief introduction. See also @ref Matrix (square) +and @ref Vector. The data are stored in column-major order, to reflect that, all indices in math formulas are in reverse order (i.e. @f$ \boldsymbol A_{ji} @f$ instead @@ -65,13 +65,13 @@ template class RectangularMatrix { /** * @brief Size of matrix diagonal * - * @see fromDiagonal(), diagonal() + * @see @ref fromDiagonal(), @ref diagonal() */ const static std::size_t DiagonalSize = (cols < rows ? cols : rows); /** * @brief %Matrix from array - * @return Reference to the data as if it was Matrix, thus doesn't + * @return Reference to the data as if it was matrix, thus doesn't * perform any copying. * * @attention Use with caution, the function doesn't check whether the @@ -90,7 +90,7 @@ template class RectangularMatrix { * * Rolls the vector into matrix, i.e. first `rows` elements of the * vector will make first column of resulting matrix. - * @see toVector() + * @see @ref toVector() */ static RectangularMatrix fromVector(const Vector& vector) { return *reinterpret_cast*>(vector.data()); @@ -99,7 +99,7 @@ template class RectangularMatrix { /** * @brief Construct diagonal matrix * - * @see diagonal() + * @see @ref diagonal() */ constexpr static RectangularMatrix fromDiagonal(const Vector& diagonal) { return RectangularMatrix(typename Implementation::GenerateSequence::Type(), diagonal); @@ -164,7 +164,8 @@ template class RectangularMatrix { * @return One-dimensional array of `cols*rows` length in column-major * order. * - * @see operator[] + * @see operator[]() + * @todoc Make explicit reference when Doxygen can handle operators */ T* data() { return _data[0].data(); } constexpr const T* data() const { return _data[0].data(); } /**< @overload */ @@ -172,13 +173,15 @@ template class RectangularMatrix { /** * @brief %Matrix column * - * Particular elements can be accessed using Vector::operator[], e.g.: + * Particular elements can be accessed using Vector::operator[](), + * e.g.: * @code * RectangularMatrix<4, 3, Float> m; * Float a = m[2][1]; * @endcode * - * @see row(), data() + * @see @ref row(), @ref data() + * @todoc Make explicit reference when Doxygen can handle operators */ Vector& operator[](std::size_t col) { return _data[col]; } constexpr const Vector& operator[](std::size_t col) const { return _data[col]; } /**< @overload */ @@ -186,9 +189,11 @@ template class RectangularMatrix { /** * @brief %Matrix row * - * Consider using transposed() when accessing rows frequently, as this - * is slower than accessing columns due to the way the matrix is stored. + * Consider using @ref transposed() when accessing rows frequently, as + * this is slower than accessing columns due to the way the matrix is + * stored. * @see operator[]() + * @todoc Make explicit reference when Doxygen can handle operators */ Vector row(std::size_t row) const; @@ -203,8 +208,9 @@ template class RectangularMatrix { /** * @brief Non-equality operator * - * @see Vector::operator<(), Vector::operator<=(), Vector::operator>=(), - * Vector::operator>() + * @see Vector::operator<(), Vector::operator<=(), + * Vector::operator>=(), Vector::operator>() + * @todoc Make explicit reference when Doxygen can handle operators */ bool operator!=(const RectangularMatrix& other) const { return !operator==(other); @@ -237,6 +243,7 @@ template class RectangularMatrix { * @brief Add matrix * * @see operator+=() + * @todoc Make explicit reference when Doxygen can handle operators */ RectangularMatrix operator+(const RectangularMatrix& other) const { return RectangularMatrix(*this)+=other; @@ -259,7 +266,7 @@ template class RectangularMatrix { /** * @brief Subtract matrix * - * @see operator-=() + * @see @ref operator-=() */ RectangularMatrix operator-(const RectangularMatrix& other) const { return RectangularMatrix(*this)-=other; @@ -283,6 +290,7 @@ template class RectangularMatrix { * @brief Multiply matrix with number * * @see operator*=(T), operator*(T, const RectangularMatrix&) + * @todoc Make explicit reference when Doxygen can handle operators */ RectangularMatrix operator*(T number) const { return RectangularMatrix(*this) *= number; @@ -307,6 +315,7 @@ template class RectangularMatrix { * * @see operator/=(T), * operator/(T, const RectangularMatrix&) + * @todoc Make explicit reference when Doxygen can handle operators */ RectangularMatrix operator/(T number) const { return RectangularMatrix(*this) /= number; @@ -336,14 +345,14 @@ template class RectangularMatrix { /** * @brief Transposed matrix * - * @see row() + * @see @ref row() */ RectangularMatrix transposed() const; /** * @brief Values on diagonal * - * @see fromDiagonal() + * @see @ref fromDiagonal() */ constexpr Vector diagonal() const; @@ -354,7 +363,7 @@ template class RectangularMatrix { * of the matrix will make first `rows` elements of resulting vector. * Useful for performing vector operations with the matrix (e.g. * summing the elements etc.). - * @see fromVector() + * @see @ref fromVector() */ Vector toVector() const { return *reinterpret_cast*>(data()); @@ -379,7 +388,7 @@ template class RectangularMatrix { #ifndef CORRADE_GCC46_COMPATIBILITY /** -@brief Matrix with 2 columns and 3 rows +@brief %Matrix with 2 columns and 3 rows Convenience alternative to %RectangularMatrix<2, 3, T>. See @ref RectangularMatrix for more information. @@ -390,7 +399,7 @@ Convenience alternative to %RectangularMatrix<2, 3, T>. See template using Matrix2x3 = RectangularMatrix<2, 3, T>; /** -@brief Matrix with 3 columns and 2 rows +@brief %Matrix with 3 columns and 2 rows Convenience alternative to %RectangularMatrix<3, 2, T>. See @ref RectangularMatrix for more information. @@ -401,7 +410,7 @@ Convenience alternative to %RectangularMatrix<3, 2, T>. See template using Matrix3x2 = RectangularMatrix<3, 2, T>; /** -@brief Matrix with 2 columns and 4 rows +@brief %Matrix with 2 columns and 4 rows Convenience alternative to %RectangularMatrix<2, 4, T>. See @ref RectangularMatrix for more information. @@ -412,7 +421,7 @@ Convenience alternative to %RectangularMatrix<2, 4, T>. See template using Matrix2x4 = RectangularMatrix<2, 4, T>; /** -@brief Matrix with 4 columns and 2 rows +@brief %Matrix with 4 columns and 2 rows Convenience alternative to %RectangularMatrix<4, 2, T>. See @ref RectangularMatrix for more information. @@ -423,7 +432,7 @@ Convenience alternative to %RectangularMatrix<4, 2, T>. See template using Matrix4x2 = RectangularMatrix<4, 2, T>; /** -@brief Matrix with 3 columns and 4 rows +@brief %Matrix with 3 columns and 4 rows Convenience alternative to %RectangularMatrix<3, 4, T>. See @ref RectangularMatrix for more information. @@ -434,7 +443,7 @@ Convenience alternative to %RectangularMatrix<3, 4, T>. See template using Matrix3x4 = RectangularMatrix<3, 4, T>; /** -@brief Matrix with 4 columns and 3 rows +@brief %Matrix with 4 columns and 3 rows Convenience alternative to %RectangularMatrix<4, 3, T>. See @ref RectangularMatrix for more information. @@ -449,6 +458,7 @@ template using Matrix4x3 = RectangularMatrix<4, 3, T>; @brief Multiply number with matrix Same as RectangularMatrix::operator*(T) const. +@todoc Make explicit reference when Doxygen can handle operators */ template inline RectangularMatrix operator*( #ifdef DOXYGEN_GENERATING_OUTPUT @@ -468,6 +478,7 @@ The computation is done column-wise. @f[ \boldsymbol B_j = \frac a {\boldsymbol A_j} @f] @see RectangularMatrix::operator/(T) const +@todoc Make explicit reference when Doxygen can handle operators */ template inline RectangularMatrix operator/( #ifdef DOXYGEN_GENERATING_OUTPUT @@ -492,6 +503,7 @@ Internally the same as multiplying one-column matrix with one-row matrix. @f[ (\boldsymbol {aA})_{ji} = \boldsymbol a_i \boldsymbol A_j @f] @see RectangularMatrix::operator*(const RectangularMatrix&) const +@todoc Make explicit reference when Doxygen can handle operators */ template inline RectangularMatrix operator*(const Vector& vector, const RectangularMatrix& matrix) { return RectangularMatrix<1, size, T>(vector)*matrix; diff --git a/src/Magnum/Math/Swizzle.h b/src/Magnum/Math/Swizzle.h index 66e6a07a2..47786aeae 100644 --- a/src/Magnum/Math/Swizzle.h +++ b/src/Magnum/Math/Swizzle.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::Math::swizzle() + * @brief Function @ref Magnum::Math::swizzle() */ #include "Magnum/Math/Vector.h" diff --git a/src/Magnum/Math/TypeTraits.h b/src/Magnum/Math/TypeTraits.h index 6d2a4c0c0..10c3fbbff 100644 --- a/src/Magnum/Math/TypeTraits.h +++ b/src/Magnum/Math/TypeTraits.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::TypeTraits + * @brief Class @ref Magnum::Math::TypeTraits */ #include @@ -99,8 +99,8 @@ template struct TypeTraits: Implementation::TypeTraitsDefault { /** * @brief Fuzzy compare * - * Uses fuzzy compare for floating-point types (using epsilon() value), - * pure equality comparison everywhere else. + * Uses fuzzy compare for floating-point types (using @ref epsilon() + * value), pure equality comparison everywhere else. */ static bool equals(T a, T b); #endif diff --git a/src/Magnum/Math/Unit.h b/src/Magnum/Math/Unit.h index 1682fdd93..9b4803ed9 100644 --- a/src/Magnum/Math/Unit.h +++ b/src/Magnum/Math/Unit.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Unit + * @brief Class @ref Magnum::Math::Unit */ #include "Magnum/Math/TypeTraits.h" @@ -37,7 +37,7 @@ namespace Magnum { namespace Math { @brief Base class for units @tparam T Underlying data type -@see Deg, Rad +@see @ref Deg, @ref Rad */ template class Derived, class T> class Unit { template class, class> friend class Unit; diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index f8becd762..3d7de1285 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Vector + * @brief Class @ref Magnum::Math::Vector */ #include @@ -92,7 +92,9 @@ template class Vector { * antiparallel. @f[ * \boldsymbol a \cdot \boldsymbol b = \sum_{i=0}^{n-1} \boldsymbol a_i \boldsymbol b_i * @f] - * @see dot() const, operator-(), Vector2::perpendicular() + * @see dot() const, @ref operator-(), + * @ref Vector2::perpendicular() + * @todoc Explicit reference when Doxygen can handle const */ static T dot(const Vector& a, const Vector& b) { return (a*b).sum(); @@ -104,7 +106,8 @@ template class Vector { * Expects that both vectors are normalized. @f[ * \theta = acos \left( \frac{\boldsymbol a \cdot \boldsymbol b}{|\boldsymbol a| |\boldsymbol b|} \right) = acos (\boldsymbol a \cdot \boldsymbol b) * @f] - * @see isNormalized(), Quaternion::angle(), Complex::angle() + * @see @ref isNormalized(), @ref Quaternion::angle(), + * @ref Complex::angle() */ static Rad angle(const Vector& normalizedA, const Vector& normalizedB); @@ -188,6 +191,7 @@ template class Vector { * @return One-dimensional array of `size` length. * * @see operator[]() + * @todoc Make explicit reference when Doxygen can handle operators */ T* data() { return _data; } constexpr const T* data() const { return _data; } /**< @overload */ @@ -195,7 +199,7 @@ template class Vector { /** * @brief Value at given position * - * @see data() + * @see @ref data() */ T& operator[](std::size_t pos) { return _data[pos]; } constexpr T operator[](std::size_t pos) const { return _data[pos]; } /**< @overload */ @@ -231,7 +235,7 @@ template class Vector { * @f[ * |\boldsymbol a \cdot \boldsymbol a - 0| < \epsilon^2 \cong \epsilon * @f] - * @see dot(), normalized() + * @see @ref dot(), @ref normalized() */ bool isZero() const { return Implementation::isZeroSquared(dot()); @@ -243,7 +247,7 @@ template class Vector { * The vector is normalized if it has unit length: @f[ * |\boldsymbol a \cdot \boldsymbol a - 1| < 2 \epsilon + \epsilon^2 \cong 2 \epsilon * @f] - * @see dot(), normalized() + * @see @ref dot(), @ref normalized() */ bool isNormalized() const { return Implementation::isNormalizedSquared(dot()); @@ -255,7 +259,7 @@ template class Vector { * @f[ * \boldsymbol b_i = -\boldsymbol a_i * @f] - * @see Vector2::perpendicular() + * @see @ref Vector2::perpendicular() */ Vector operator-() const; @@ -276,7 +280,8 @@ template class Vector { /** * @brief Add vector * - * @see operator+=(), sum() + * @see operator+=(), @ref sum() + * @todoc Make explicit reference when Doxygen can handle operators */ Vector operator+(const Vector& other) const { return Vector(*this) += other; @@ -299,7 +304,7 @@ template class Vector { /** * @brief Subtract vector * - * @see operator-=() + * @see @ref operator-=() */ Vector operator-(const Vector& other) const { return Vector(*this) -= other; @@ -313,6 +318,7 @@ template class Vector { * @f] * @see operator*=(const Vector&), * operator*=(Vector&, FloatingPoint) + * @todoc Make explicit reference when Doxygen can handle operators */ Vector& operator*=(T number) { for(std::size_t i = 0; i != size; ++i) @@ -327,6 +333,7 @@ template class Vector { * @see operator*(const Vector&) const, * operator*=(T), operator*(T, const Vector&), * operator*(const Vector&, FloatingPoint) + * @todoc Make explicit reference when Doxygen can handle operators */ Vector operator*(T number) const { return Vector(*this) *= number; @@ -340,6 +347,7 @@ template class Vector { * @f] * @see operator/=(const Vector&), * operator/=(Vector&, FloatingPoint) + * @todoc Make explicit reference when Doxygen can handle operators */ Vector& operator/=(T number) { for(std::size_t i = 0; i != size; ++i) @@ -354,6 +362,7 @@ template class Vector { * @see operator/(const Vector&) const, * operator/=(T), operator/(T, const Vector&), * operator/(const Vector&, FloatingPoint) + * @todoc Make explicit reference when Doxygen can handle operators */ Vector operator/(T number) const { return Vector(*this) /= number; @@ -367,6 +376,7 @@ template class Vector { * @f] * @see operator*=(T), * operator*=(Vector&, const Vector&) + * @todoc Make explicit reference when Doxygen can handle operators */ Vector& operator*=(const Vector& other) { for(std::size_t i = 0; i != size; ++i) @@ -381,6 +391,7 @@ template class Vector { * @see operator*(T) const, operator*=(const Vector&), * operator*(const Vector&, const Vector&), * @ref product() + * @todoc Make explicit reference when Doxygen can handle operators */ Vector operator*(const Vector& other) const { return Vector(*this) *= other; @@ -394,6 +405,7 @@ template class Vector { * @f] * @see operator/=(T), * operator/=(Vector&, const Vector&) + * @todoc Make explicit reference when Doxygen can handle operators */ Vector& operator/=(const Vector& other) { for(std::size_t i = 0; i != size; ++i) @@ -407,6 +419,7 @@ template class Vector { * * @see operator/(T) const, operator/=(const Vector&), * operator/(const Vector&, const Vector&) + * @todoc Make explicit reference when Doxygen can handle operators */ Vector operator/(const Vector& other) const { return Vector(*this) /= other; @@ -415,22 +428,24 @@ template class Vector { /** * @brief Dot product of the vector * - * Should be used instead of length() for comparing vector length with - * other values, because it doesn't compute the square root. @f[ + * Should be used instead of @ref length() for comparing vector length + * with other values, because it doesn't compute the square root. @f[ * \boldsymbol a \cdot \boldsymbol a = \sum_{i=0}^{n-1} \boldsymbol a_i^2 * @f] - * @see dot(const Vector&, const Vector&), isNormalized() + * @see @ref dot(const Vector&, const Vector&), + * @ref isNormalized() */ T dot() const { return dot(*this, *this); } /** * @brief %Vector length * - * See also dot() const which is faster for comparing length with other - * values. @f[ + * See also @ref dot() const which is faster for comparing length with + * other values. @f[ * |\boldsymbol a| = \sqrt{\boldsymbol a \cdot \boldsymbol a} * @f] - * @see lengthInverted(), Math::sqrt(), normalized(), resized() + * @see @ref lengthInverted(), @ref Math::sqrt(), @ref normalized(), + * @ref resized() * @todo something like std::hypot() for possibly better precision? */ T length() const { return std::sqrt(dot()); } @@ -441,14 +456,15 @@ template class Vector { * @f[ * \frac{1}{|\boldsymbol a|} = \frac{1}{\sqrt{\boldsymbol a \cdot \boldsymbol a}} * @f] - * @see length(), Math::sqrtInverted(), normalized(), resized() + * @see @ref length(), @ref Math::sqrtInverted(), @ref normalized(), + * @ref resized() */ T lengthInverted() const { return T(1)/length(); } /** * @brief Normalized vector (of unit length) * - * @see isNormalized(), lengthInverted(), resized() + * @see @ref isNormalized(), @ref lengthInverted(), @ref resized() */ Vector normalized() const { return *this*lengthInverted(); } @@ -456,12 +472,12 @@ template class Vector { * @brief Resized vector * * Convenience equivalent to the following code. Due to operation order - * this function is faster than the obvious way of sizing normalized() - * vector. + * this function is faster than the obvious way of sizing + * @ref normalized() vector. * @code * vec*(vec.lengthInverted()*length) // the brackets are important * @endcode - * @see normalized() + * @see @ref normalized() */ Vector resized(T length) const { return *this*(lengthInverted()*length); @@ -473,7 +489,7 @@ template class Vector { * Returns vector projected onto @p line. @f[ * \boldsymbol a_1 = \frac{\boldsymbol a \cdot \boldsymbol b}{\boldsymbol b \cdot \boldsymbol b} \boldsymbol b * @f] - * @see dot(), projectedOntoNormalized() + * @see @ref dot(), @ref projectedOntoNormalized() */ Vector projected(const Vector& line) const { return line*dot(*this, line)/line.dot(); @@ -482,8 +498,8 @@ template class Vector { /** * @brief %Vector projected onto normalized line * - * Slightly faster alternative to projected(), expects @p line to be - * normalized. @f[ + * Slightly faster alternative to @ref projected(), expects @p line to + * be normalized. @f[ * \boldsymbol a_1 = \frac{\boldsymbol a \cdot \boldsymbol b}{\boldsymbol b \cdot \boldsymbol b} \boldsymbol b = * (\boldsymbol a \cdot \boldsymbol b) \boldsymbol b * @f] @@ -495,6 +511,7 @@ template class Vector { * @brief Sum of values in the vector * * @see operator+() + * @todoc Make explicit reference when Doxygen can handle operators */ T sum() const; @@ -502,6 +519,7 @@ template class Vector { * @brief Product of values in the vector * * @see operator*(const Vector&) const + * @todoc Make explicit reference when Doxygen can handle operators */ T product() const; @@ -533,6 +551,7 @@ template class Vector { @brief Multiply number with vector Same as Vector::operator*(T) const. +@todoc Make explicit reference when Doxygen can handle operators */ template inline Vector operator*( #ifdef DOXYGEN_GENERATING_OUTPUT @@ -552,6 +571,7 @@ template inline Vector operator*( \boldsymbol c_i = \frac b {\boldsymbol a_i} @f] @see Vector::operator/(T) const +@todoc Make explicit reference when Doxygen can handle operators */ template inline Vector operator/( #ifdef DOXYGEN_GENERATING_OUTPUT @@ -842,6 +862,7 @@ operator>>(const Vector& vector, Similar to Vector::operator*=(T), except that the multiplication is done in floating-point. The computation is done in-place. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -861,6 +882,7 @@ operator*=(Vector& vector, FloatingPoint number) { Similar to Vector::operator*(T) const, except that the multiplication is done in floating-point. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -877,6 +899,7 @@ operator*(const Vector& vector, FloatingPoint number) { @brief Multiply floating-point number with integral vector Same as operator*(const Vector&, FloatingPoint). +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -893,6 +916,7 @@ operator*(FloatingPoint number, const Vector& vector) { Similar to Vector::operator/=(T), except that the division is done in floating-point. The computation is done in-place. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -912,6 +936,7 @@ operator/=(Vector& vector, FloatingPoint number) { Similar to Vector::operator/(T) const, except that the division is done in floating-point. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -929,6 +954,7 @@ operator/(const Vector& vector, FloatingPoint number) { Similar to Vector::operator*=(const Vector&), except that the multiplication is done in floating-point. The computation is done in-place. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -946,10 +972,11 @@ operator*=(Vector& a, const Vector& b) { /** @relates Vector @brief Multiply integral vector with floating-point vector component-wise -Similar to Vector::operator*(const Vector&) const, except that the -multiplication is done in floating-point. The result is always integral vector, -convert both arguments to the same floating-point type to have floating-point -result. +Similar to Vector::operator*(const Vector&) const, except that +the multiplication is done in floating-point. The result is always integral +vector, convert both arguments to the same floating-point type to have +floating-point result. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -966,6 +993,7 @@ operator*(const Vector& a, const Vector& b) @brief Multiply floating-point vector with integral vector component-wise Same as operator*(const Vector&, const Vector&). +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -982,6 +1010,7 @@ operator*(const Vector& a, const Vector& b) Similar to Vector::operator/=(const Vector&), except that the division is done in floating-point. The computation is done in-place. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT @@ -999,10 +1028,11 @@ operator/=(Vector& a, const Vector& b) { /** @relates Vector @brief Divide integral vector with floating-point vector component-wise -Similar to Vector::operator/(const Vector&) const, except that the -division is done in floating-point. The result is always integral vector, +Similar to Vector::operator/(const Vector&) const, except that +the division is done in floating-point. The result is always integral vector, convert both arguments to the same floating-point type to have floating-point result. +@todoc Make explicit reference when Doxygen can handle operators */ template inline #ifdef DOXYGEN_GENERATING_OUTPUT diff --git a/src/Magnum/Math/Vector2.h b/src/Magnum/Math/Vector2.h index cbb9a7c7f..d40435e62 100644 --- a/src/Magnum/Math/Vector2.h +++ b/src/Magnum/Math/Vector2.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Vector2 + * @brief Class @ref Magnum::Math::Vector2 */ #include "Magnum/Math/Vector.h" @@ -38,7 +38,8 @@ namespace Magnum { namespace Math { @tparam T Data type See @ref matrix-vector for brief introduction. -@see Magnum::Vector2, Magnum::Vector2i, Magnum::Vector2ui, Magnum::Vector2d +@see @ref Magnum::Vector2, @ref Magnum::Vector2i, @ref Magnum::Vector2ui, + @ref Magnum::Vector2d @configurationvalueref{Magnum::Math::Vector2} */ template class Vector2: public Vector<2, T> { @@ -50,15 +51,15 @@ template class Vector2: public Vector<2, T> { * @code * Matrix3::translation(Vector2::xAxis(5.0f)); // same as Matrix3::translation({5.0f, 0.0f}); * @endcode - * @see yAxis(), xScale(), Matrix3::right() + * @see @ref yAxis(), @ref xScale(), @ref Matrix3::right() */ constexpr static Vector2 xAxis(T length = T(1)) { return {length, T(0)}; } /** * @brief %Vector in direction of Y axis (up) * - * See xAxis() for more information. - * @see yScale(), Matrix3::up() + * See @ref xAxis() for more information. + * @see @ref yScale(), @ref Matrix3::up() */ constexpr static Vector2 yAxis(T length = T(1)) { return {T(0), length}; } @@ -69,15 +70,15 @@ template class Vector2: public Vector<2, T> { * @code * Matrix3::scaling(Vector2::xScale(-2.0f)); // same as Matrix3::scaling({-2.0f, 1.0f}); * @endcode - * @see yScale(), xAxis() + * @see @ref yScale(), @ref xAxis() */ constexpr static Vector2 xScale(T scale) { return {scale, T(1)}; } /** * @brief Scaling vector in direction of Y axis (height) * - * See xScale() for more information. - * @see yAxis() + * See @ref xScale() for more information. + * @see @ref yAxis() */ constexpr static Vector2 yScale(T scale) { return {T(1), scale}; } @@ -85,12 +86,13 @@ template class Vector2: public Vector<2, T> { * @brief 2D cross product * * 2D version of cross product, also called perp-dot product, - * equivalent to calling Vector3::cross() with Z coordinate set to `0` - * and extracting only Z coordinate from the result (X and Y + * equivalent to calling @ref Vector3::cross() with Z coordinate set to + * `0` and extracting only Z coordinate from the result (X and Y * coordinates are always zero). @f[ * \boldsymbol a \times \boldsymbol b = \boldsymbol a_\bot \cdot \boldsymbol b = a_xb_y - a_yb_x * @f] - * @see perpendicular(), dot(const Vector&, const Vector&) + * @see @ref perpendicular(), + * @ref dot(const Vector&, const Vector&) */ static T cross(const Vector2& a, const Vector2& b) { return Vector<2, T>::dot(a.perpendicular(), b); @@ -131,7 +133,9 @@ template class Vector2: public Vector<2, T> { * Returns vector rotated 90° counterclockwise. @f[ * \boldsymbol v_\bot = \begin{pmatrix} -v_y \\ v_x \end{pmatrix} * @f] - * @see cross(), dot(const Vector&, const Vector&), operator-() const + * @see @ref cross(), + * @ref dot(const Vector&, const Vector&), + * @ref operator-() const */ Vector2 perpendicular() const { return {-y(), x()}; } diff --git a/src/Magnum/Math/Vector3.h b/src/Magnum/Math/Vector3.h index 038d7b78a..0bb553cc4 100644 --- a/src/Magnum/Math/Vector3.h +++ b/src/Magnum/Math/Vector3.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Math::Vector3 + * @brief Class @ref Magnum::Math::Vector3 */ #include "Magnum/Math/Vector2.h" @@ -39,7 +39,8 @@ namespace Magnum { namespace Math { @tparam T Data type See @ref matrix-vector for brief introduction. -@see Magnum::Vector3, Magnum::Vector3i, Magnum::Vector3ui, Magnum::Vector3d +@see @ref Magnum::Vector3, @ref Magnum::Vector3i, @ref Magnum::Vector3ui, + @ref Magnum::Vector3d @configurationvalueref{Magnum::Math::Vector3} */ template class Vector3: public Vector<3, T> { @@ -107,7 +108,7 @@ template class Vector3: public Vector<3, T> { * \boldsymbol a \times \boldsymbol b = * \begin{pmatrix}a_yb_z - a_zb_y \\ a_zb_y - a_xb_z \\ a_xb_y - a_yb_x \end{pmatrix} * @f] - * @see Vector2::cross() + * @see @ref Vector2::cross() */ static Vector3 cross(const Vector3& a, const Vector3& b) { return swizzle<'y', 'z', 'x'>(a)*swizzle<'z', 'x', 'y'>(b) - @@ -199,7 +200,7 @@ template class Vector3: public Vector<3, T> { * @brief XY part of the vector * @return First two components of the vector * - * @see swizzle() + * @see @ref swizzle() */ Vector2& xy() { return Vector2::from(Vector<3, T>::data()); } constexpr const Vector2 xy() const { return {x(), y()}; } /**< @overload */ diff --git a/src/Magnum/Math/Vector4.h b/src/Magnum/Math/Vector4.h index 8a9f4e71c..fbedacf28 100644 --- a/src/Magnum/Math/Vector4.h +++ b/src/Magnum/Math/Vector4.h @@ -38,7 +38,8 @@ namespace Magnum { namespace Math { @tparam T Data type See @ref matrix-vector for brief introduction. -@see Magnum::Vector4, Magnum::Vector4i, Magnum::Vector4ui, Magnum::Vector4d +@see @ref Magnum::Vector4, @ref Magnum::Vector4i, @ref Magnum::Vector4ui, + @ref Magnum::Vector4d @configurationvalueref{Magnum::Math::Vector4} */ template class Vector4: public Vector<4, T> { From 86302ea602225ee5540aa27d5545a8f2256e6deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 17:37:51 +0200 Subject: [PATCH 09/47] MeshTools: completed documentation review. --- src/Magnum/MeshTools/FlipNormals.h | 15 ++++++++++----- src/Magnum/MeshTools/GenerateFlatNormals.h | 10 +++++----- src/Magnum/MeshTools/Subdivide.h | 2 +- src/Magnum/MeshTools/Tipsify.h | 2 +- src/Magnum/MeshTools/Transform.h | 20 +++++++++++--------- 5 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/Magnum/MeshTools/FlipNormals.h b/src/Magnum/MeshTools/FlipNormals.h index c54041c57..3a5ca49e2 100644 --- a/src/Magnum/MeshTools/FlipNormals.h +++ b/src/Magnum/MeshTools/FlipNormals.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::flipNormals() + * @brief Function @ref Magnum::MeshTools::flipFaceWinding(), @ref Magnum::MeshTools::flipNormals() */ #include @@ -38,16 +38,21 @@ namespace Magnum { namespace MeshTools { /** @brief Flip face winding +@param[in,out] indices Index array to operate on -The same as flipNormals(std::vector&, std::vector&), +The same as @ref flipNormals(std::vector&, std::vector&), but flips only face winding. + +@attention The function requires the mesh to have triangle faces, thus index + count must be divisible by 3. */ void MAGNUM_MESHTOOLS_EXPORT flipFaceWinding(std::vector& indices); /** @brief Flip mesh normals +@param[in,out] normals Normal array to operate on -The same as flipNormals(std::vector&, std::vector&), +The same as @ref flipNormals(std::vector&, std::vector&), but flips only normals, not face winding. */ void MAGNUM_MESHTOOLS_EXPORT flipNormals(std::vector& normals); @@ -58,8 +63,8 @@ void MAGNUM_MESHTOOLS_EXPORT flipNormals(std::vector& normals); @param[in,out] normals Normal array to operate on Flips normal vectors and face winding in index array for face culling to work -properly too. See also flipNormals(std::vector&) and -flipFaceWinding(), which flip normals or face winding only. +properly too. See also @ref flipNormals(std::vector&) and +@ref flipFaceWinding(), which flip normals or face winding only. @attention The function requires the mesh to have triangle faces, thus index count must be divisible by 3. diff --git a/src/Magnum/MeshTools/GenerateFlatNormals.h b/src/Magnum/MeshTools/GenerateFlatNormals.h index 0690d3ae2..32d89279c 100644 --- a/src/Magnum/MeshTools/GenerateFlatNormals.h +++ b/src/Magnum/MeshTools/GenerateFlatNormals.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::generateFlatNormals() + * @brief Function @ref Magnum::MeshTools::generateFlatNormals() */ #include @@ -53,11 +53,11 @@ std::vector normalIndices; std::vector normals; std::tie(normalIndices, normals) = MeshTools::generateFlatNormals(vertexIndices, positions); @endcode -You can then use combineIndexedArrays() to combine normal and vertex array to -use the same indices. +You can then use @ref combineIndexedArrays() to combine normal and vertex array +to use the same indices. -@attention Index count must be divisible by 3, otherwise zero length result - is generated. +@attention The function requires the mesh to have triangle faces, thus index + count must be divisible by 3. */ std::tuple, std::vector> MAGNUM_MESHTOOLS_EXPORT generateFlatNormals(const std::vector& indices, const std::vector& positions); diff --git a/src/Magnum/MeshTools/Subdivide.h b/src/Magnum/MeshTools/Subdivide.h index 49f1a690a..2f19c09b3 100644 --- a/src/Magnum/MeshTools/Subdivide.h +++ b/src/Magnum/MeshTools/Subdivide.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::subdivide() + * @brief Function @ref Magnum::MeshTools::subdivide() */ #include diff --git a/src/Magnum/MeshTools/Tipsify.h b/src/Magnum/MeshTools/Tipsify.h index e66d3b2d3..84476b9b1 100644 --- a/src/Magnum/MeshTools/Tipsify.h +++ b/src/Magnum/MeshTools/Tipsify.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::tipsify() + * @brief Function @ref Magnum::MeshTools::tipsify() */ #include diff --git a/src/Magnum/MeshTools/Transform.h b/src/Magnum/MeshTools/Transform.h index 5c124825c..89a4929a7 100644 --- a/src/Magnum/MeshTools/Transform.h +++ b/src/Magnum/MeshTools/Transform.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::MeshTools::transformVectorsInPlace(), Magnum::MeshTools::transformVectors(), Magnum::MeshTools::transformPointsInPlace(), Magnum::MeshTools::transformPoints() + * @brief Function @ref Magnum::MeshTools::transformVectorsInPlace(), @ref Magnum::MeshTools::transformVectors(), @ref Magnum::MeshTools::transformPointsInPlace(), @ref Magnum::MeshTools::transformPoints() */ #include "Magnum/Math/DualQuaternion.h" @@ -43,7 +43,7 @@ with compatible vector type as @p vectors. Expects that @ref Math::Quaternion "Q is normalized, no further requirements are for other transformation representations. -Unlike in transformPointsInPlace(), the transformation does not involve +Unlike in @ref transformPointsInPlace(), the transformation does not involve translation. Example usage: @@ -53,8 +53,9 @@ auto transformation = Quaternion::rotation(35.0_degf, Vector3::yAxis()); MeshTools::transformVectorsInPlace(rotation, vectors); @endcode -@see transformVectors(), Matrix3::transformVector(), Matrix4::transformVector(), - Complex::transformVectorNormalized(), Quaternion::transformVectorNormalized() +@see @ref transformVectors(), @ref Matrix3::transformVector(), + @ref Matrix4::transformVector(), @ref Complex::transformVector(), + @ref Quaternion::transformVectorNormalized() @todo GPU transform feedback implementation (otherwise this is only bad joke) */ template void transformVectorsInPlace(const Math::Quaternion& normalizedQuaternion, U& vectors) { @@ -80,7 +81,7 @@ template void transformVectorsInPlace(const Math::Matrix4& @brief Transform vectors using given transformation Returns transformed vectors instead of modifying them in-place. See -transformVectorsInPlace() for more information. +@ref transformVectorsInPlace() for more information. */ template U transformVectors(const T& transformation, U vectors) { U result(std::move(vectors)); @@ -97,7 +98,7 @@ with compatible vector type as @p vectors. Expects that @ref Math::DualQuaternion "DualQuaternion" is normalized, no further requirements are for other transformation representations. -Unlike in transformVectorsInPlace(), the transformation also involves +Unlike in @ref transformVectorsInPlace(), the transformation also involves translation. Example usage: @@ -108,8 +109,9 @@ auto transformation = DualQuaternion::rotation(35.0_degf, Vector3::yAxis())* MeshTools::transformPointsInPlace(rotation, points); @endcode -@see transformPoints(), Matrix3::transformPoint(), Matrix4::transformPoint(), - DualQuaternion::transformPointNormalized() +@see @ref transformPoints(), @ref Matrix3::transformPoint(), + @ref Matrix4::transformPoint(), + @ref DualQuaternion::transformPointNormalized() */ template void transformPointsInPlace(const Math::DualQuaternion& normalizedDualQuaternion, U& points) { for(auto& point: points) point = normalizedDualQuaternion.transformPointNormalized(point); @@ -134,7 +136,7 @@ template void transformPointsInPlace(const Math::Matrix4& m @brief Transform points using given transformation Returns transformed points instead of modifying them in-place. See -transformPointsInPlace() for more information. +@ref transformPointsInPlace() for more information. */ template U transformPoints(const T& transformation, U vectors) { U result(std::move(vectors)); From 5ba4a6b603f809f1fce40484abdd89b1097286f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 18:10:51 +0200 Subject: [PATCH 10/47] Platform: completed documentation review. Fixed Doxygen errors, updated links to GLUT/SDL2 bootstrap, unified MAGNUM_*_APPLICATION() macro argument naming. --- src/Magnum/Platform/AndroidApplication.h | 2 +- src/Magnum/Platform/GlutApplication.h | 20 +++++++++---------- src/Magnum/Platform/GlxApplication.h | 15 ++++++++++++-- src/Magnum/Platform/NaClApplication.h | 8 ++++---- src/Magnum/Platform/Screen.h | 8 ++++---- src/Magnum/Platform/ScreenedApplication.h | 20 +++++++++++++++++-- src/Magnum/Platform/Sdl2Application.h | 18 ++++++++--------- .../Platform/WindowlessGlxApplication.h | 2 +- .../Platform/WindowlessNaClApplication.h | 8 ++++---- .../Platform/WindowlessWglApplication.h | 2 +- src/Magnum/Platform/XEglApplication.h | 15 ++++++++++++-- 11 files changed, 78 insertions(+), 40 deletions(-) diff --git a/src/Magnum/Platform/AndroidApplication.h b/src/Magnum/Platform/AndroidApplication.h index 4b9a2431f..72a4883bf 100644 --- a/src/Magnum/Platform/AndroidApplication.h +++ b/src/Magnum/Platform/AndroidApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::AndroidApplication + * @brief Class @ref Magnum::Platform::AndroidApplication, macro @ref MAGNUM_ANDROIDAPPLICATION_MAIN() */ #include diff --git a/src/Magnum/Platform/GlutApplication.h b/src/Magnum/Platform/GlutApplication.h index 6ab203118..fbf9839a1 100644 --- a/src/Magnum/Platform/GlutApplication.h +++ b/src/Magnum/Platform/GlutApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::GlutApplication + * @brief Class @ref Magnum::Platform::GlutApplication, macro @ref MAGNUM_GLUTAPPLICATION_MAIN() */ #include @@ -58,10 +58,10 @@ enabled in CMake. ## Bootstrap application Fully contained base application using @ref GlutApplication along with -CMake setup is available in `base` branch of +CMake setup is available in `base-glut` branch of [Magnum Bootstrap](https://github.com/mosra/magnum-bootstrap) repository, -download it as [tar.gz](https://github.com/mosra/magnum-bootstrap/archive/base.tar.gz) -or [zip](https://github.com/mosra/magnum-bootstrap/archive/base.zip) file. +download it as [tar.gz](https://github.com/mosra/magnum-bootstrap/archive/base-glut.tar.gz) +or [zip](https://github.com/mosra/magnum-bootstrap/archive/base-glut.zip) file. After extracting the downloaded archive you can build and run the application with these four commands: @@ -197,7 +197,7 @@ class GlutApplication { /** * @brief Mouse cursor * - * @see setMouseCursor() + * @see @ref setMouseCursor() */ enum class MouseCursor: int { Default = GLUT_CURSOR_INHERIT, /**< Default cursor provided by parent window */ @@ -281,16 +281,16 @@ Double-buffered RGBA window with depth and stencil buffers. class GlutApplication::Configuration { public: /** - * @brief Context flag + * @brief %Context flag * - * @see @ref Flags @ref setFlags() + * @see @ref Flags, @ref setFlags() */ enum class Flag: int { Debug = GLUT_DEBUG /**< Create debug context */ }; /** - * @brief Context flags + * @brief %Context flags * * @see @ref setFlags() */ @@ -331,7 +331,7 @@ class GlutApplication::Configuration { return *this; } - /** @brief Context flags */ + /** @brief %Context flags */ Flags flags() const { return _flags; } /** @@ -345,7 +345,7 @@ class GlutApplication::Configuration { return *this; } - /** @brief Context version */ + /** @brief %Context version */ Version version() const { return _version; } /** diff --git a/src/Magnum/Platform/GlxApplication.h b/src/Magnum/Platform/GlxApplication.h index f714c1a0c..c1f866a22 100644 --- a/src/Magnum/Platform/GlxApplication.h +++ b/src/Magnum/Platform/GlxApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::GlxApplication + * @brief Class @ref Magnum::Platform::GlxApplication, macro @ref MAGNUM_GLXAPPLICATION_MAIN() */ #include "Magnum/Platform/AbstractXApplication.h" @@ -76,7 +76,18 @@ to simplify porting. */ class GlxApplication: public AbstractXApplication { public: - /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, const Configuration&) */ + /** + * @brief Default constructor + * @param arguments Application arguments + * @param configuration %Configuration + * + * Creates application with default or user-specified configuration. + * See @ref AbstractXApplication::Configuration "Configuration" for + * more information. The program exits if the context cannot be + * created, see below for an alternative. + * @todoc make this copydoc from Sdl2Application when Doxygen is able + * to find Configuration subclass + */ explicit GlxApplication(const Arguments& arguments, const Configuration& configuration = Configuration()); /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, std::nullptr_t) */ diff --git a/src/Magnum/Platform/NaClApplication.h b/src/Magnum/Platform/NaClApplication.h index 641067e7c..5b5150ef0 100644 --- a/src/Magnum/Platform/NaClApplication.h +++ b/src/Magnum/Platform/NaClApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::NaClApplication + * @brief Class @ref Magnum::Platform::NaClApplication, macro @ref MAGNUM_NACLAPPLICATION_MAIN() */ #include @@ -727,7 +727,7 @@ namespace Implementation { /** @hideinitializer @brief Entry point for NaCl application -@param application Application class name +@param className Class name See @ref Magnum::Platform::NaClApplication "Platform::NaClApplication" for usage information. This macro abstracts out platform-specific entry point code @@ -736,11 +736,11 @@ usage information. This macro abstracts out platform-specific entry point code header is included this macro is also aliased to `MAGNUM_APPLICATION_MAIN()`. */ /* look at that insane placement of __attribute__. WTF. */ -#define MAGNUM_NACLAPPLICATION_MAIN(application) \ +#define MAGNUM_NACLAPPLICATION_MAIN(className) \ namespace pp { \ Module __attribute__ ((visibility ("default"))) * CreateModule(); \ Module __attribute__ ((visibility ("default"))) * CreateModule() { \ - return new Magnum::Platform::Implementation::NaClModule(); \ + return new Magnum::Platform::Implementation::NaClModule(); \ } \ } diff --git a/src/Magnum/Platform/Screen.h b/src/Magnum/Platform/Screen.h index de9d54555..c203c53ef 100644 --- a/src/Magnum/Platform/Screen.h +++ b/src/Magnum/Platform/Screen.h @@ -82,16 +82,16 @@ template class BasicScreen: private Containers::LinkedListIte /** * Draw event. * - * When enabled, drawEvent() is propagated to this screen. + * When enabled, @ref drawEvent() is propagated to this screen. */ Draw = 1 << 0, /** * Input events. * - * When enabled, keyPressEvent(), keyReleaseEvent(), mousePressEvent(), - * mouseReleaseEvent() and mouseMoveEvent() are propagated to this - * screen. + * When enabled, @ref keyPressEvent(), @ref keyReleaseEvent(), + * @ref mousePressEvent(), @ref mouseReleaseEvent() and + * @ref mouseMoveEvent() are propagated to this screen. */ Input = 1 << 1 }; diff --git a/src/Magnum/Platform/ScreenedApplication.h b/src/Magnum/Platform/ScreenedApplication.h index 806b9e0d1..0ab66a5e8 100644 --- a/src/Magnum/Platform/ScreenedApplication.h +++ b/src/Magnum/Platform/ScreenedApplication.h @@ -94,10 +94,26 @@ template class BasicScreenedApplication: public Application, friend class BasicScreen; public: - /** @copydoc Sdl2Application::Sdl2Application(const Arguments, const Configuration&) */ + /** + * @brief Default constructor + * @param arguments Application arguments + * @param configuration %Configuration + * + * Creates application with default or user-specified configuration. + * See @ref Sdl2Application::Configuration "Configuration" for more + * information. The program exits if the context cannot be created, see + * below for an alternative. + */ explicit BasicScreenedApplication(const typename Application::Arguments& arguments, const typename Application::Configuration& configuration = Application::Configuration()); - /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, std::nullptr_t) */ + /** + * @brief Constructor + * @param arguments Application arguments + * + * Unlike above, the context is not created and must be created later + * with @ref Sdl2Application::createContext() "createContext()" or + * @ref Sdl2Application::tryCreateContext() "tryCreateContext()". + */ explicit BasicScreenedApplication(const typename Application::Arguments& arguments, std::nullptr_t); /** diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index cf445465e..869921232 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::Sdl2Application + * @brief Class @ref Magnum::Platform::Sdl2Application, macro @ref MAGNUM_SDL2APPLICATION_MAIN() */ #include @@ -64,10 +64,10 @@ on **SDL2** library (Emscripten has it built in) and is built if ## Bootstrap application Fully contained base application using @ref Sdl2Application along with -CMake setup is available in `base-sdl2` branch of +CMake setup is available in `base` branch of [Magnum Bootstrap](https://github.com/mosra/magnum-bootstrap) repository, -download it as [tar.gz](https://github.com/mosra/magnum-bootstrap/archive/base-sdl2.tar.gz) -or [zip](https://github.com/mosra/magnum-bootstrap/archive/base-sdl2.zip) file. +download it as [tar.gz](https://github.com/mosra/magnum-bootstrap/archive/base.tar.gz) +or [zip](https://github.com/mosra/magnum-bootstrap/archive/base.zip) file. After extracting the downloaded archive you can build and run the application with these four commands: @@ -425,10 +425,10 @@ class Sdl2Application::Configuration { public: #ifndef CORRADE_TARGET_EMSCRIPTEN /** - * @brief Context flag + * @brief %Context flag * * @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". - * @see @ref Flags @ref setFlags() + * @see @ref Flags, @ref setFlags() * @todo re-enable when Emscripten has proper SDL2 support */ enum class Flag: int { @@ -439,7 +439,7 @@ class Sdl2Application::Configuration { }; /** - * @brief Context flags + * @brief %Context flags * * @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". * @see @ref setFlags() @@ -539,7 +539,7 @@ class Sdl2Application::Configuration { #ifndef CORRADE_TARGET_EMSCRIPTEN /** - * @brief Context flags + * @brief %Context flags * * @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". */ @@ -558,7 +558,7 @@ class Sdl2Application::Configuration { } /** - * @brief Context version + * @brief %Context version * * @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". */ diff --git a/src/Magnum/Platform/WindowlessGlxApplication.h b/src/Magnum/Platform/WindowlessGlxApplication.h index dec4e21e6..90d183d0f 100644 --- a/src/Magnum/Platform/WindowlessGlxApplication.h +++ b/src/Magnum/Platform/WindowlessGlxApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::WindowlessGlxApplication + * @brief Class @ref Magnum::Platform::WindowlessGlxApplication, macro @ref MAGNUM_WINDOWLESSGLXAPPLICATION_MAIN() */ #include "Magnum/OpenGL.h" diff --git a/src/Magnum/Platform/WindowlessNaClApplication.h b/src/Magnum/Platform/WindowlessNaClApplication.h index 8b2320850..a241a8dbd 100644 --- a/src/Magnum/Platform/WindowlessNaClApplication.h +++ b/src/Magnum/Platform/WindowlessNaClApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::WindowlessNaClApplication + * @brief Class @ref Magnum::Platform::WindowlessNaClApplication, macro @ref MAGNUM_WINDOWLESSNACLAPPLICATION_MAIN() */ #include @@ -204,7 +204,7 @@ namespace Implementation { /** @hideinitializer @brief Entry point for windowless NaCl application -@param application Application class name +@param className Class name See @ref Magnum::Platform::WindowlessNaClApplication "Platform::WindowlessNaClApplication" for usage information. This macro abstracts out platform-specific entry point @@ -214,11 +214,11 @@ application header is included this macro is also aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. */ /* look at that insane placement of __attribute__. WTF. */ -#define MAGNUM_WINDOWLESSNACLAPPLICATION_MAIN(application) \ +#define MAGNUM_WINDOWLESSNACLAPPLICATION_MAIN(className) \ namespace pp { \ Module __attribute__ ((visibility ("default"))) * CreateModule(); \ Module __attribute__ ((visibility ("default"))) * CreateModule() { \ - return new Magnum::Platform::Implementation::WindowlessNaClModule(); \ + return new Magnum::Platform::Implementation::WindowlessNaClModule(); \ } \ } diff --git a/src/Magnum/Platform/WindowlessWglApplication.h b/src/Magnum/Platform/WindowlessWglApplication.h index c3623b901..b151f1180 100644 --- a/src/Magnum/Platform/WindowlessWglApplication.h +++ b/src/Magnum/Platform/WindowlessWglApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::WindowlessWglApplication + * @brief Class @ref Magnum::Platform::WindowlessWglApplication, macro @ref MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN() */ #include "Magnum/OpenGL.h" diff --git a/src/Magnum/Platform/XEglApplication.h b/src/Magnum/Platform/XEglApplication.h index e930b313b..ee9d7546e 100644 --- a/src/Magnum/Platform/XEglApplication.h +++ b/src/Magnum/Platform/XEglApplication.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Platform::XEglApplication + * @brief Class @ref Magnum::Platform::XEglApplication, macro @ref MAGNUM_XEGLAPPLICATION_MAIN() */ #include "Magnum/Platform/Platform.h" @@ -76,7 +76,18 @@ to simplify porting. */ class XEglApplication: public AbstractXApplication { public: - /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, const Configuration&) */ + /** + * @brief Default constructor + * @param arguments Application arguments + * @param configuration %Configuration + * + * Creates application with default or user-specified configuration. + * See @ref AbstractXApplication::Configuration "Configuration" for + * more information. The program exits if the context cannot be + * created, see below for an alternative. + * @todoc make this copydoc from Sdl2Application when Doxygen is able + * to find Configuration subclass + */ explicit XEglApplication(const Arguments& arguments, const Configuration& configuration = Configuration()); /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, std::nullptr_t) */ From 7fd9e70b78581c8ced4387b28dd44fa1d8d8633e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 18:17:53 +0200 Subject: [PATCH 11/47] Primitives: completed documentation review. --- src/Magnum/Primitives/Capsule.h | 2 +- src/Magnum/Primitives/Circle.h | 4 ++-- src/Magnum/Primitives/Crosshair.h | 2 +- src/Magnum/Primitives/Cube.h | 2 +- src/Magnum/Primitives/Cylinder.h | 12 ++++++++---- src/Magnum/Primitives/Icosphere.h | 2 +- src/Magnum/Primitives/Line.h | 2 +- src/Magnum/Primitives/Plane.h | 2 +- src/Magnum/Primitives/Square.h | 2 +- src/Magnum/Primitives/UVSphere.h | 2 +- 10 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/Magnum/Primitives/Capsule.h b/src/Magnum/Primitives/Capsule.h index 15466542f..ecaff322f 100644 --- a/src/Magnum/Primitives/Capsule.h +++ b/src/Magnum/Primitives/Capsule.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Capsule + * @brief Class @ref Magnum::Primitives::Capsule2D, @ref Magnum::Primitives::Capsule3D */ #include "Magnum/Primitives/visibility.h" diff --git a/src/Magnum/Primitives/Circle.h b/src/Magnum/Primitives/Circle.h index c46cdca4c..d6afd9b34 100644 --- a/src/Magnum/Primitives/Circle.h +++ b/src/Magnum/Primitives/Circle.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Circle + * @brief Class @ref Magnum::Primitives::Circle */ #include "Magnum/Primitives/visibility.h" @@ -37,7 +37,7 @@ namespace Magnum { namespace Primitives { /** @brief 2D circle primitive -Circle with radius `1`. +%Circle with radius `1`. */ class MAGNUM_PRIMITIVES_EXPORT Circle { public: diff --git a/src/Magnum/Primitives/Crosshair.h b/src/Magnum/Primitives/Crosshair.h index 66f469c7a..91ff5b6da 100644 --- a/src/Magnum/Primitives/Crosshair.h +++ b/src/Magnum/Primitives/Crosshair.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Crosshair2D, Magnum::Primitives::Crosshair3D + * @brief Class @ref Magnum::Primitives::Crosshair2D, @ref Magnum::Primitives::Crosshair3D */ #include "Magnum/Primitives/visibility.h" diff --git a/src/Magnum/Primitives/Cube.h b/src/Magnum/Primitives/Cube.h index d929e755e..25e7bd44e 100644 --- a/src/Magnum/Primitives/Cube.h +++ b/src/Magnum/Primitives/Cube.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Cube + * @brief Class @ref Magnum::Primitives::Cube */ #include "Magnum/Primitives/visibility.h" diff --git a/src/Magnum/Primitives/Cylinder.h b/src/Magnum/Primitives/Cylinder.h index 58a15bebd..dcae34469 100644 --- a/src/Magnum/Primitives/Cylinder.h +++ b/src/Magnum/Primitives/Cylinder.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Cylinder + * @brief Class @ref Magnum::Primitives::Cylinder */ #include @@ -45,16 +45,20 @@ namespace Magnum { namespace Primitives { class MAGNUM_PRIMITIVES_EXPORT Cylinder { public: /** - * @brief %Flags + * @brief %Flag * - * @see Flags, Cylinder() + * @see @ref Flags, @ref solid(), @ref wireframe() */ enum class Flag { GenerateTextureCoords = 1, /**< @brief Generate texture coordinates */ CapEnds /**< @brief Cap ends */ }; - /** @brief %Flags */ + /** + * @brief %Flags + * + * @see @ref solid(), @ref wireframe() + */ typedef Containers::EnumSet Flags; /** diff --git a/src/Magnum/Primitives/Icosphere.h b/src/Magnum/Primitives/Icosphere.h index f39fccdf1..f8e19d469 100644 --- a/src/Magnum/Primitives/Icosphere.h +++ b/src/Magnum/Primitives/Icosphere.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Icosphere + * @brief Class @ref Magnum::Primitives::Icosphere */ #include "Magnum/Primitives/visibility.h" diff --git a/src/Magnum/Primitives/Line.h b/src/Magnum/Primitives/Line.h index 65e7cd7b6..9917ce5e6 100644 --- a/src/Magnum/Primitives/Line.h +++ b/src/Magnum/Primitives/Line.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Line2D, Magnum::Primitives::Line3D + * @brief Class @ref Magnum::Primitives::Line2D, @ref Magnum::Primitives::Line3D */ #include "Magnum/Primitives/visibility.h" diff --git a/src/Magnum/Primitives/Plane.h b/src/Magnum/Primitives/Plane.h index 9ef48429e..eacd0312e 100644 --- a/src/Magnum/Primitives/Plane.h +++ b/src/Magnum/Primitives/Plane.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Plane + * @brief Class @ref Magnum::Primitives::Plane */ #include "Magnum/Trade/Trade.h" diff --git a/src/Magnum/Primitives/Square.h b/src/Magnum/Primitives/Square.h index 5d7160645..3127c4ee6 100644 --- a/src/Magnum/Primitives/Square.h +++ b/src/Magnum/Primitives/Square.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::Square + * @brief Class @ref Magnum::Primitives::Square */ #include "Magnum/Primitives/visibility.h" diff --git a/src/Magnum/Primitives/UVSphere.h b/src/Magnum/Primitives/UVSphere.h index 749967e25..b61cc1874 100644 --- a/src/Magnum/Primitives/UVSphere.h +++ b/src/Magnum/Primitives/UVSphere.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Primitives::UVSphere + * @brief Class @ref Magnum::Primitives::UVSphere */ #include "Magnum/Trade/Trade.h" From 174bbc9e4b7ed0104ac07482c9becf622292cbf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 18:23:27 +0200 Subject: [PATCH 12/47] SceneGraph: completed documentation review. Worked around all Doxygen issues (they were for deprecated functionality only, so shouldn't be much of a problem anyway). --- src/Magnum/SceneGraph/AbstractCamera.h | 2 +- src/Magnum/SceneGraph/AbstractObject.h | 5 ++-- src/Magnum/SceneGraph/AbstractTranslation.h | 3 +- .../AbstractTranslationRotation2D.h | 4 ++- .../AbstractTranslationRotation3D.h | 11 +++++--- .../AbstractTranslationRotationScaling2D.h | 4 ++- .../AbstractTranslationRotationScaling3D.h | 4 ++- src/Magnum/SceneGraph/Animable.h | 12 ++++---- .../SceneGraph/DualComplexTransformation.h | 2 +- .../SceneGraph/DualQuaternionTransformation.h | 2 +- .../SceneGraph/MatrixTransformation2D.h | 2 +- .../SceneGraph/MatrixTransformation3D.h | 2 +- src/Magnum/SceneGraph/Object.h | 28 +++++++++++-------- .../SceneGraph/RigidMatrixTransformation2D.h | 11 +++++--- .../SceneGraph/RigidMatrixTransformation3D.h | 14 ++++++---- .../SceneGraph/TranslationTransformation.h | 2 +- 16 files changed, 64 insertions(+), 44 deletions(-) diff --git a/src/Magnum/SceneGraph/AbstractCamera.h b/src/Magnum/SceneGraph/AbstractCamera.h index 737912b44..9a6467b37 100644 --- a/src/Magnum/SceneGraph/AbstractCamera.h +++ b/src/Magnum/SceneGraph/AbstractCamera.h @@ -136,7 +136,7 @@ template class AbstractCamera: public AbstractF protected: /** * @brief Constructor - * @param object Object holding the camera + * @param object %Object holding the camera */ explicit AbstractCamera(AbstractObject& object); diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index e6a77c132..cbb29d74d 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -161,9 +161,8 @@ template class AbstractObject #ifdef MAGNUM_BUILD_DEPRECATED /** - * @copybrief transformationMatrices(const std::vector>>&, const MatrixType&) - * @deprecated Use @ref Magnum::SceneGraph::AbstractObject::transformationMatrices(const std::vector>>&, const MatrixType&) "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. - * @todoc The `ref` works when `const` is added, but then the quoted thing is not taken as a part of the reference. The `copybrief` doesn't parse the `const` at all. Doxygen I hate you. + * @copybrief transformationMatrices() + * @deprecated Use @ref Magnum::SceneGraph::AbstractObject::transformationMatrices() "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. */ CORRADE_DEPRECATED("use transformationMatrices(const std::vector>>&, const MatrixType&) instead") std::vector transformationMatrices(const std::vector*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const; diff --git a/src/Magnum/SceneGraph/AbstractTranslation.h b/src/Magnum/SceneGraph/AbstractTranslation.h index b7aff465b..4ccf433d8 100644 --- a/src/Magnum/SceneGraph/AbstractTranslation.h +++ b/src/Magnum/SceneGraph/AbstractTranslation.h @@ -43,7 +43,8 @@ transformation matrix, but it's possible to store translation in e.g. integral coordinates while having floating-point transformation matrix. @see @ref AbstractBasicTranslation2D, @ref AbstractBasicTranslation3D, - @ref AbstractTranslation2D, @ref AbstractTranslation3D, @ref scenegraph + @ref AbstractTranslation2D, @ref AbstractTranslation3D, @ref scenegraph, + @ref TranslationTransformation */ #ifdef DOXYGEN_GENERATING_OUTPUT template diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h b/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h index 91db68c0c..8064916d9 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotation2D.h @@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for two-dimensional scenes supporting translation and rotation -@see @ref AbstractTranslationRotation2D, @ref scenegraph, @ref AbstractBasicTranslationRotation3D +@see @ref AbstractTranslationRotation2D, @ref scenegraph, + @ref AbstractBasicTranslationRotation3D, + @ref BasicRigidMatrixTransformation2D, @ref BasicDualComplexTransformation @todo Use AbstractBasicTransformation2D when support for GCC 4.6 is dropped */ template class AbstractBasicTranslationRotation2D: public AbstractTranslation<2, T> { diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h b/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h index e03d9b3b9..58afc7e47 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotation3D.h @@ -36,7 +36,10 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for three-dimensional scenes supporting translation and rotation -@see @ref AbstractTranslationRotation3D @ref scenegraph, @ref AbstractBasicTranslationRotation2D +@see @ref AbstractTranslationRotation3D @ref scenegraph, + @ref AbstractBasicTranslationRotation2D, + @ref BasicRigidMatrixTransformation3D, + @ref BasicDualQuaternionTransformation @todo Use AbstractBasicTransformation3D when support for GCC 4.6 is dropped */ template class AbstractBasicTranslationRotation3D: public AbstractTranslation<3, T> { @@ -66,7 +69,7 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::xAxis())`, see subclasses for more + * `rotate(angle, %Vector3::xAxis())`, see subclasses for more * information. */ AbstractBasicTranslationRotation3D& rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -81,7 +84,7 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::yAxis())`, see subclasses for more + * `rotate(angle, %Vector3::yAxis())`, see subclasses for more * information. */ AbstractBasicTranslationRotation3D& rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -96,7 +99,7 @@ template class AbstractBasicTranslationRotation3D: public AbstractTrans * @return Reference to self (for method chaining) * * In some implementations faster than calling - * `rotate(angle, Vector3::zAxis())`, see subclasses for more + * `rotate(angle, %Vector3::zAxis())`, see subclasses for more * information. */ AbstractBasicTranslationRotation3D& rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) { diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h index 1d3d988d8..38d3022db 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling2D.h @@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for two-dimensional scenes supporting translation, rotation and scaling -@see @ref AbstractTranslationRotationScaling2D, @ref scenegraph, @ref AbstractBasicTranslationRotationScaling2D +@see @ref AbstractTranslationRotationScaling2D, @ref scenegraph, + @ref AbstractBasicTranslationRotationScaling2D, + @ref BasicMatrixTransformation2D */ template class AbstractBasicTranslationRotationScaling2D: public AbstractBasicTranslationRotation2D { public: diff --git a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h index 80e1bf0ef..f87c1167d 100644 --- a/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h +++ b/src/Magnum/SceneGraph/AbstractTranslationRotationScaling3D.h @@ -36,7 +36,9 @@ namespace Magnum { namespace SceneGraph { /** @brief Base transformation for three-dimensional scenes supporting translation, rotation and scaling -@see @ref AbstractTranslationRotationScaling3D, @ref scenegraph, @ref AbstractBasicTranslationRotationScaling2D +@see @ref AbstractTranslationRotationScaling3D, @ref scenegraph, + @ref AbstractBasicTranslationRotationScaling2D, + @ref BasicMatrixTransformation3D */ template class AbstractBasicTranslationRotationScaling3D: public AbstractBasicTranslationRotation3D { public: diff --git a/src/Magnum/SceneGraph/Animable.h b/src/Magnum/SceneGraph/Animable.h index e0f490b69..67482e468 100644 --- a/src/Magnum/SceneGraph/Animable.h +++ b/src/Magnum/SceneGraph/Animable.h @@ -56,7 +56,7 @@ enum class AnimationState: UnsignedByte { Running }; -/** @debugoperator{Magnum::SceneGraph::Animable} */ +/** @debugoperatorenum{Magnum::SceneGraph::AnimationState} */ Debug MAGNUM_SCENEGRAPH_EXPORT operator<<(Debug debug, AnimationState value); /** @@ -68,9 +68,9 @@ Adds animation feature to object. Each %Animable is part of some @section Animable-usage Usage First thing is to add @ref Animable feature to some object and implement -animationStep(). You can do it conveniently using multiple inheritance (see -@ref scenegraph-features for introduction). Override @ref animationStep() to -implement your animation, the function provides both absolute animation +@ref animationStep(). You can do it conveniently using multiple inheritance +(see @ref scenegraph-features for introduction). Override @ref animationStep() +to implement your animation, the function provides both absolute animation time and time delta. Example: @code typedef SceneGraph::Object Object3D; @@ -92,8 +92,8 @@ class AnimableObject: public Object3D, SceneGraph::Animable3D { Then add the object to your scene and some animation group. You can also use @ref AnimableGroup::add() and @ref AnimableGroup::remove() instead of passing the group in the constructor. The animation is initially in stopped state and -without repeat, see @ref setState(), @ref setRepeated() and @ref setRepeatCount() -for more information. +without repeat, see @ref setState(), @ref setRepeated() and +@ref setRepeatCount() for more information. @code Scene3D scene; SceneGraph::AnimableGroup3D animables; diff --git a/src/Magnum/SceneGraph/DualComplexTransformation.h b/src/Magnum/SceneGraph/DualComplexTransformation.h index 974c29cb2..4167ab0cd 100644 --- a/src/Magnum/SceneGraph/DualComplexTransformation.h +++ b/src/Magnum/SceneGraph/DualComplexTransformation.h @@ -48,7 +48,7 @@ template class BasicDualComplexTransformation: public AbstractBasicTran /** @brief Underlying transformation type */ typedef Math::DualComplex DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::DualComplex transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/DualQuaternionTransformation.h b/src/Magnum/SceneGraph/DualQuaternionTransformation.h index d424ae0f8..69d75261b 100644 --- a/src/Magnum/SceneGraph/DualQuaternionTransformation.h +++ b/src/Magnum/SceneGraph/DualQuaternionTransformation.h @@ -48,7 +48,7 @@ template class BasicDualQuaternionTransformation: public AbstractBasicT /** @brief Underlying transformation type */ typedef Math::DualQuaternion DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::DualQuaternion transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/MatrixTransformation2D.h b/src/Magnum/SceneGraph/MatrixTransformation2D.h index 5401736ef..8aa30e7ad 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation2D.h @@ -47,7 +47,7 @@ template class BasicMatrixTransformation2D: public AbstractBasicTransla /** @brief Underlying transformation type */ typedef Math::Matrix3 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix3 transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/MatrixTransformation3D.h b/src/Magnum/SceneGraph/MatrixTransformation3D.h index 970ed0bfe..b5b67c84f 100644 --- a/src/Magnum/SceneGraph/MatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/MatrixTransformation3D.h @@ -46,7 +46,7 @@ template class BasicMatrixTransformation3D: public AbstractBasicTransla /** @brief Underlying transformation type */ typedef Math::Matrix4 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix4 transformation() const { return _transformation; } /** diff --git a/src/Magnum/SceneGraph/Object.h b/src/Magnum/SceneGraph/Object.h index d40f3d97b..86d5f560e 100644 --- a/src/Magnum/SceneGraph/Object.h +++ b/src/Magnum/SceneGraph/Object.h @@ -104,13 +104,6 @@ template class Object: public AbstractObject>; friend class Containers::LinkedListItem, Object>; - #ifndef DOXYGEN_GENERATING_OUTPUT - Object(const Object&) = delete; - Object(Object&&) = delete; - Object& operator=(const Object&) = delete; - Object& operator=(Object&&) = delete; - #endif - public: /** @brief Matrix type */ typedef typename DimensionTraits::MatrixType MatrixType; @@ -121,6 +114,12 @@ template class Object: public AbstractObject* parent = nullptr); + /** @brief Copying is not allowed */ + Object(const Object&) = delete; + + /** @brief Moving is not allowed */ + Object(Object&&) = delete; + /** * @brief Destructor * @@ -129,6 +128,12 @@ template class Object: public AbstractObject& operator=(const Object&) = delete; + + /** @brief Moving is not allowed */ + Object& operator=(Object&&) = delete; + /** * @{ @name Scene hierarchy * @@ -253,9 +258,8 @@ template class Object: public AbstractObject>>&, const MatrixType&) - * @deprecated Use @ref Magnum::SceneGraph::Object::transformationMatrices(const std::vector>>&, const MatrixType&) "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. - * @todoc fix this when Doxygen is sane (see this function in AbstractObject) + * @copybrief transformationMatrices() + * @deprecated Use @ref Magnum::SceneGraph::Object::transformationMatrices() "transformationMatrices(const std::vector>>&, const MatrixType&)" instead. */ CORRADE_DEPRECATED("use transformationMatrices(const std::vector>>&, const MatrixType&) instead") std::vector transformationMatrices(const std::vector*>& objects, const MatrixType& initialTransformationMatrix = MatrixType()) const; @@ -282,8 +286,8 @@ template class Object: public AbstractObject>>, const typename Transformation::DataType&) - * @deprecated Use @ref Magnum::SceneGraph::Object::transformations(std::vector>>, const typename Transformation::DataType&) "transformations(std::vector>>, const typename Transformation::DataType&)" instead. + * @copybrief transformations() + * @deprecated Use @ref Magnum::SceneGraph::Object::transformations() "transformations(std::vector>>, const typename Transformation::DataType&)" instead. * @todoc fix this when Doxygen is sane (see related function in AbstractObject) */ CORRADE_DEPRECATED("use transformations(std::vector>>, const typename Transformation::DataType&) instead") std::vector transformations(const std::vector*>& objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const; diff --git a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h index f34a0de5e..1fb94148e 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation2D.h @@ -51,7 +51,7 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr /** @brief Underlying transformation type */ typedef Math::Matrix3 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix3 transformation() const { return _transformation; } /** @@ -105,7 +105,8 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr /** * @copydoc AbstractTranslationRotationScaling2D::translate() - * Same as calling @ref transform() with @ref Math::Matrix3::translation(). + * Same as calling @ref transform() with + * @ref Math::Matrix3::translation(). */ Object>& translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix3::translation(vector), type); @@ -117,7 +118,8 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix3::rotation(). + * Same as calling @ref transform() with + * @ref Math::Matrix3::rotation(). * @see @ref normalizeRotation() */ Object>& rotate(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -131,7 +133,8 @@ template class BasicRigidMatrixTransformation2D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix3::reflection(). + * Same as calling @ref transform() with + * @ref Math::Matrix3::reflection(). */ Object>& reflect(const Math::Vector2& normal, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix3::reflection(normal), type); diff --git a/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h b/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h index a96b6ecb9..1fb75fc20 100644 --- a/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h +++ b/src/Magnum/SceneGraph/RigidMatrixTransformation3D.h @@ -50,7 +50,7 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr /** @brief Underlying transformation type */ typedef Math::Matrix4 DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ Math::Matrix4 transformation() const { return _transformation; } /** @@ -131,7 +131,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::rotationX(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::rotationX(). * @see @ref normalizeRotation() */ Object>& rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -144,7 +145,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::rotationY(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::rotationY(). * @see @ref normalizeRotation() */ Object>& rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -157,7 +159,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::rotationZ(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::rotationZ(). * @see @ref normalizeRotation() */ Object>& rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) { @@ -171,7 +174,8 @@ template class BasicRigidMatrixTransformation3D: public AbstractBasicTr * @param type Transformation type * @return Reference to self (for method chaining) * - * Same as calling @ref transform() with @ref Math::Matrix4::reflection(). + * Same as calling @ref transform() with + * @ref Math::Matrix4::reflection(). */ Object>& reflect(const Math::Vector3& normal, TransformationType type = TransformationType::Global) { return transformInternal(Math::Matrix4::reflection(normal), type); diff --git a/src/Magnum/SceneGraph/TranslationTransformation.h b/src/Magnum/SceneGraph/TranslationTransformation.h index db07491e4..600ef2d57 100644 --- a/src/Magnum/SceneGraph/TranslationTransformation.h +++ b/src/Magnum/SceneGraph/TranslationTransformation.h @@ -62,7 +62,7 @@ class TranslationTransformation: public AbstractTranslation::VectorType DataType; - /** @brief Object transformation */ + /** @brief %Object transformation */ typename DimensionTraits::VectorType transformation() const { return _transformation; } /** From 0d7dd09ae8f51995e701731102849d444c10966c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 18:47:28 +0200 Subject: [PATCH 13/47] Shaders: completed documentation review. --- src/Magnum/Shaders/AbstractVector.h | 4 ++-- src/Magnum/Shaders/Flat.h | 10 +++++----- src/Magnum/Shaders/Phong.h | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Magnum/Shaders/AbstractVector.h b/src/Magnum/Shaders/AbstractVector.h index 4c1fc5399..e50aedb04 100644 --- a/src/Magnum/Shaders/AbstractVector.h +++ b/src/Magnum/Shaders/AbstractVector.h @@ -43,13 +43,13 @@ template class AbstractVector: public AbstractShaderProg /** @brief Vertex position */ typedef typename Generic::Position Position; - /** @brief Texture coordinates */ + /** @brief %Texture coordinates */ typedef typename Generic::TextureCoordinates TextureCoordinates; #ifdef MAGNUM_BUILD_DEPRECATED enum: Int { /** - * Vector texture binding unit + * %Vector texture binding unit * @deprecated Use @ref Magnum::Shaders::AbstractVector::setVectorTexture() "setVectorTexture()" instead. */ VectorTextureLayer = 16 diff --git a/src/Magnum/Shaders/Flat.h b/src/Magnum/Shaders/Flat.h index f4cdde677..8b1c687e3 100644 --- a/src/Magnum/Shaders/Flat.h +++ b/src/Magnum/Shaders/Flat.h @@ -65,7 +65,7 @@ template class MAGNUM_SHADERS_EXPORT Flat: public Abstra typedef typename Generic::Position Position; /** - * @brief Texture coordinates + * @brief %Texture coordinates * * Used only if @ref Flag::Textured is set. */ @@ -84,7 +84,7 @@ template class MAGNUM_SHADERS_EXPORT Flat: public Abstra #ifdef DOXYGEN_GENERATING_OUTPUT /** - * @brief Shader flag + * @brief %Flag * * @see @ref Flags, @ref flags() */ @@ -93,7 +93,7 @@ template class MAGNUM_SHADERS_EXPORT Flat: public Abstra }; /** - * @brief Shader flags + * @brief %Flags * * @see @ref flags() */ @@ -105,11 +105,11 @@ template class MAGNUM_SHADERS_EXPORT Flat: public Abstra /** * @brief Constructor - * @param flags Shader flags + * @param flags %Flags */ explicit Flat(Flags flags = Flags()); - /** @brief Shader flags */ + /** @brief %Flags */ Flags flags() const { return _flags; } /** diff --git a/src/Magnum/Shaders/Phong.h b/src/Magnum/Shaders/Phong.h index 902496ca7..44a2799ac 100644 --- a/src/Magnum/Shaders/Phong.h +++ b/src/Magnum/Shaders/Phong.h @@ -55,7 +55,7 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram { typedef Generic3D::Normal Normal; /**< @brief Normal direction */ /** - * @brief Texture coordinates + * @brief %Texture coordinates * * Used only if one of @ref Flag::AmbientTexture, @ref Flag::DiffuseTexture * or @ref Flag::SpecularTexture is set. @@ -91,7 +91,7 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram { #endif /** - * @brief Shader flag + * @brief %Flag * * @see @ref Flags, @ref flags() */ @@ -102,7 +102,7 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram { }; /** - * @brief Shader flags + * @brief %Flags * * @see @ref flags() */ @@ -110,11 +110,11 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram { /** * @brief Constructor - * @param flags Shader flags + * @param flags %Flags */ explicit Phong(Flags flags = Flags()); - /** @brief Shader flags */ + /** @brief %Flags */ Flags flags() const { return _flags; } /** From 9256b704cef5cdf6c0f1267083789f57ab1fc9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 18:59:21 +0200 Subject: [PATCH 14/47] Shapes: completed documentation review. --- src/Magnum/Shapes/AbstractShape.h | 8 ++++---- src/Magnum/Shapes/Collision.h | 1 + src/Magnum/Shapes/Composition.h | 14 +++++++------- src/Magnum/Shapes/Line.h | 2 +- src/Magnum/Shapes/Shape.h | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/Magnum/Shapes/AbstractShape.h b/src/Magnum/Shapes/AbstractShape.h index 50c1c5303..e8cb510ef 100644 --- a/src/Magnum/Shapes/AbstractShape.h +++ b/src/Magnum/Shapes/AbstractShape.h @@ -58,7 +58,7 @@ template class MAGNUM_SHAPES_EXPORT AbstractShape: publi Dimensions = dimensions /**< Dimension count */ }; - /** @brief Shape type */ + /** @brief %Shape type */ #ifdef DOXYGEN_GENERATING_OUTPUT enum class Type { Point, /**< Point */ @@ -83,14 +83,14 @@ template class MAGNUM_SHAPES_EXPORT AbstractShape: publi explicit AbstractShape(SceneGraph::AbstractObject& object, ShapeGroup* group = nullptr); /** - * @brief Shape group containing this shape + * @brief %Shape group containing this shape * * If the shape doesn't belong to any group, returns `nullptr`. */ ShapeGroup* group(); const ShapeGroup* group() const; /**< @overload */ - /** @brief Shape type */ + /** @brief %Shape type */ Type type() const; /** @@ -101,7 +101,7 @@ template class MAGNUM_SHAPES_EXPORT AbstractShape: publi bool collides(const AbstractShape& other) const; /** - * @brief Collision with other shape + * @brief %Collision with other shape * * Default implementation returns empty collision. */ diff --git a/src/Magnum/Shapes/Collision.h b/src/Magnum/Shapes/Collision.h index 74f2f9d88..cba6175be 100644 --- a/src/Magnum/Shapes/Collision.h +++ b/src/Magnum/Shapes/Collision.h @@ -98,6 +98,7 @@ template class Collision { * @brief Separation distance * * @see @ref separationNormal(), operator bool() + * @todoc explicit reference when Doxygen can do it for operator bool */ Float separationDistance() const { return _separationDistance; diff --git a/src/Magnum/Shapes/Composition.h b/src/Magnum/Shapes/Composition.h index a81fa02ad..c22de86fc 100644 --- a/src/Magnum/Shapes/Composition.h +++ b/src/Magnum/Shapes/Composition.h @@ -52,7 +52,7 @@ namespace Implementation { } } -/** @brief Shape operation */ +/** @brief %Shape operation */ enum class CompositionOperation: UnsignedByte { Not, /**< Boolean NOT */ And, /**< Boolean AND */ @@ -60,7 +60,7 @@ enum class CompositionOperation: UnsignedByte { }; /** -@brief Composition of shapes +@brief %Composition of shapes Result of logical operations on shapes. See @ref shapes for brief introduction. */ @@ -74,7 +74,7 @@ template class MAGNUM_SHAPES_EXPORT Composition { Dimensions = dimensions /**< Dimension count */ }; - /** @brief Shape type */ + /** @brief %Shape type */ #ifdef DOXYGEN_GENERATING_OUTPUT enum class Type { Point, /**< Point */ @@ -137,10 +137,10 @@ template class MAGNUM_SHAPES_EXPORT Composition { /** @brief Type of shape at given position */ Type type(std::size_t i) const { return _shapes[i]->type(); } - /** @brief Shape at given position */ + /** @brief %Shape at given position */ template const T& get(std::size_t i) const; - /** @brief Collision with another shape */ + /** @brief %Collision with another shape */ #ifdef DOXYGEN_GENERATING_OUTPUT template bool operator%(const T& other) const { #else @@ -194,12 +194,12 @@ typedef Composition<2> Composition2D; typedef Composition<3> Composition3D; #ifdef DOXYGEN_GENERATING_OUTPUT -/** @debugoperator{Magnum::Shapes::Composition} */ +/** @debugoperatorclassenum{Magnum::Shapes::Composition,Magnum::Shapes::Composition::Type} */ template Debug operator<<(Debug debug, typename Composition::Type value); #endif /** @relates Composition -@brief Collision of shape with @ref Composition +@brief %Collision occurence of shape with %Composition */ #ifdef DOXYGEN_GENERATING_OUTPUT template inline bool operator%(const T& a, const Composition& b) { diff --git a/src/Magnum/Shapes/Line.h b/src/Magnum/Shapes/Line.h index 553beec0c..b000a14d5 100644 --- a/src/Magnum/Shapes/Line.h +++ b/src/Magnum/Shapes/Line.h @@ -40,7 +40,7 @@ namespace Magnum { namespace Shapes { See @ref shapes for brief introduction. @see @ref Line2D, @ref Line3D -@todo collision detection of two @ref Line2D +@todo collision detection of two Line2D */ template class MAGNUM_SHAPES_EXPORT Line { public: diff --git a/src/Magnum/Shapes/Shape.h b/src/Magnum/Shapes/Shape.h index dafa95226..bf86ee497 100644 --- a/src/Magnum/Shapes/Shape.h +++ b/src/Magnum/Shapes/Shape.h @@ -73,7 +73,7 @@ template class Shape: public AbstractShape { /** * @brief Constructor * @param object Object holding this feature - * @param shape Shape + * @param shape %Shape * @param group Group this shape belongs to */ explicit Shape(SceneGraph::AbstractObject& object, const T& shape, ShapeGroup* group = nullptr): AbstractShape(object, group) { From 834f1a034675406dc12cb261fb2e7dc07ac96f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 19:09:15 +0200 Subject: [PATCH 15/47] Text: completed documentation review. Added missing documentation and license header to deprecated header. --- src/Magnum/Text/AbstractFont.h | 17 ++++++++++----- src/Magnum/Text/AbstractFontConverter.h | 2 +- src/Magnum/Text/Alignment.h | 28 ++++++++++++------------ src/Magnum/Text/Renderer.h | 10 ++++----- src/Magnum/Text/Text.h | 2 +- src/Magnum/Text/TextRenderer.h | 29 +++++++++++++++++++++++++ 6 files changed, 62 insertions(+), 26 deletions(-) diff --git a/src/Magnum/Text/AbstractFont.h b/src/Magnum/Text/AbstractFont.h index b5cabb9ee..7b033eeda 100644 --- a/src/Magnum/Text/AbstractFont.h +++ b/src/Magnum/Text/AbstractFont.h @@ -311,14 +311,21 @@ implements @ref doRenderGlyph(). Bounds checking on @p i is done automatically in the wrapping @ref renderGlyph() function. */ class MAGNUM_TEXT_EXPORT AbstractLayouter { - AbstractLayouter(const AbstractLayouter&) = delete; - AbstractLayouter(AbstractLayouter&&) = delete; - AbstractLayouter& operator=(const AbstractLayouter&) = delete; - AbstractLayouter& operator=(const AbstractLayouter&&) = delete; - public: + /** @brief Copying is not allowed */ + AbstractLayouter(const AbstractLayouter&) = delete; + + /** @brief Moving is not allowed */ + AbstractLayouter(AbstractLayouter&&) = delete; + ~AbstractLayouter(); + /** @brief Copying is not allowed */ + AbstractLayouter& operator=(const AbstractLayouter&) = delete; + + /** @brief Moving is not allowed */ + AbstractLayouter& operator=(const AbstractLayouter&&) = delete; + /** @brief Count of glyphs in laid out text */ UnsignedInt glyphCount() const { return _glyphCount; } diff --git a/src/Magnum/Text/AbstractFontConverter.h b/src/Magnum/Text/AbstractFontConverter.h index 9a260144e..4247de6fb 100644 --- a/src/Magnum/Text/AbstractFontConverter.h +++ b/src/Magnum/Text/AbstractFontConverter.h @@ -115,7 +115,7 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl /** * @brief Features supported by this converter * - * @see features() + * @see @ref features() */ typedef Containers::EnumSet Features; diff --git a/src/Magnum/Text/Alignment.h b/src/Magnum/Text/Alignment.h index 7dcf33bf1..37c3b2144 100644 --- a/src/Magnum/Text/Alignment.h +++ b/src/Magnum/Text/Alignment.h @@ -50,77 +50,77 @@ namespace Implementation { } /** -@brief Text rendering alignment +@brief %Text rendering alignment @see @ref Renderer::render(), @ref Renderer::Renderer() */ enum class Alignment: UnsignedByte { - /** Text start and line is at origin */ + /** %Text start and line is at origin */ LineLeft = Implementation::AlignmentLine|Implementation::AlignmentLeft, /** - * Text center and line is at origin + * %Text center and line is at origin * * @see @ref Alignment::LineCenterIntegral */ LineCenter = Implementation::AlignmentLine|Implementation::AlignmentCenter, - /** Text end and line is at origin */ + /** %Text end and line is at origin */ LineRight = Implementation::AlignmentLine|Implementation::AlignmentRight, /** - * Text start and vertical middle is at origin + * %Text start and vertical middle is at origin * * @see @ref Alignment::MiddleLeftIntegral */ MiddleLeft = Implementation::AlignmentMiddle|Implementation::AlignmentLeft, /** - * Text center and vertical middle is at origin + * %Text center and vertical middle is at origin * * @see @ref Alignment::MiddleRightIntegral */ MiddleCenter = Implementation::AlignmentMiddle|Implementation::AlignmentCenter, /** - * Text end and vertical middle is at origin + * %Text end and vertical middle is at origin * * @see @ref Alignment::MiddleRightIntegral */ MiddleRight = Implementation::AlignmentMiddle|Implementation::AlignmentRight, - /** Text start and top is at origin */ + /** %Text start and top is at origin */ TopLeft = Implementation::AlignmentTop|Implementation::AlignmentLeft, - /** Text center and top is at origin */ + /** %Text center and top is at origin */ TopCenter = Implementation::AlignmentTop|Implementation::AlignmentCenter, - /** Text end and top is at origin */ + /** %Text end and top is at origin */ TopRight = Implementation::AlignmentTop|Implementation::AlignmentRight, /** - * Text center and line is at origin and alignment offset is integral + * %Text center and line is at origin and alignment offset is integral * * @see @ref Alignment::LineCenter */ LineCenterIntegral = Implementation::AlignmentLine|Implementation::AlignmentCenter|Implementation::AlignmentIntegral, /** - * Text start and vertical middle is at origin and alignment offset is integral + * %Text start and vertical middle is at origin and alignment offset is integral * * @see @ref Alignment::MiddleLeft */ MiddleLeftIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentLeft|Implementation::AlignmentIntegral, /** - * Text center and vertical middle is at origin and alignment offset is integral + * %Text center and vertical middle is at origin and alignment offset is integral * * @see @ref Alignment::MiddleCenter */ MiddleCenterIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentCenter|Implementation::AlignmentIntegral, /** - * Text end and vertical middle is at origin and alignment offset is integral + * %Text end and vertical middle is at origin and alignment offset is integral * * @see @ref Alignment::MiddleRight */ diff --git a/src/Magnum/Text/Renderer.h b/src/Magnum/Text/Renderer.h index d9bdcc6ae..f3273bda3 100644 --- a/src/Magnum/Text/Renderer.h +++ b/src/Magnum/Text/Renderer.h @@ -56,8 +56,8 @@ class MAGNUM_TEXT_EXPORT AbstractRenderer { * @param font Font * @param cache Glyph cache * @param size Font size - * @param text Text to render - * @param alignment Text alignment + * @param text %Text to render + * @param alignment %Text alignment * * Returns tuple with vertex positions, texture coordinates, indices * and rectangle spanning the rendered text. @@ -80,7 +80,7 @@ class MAGNUM_TEXT_EXPORT AbstractRenderer { /** @brief Index buffer */ Buffer& indexBuffer() { return _indexBuffer; } - /** @brief Mesh */ + /** @brief %Mesh */ Mesh& mesh() { return _mesh; } /** @@ -243,7 +243,7 @@ template class MAGNUM_TEXT_EXPORT Renderer: public Abstr * @param vertexBuffer %Buffer where to store vertices * @param indexBuffer %Buffer where to store indices * @param usage Usage of vertex and index buffer - * @param alignment Text alignment + * @param alignment %Text alignment * * Returns mesh prepared for use with @ref Shaders::AbstractVector * subclasses and rectangle spanning the rendered text. @@ -255,7 +255,7 @@ template class MAGNUM_TEXT_EXPORT Renderer: public Abstr * @param font Font * @param cache Glyph cache * @param size Font size - * @param alignment Text alignment + * @param alignment %Text alignment */ explicit Renderer(AbstractFont& font, const GlyphCache& cache, Float size, Alignment alignment = Alignment::LineLeft); Renderer(AbstractFont&, GlyphCache&&, Float, Alignment alignment = Alignment::LineLeft) = delete; /**< @overload */ diff --git a/src/Magnum/Text/Text.h b/src/Magnum/Text/Text.h index 2a0af6367..60f2a92dc 100644 --- a/src/Magnum/Text/Text.h +++ b/src/Magnum/Text/Text.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Forward declarations for Magnum::Text namespace + * @brief Forward declarations for @ref Magnum::Text namespace */ #include "Magnum/Types.h" diff --git a/src/Magnum/Text/TextRenderer.h b/src/Magnum/Text/TextRenderer.h index d92dd97b5..d302c280d 100644 --- a/src/Magnum/Text/TextRenderer.h +++ b/src/Magnum/Text/TextRenderer.h @@ -1,5 +1,34 @@ #ifndef Magnum_Text_TextRenderer_h #define Magnum_Text_TextRenderer_h +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +/** @file + * @brief Typedef @ref Magnum::Text::TextRenderer2D, @ref Magnum::Text::TextRenderer3D + * @deprecated Use @ref Renderer.h instead. + */ #include "Magnum/Text/Renderer.h" From 6ef3f72d2e82cbfae2812b38308437addbad23b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 19:12:14 +0200 Subject: [PATCH 16/47] TextureTools: completed documentation review. --- src/Magnum/TextureTools/Atlas.h | 2 +- src/Magnum/TextureTools/DistanceField.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Magnum/TextureTools/Atlas.h b/src/Magnum/TextureTools/Atlas.h index 5f0231980..57ac04e9d 100644 --- a/src/Magnum/TextureTools/Atlas.h +++ b/src/Magnum/TextureTools/Atlas.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::TextureTools::atlas() + * @brief Function @ref Magnum::TextureTools::atlas() */ #include diff --git a/src/Magnum/TextureTools/DistanceField.h b/src/Magnum/TextureTools/DistanceField.h index a85a4607a..afe353e1f 100644 --- a/src/Magnum/TextureTools/DistanceField.h +++ b/src/Magnum/TextureTools/DistanceField.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Function Magnum::TextureTools::distanceField() + * @brief Function @ref Magnum::TextureTools::distanceField() */ #ifndef MAGNUM_TARGET_GLES @@ -45,7 +45,8 @@ namespace Magnum { namespace TextureTools { @param rectangle Rectangle in output texture where to render @param radius Max lookup radius in input texture @param imageSize Input texture size. Needed only in OpenGL ES, in desktop - OpenGL the information is gathered automatically using Texture::imageSize(). + OpenGL the information is gathered automatically using + @ref Texture2D::imageSize(). Converts binary image (stored in red channel of @p input) to signed distance field (stored in red channel in @p rectangle of @p output). The purpose of this From f079e37a0fb6dd39e7839c5c922905c94cdfb48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 19:37:46 +0200 Subject: [PATCH 17/47] Trade: completed documentation review. --- src/Magnum/Trade/AbstractImageConverter.h | 26 +-- src/Magnum/Trade/AbstractImporter.h | 222 +++++++++++----------- src/Magnum/Trade/AbstractMaterialData.h | 2 +- src/Magnum/Trade/CameraData.h | 2 +- src/Magnum/Trade/LightData.h | 2 +- src/Magnum/Trade/MeshData2D.h | 12 +- src/Magnum/Trade/MeshData3D.h | 14 +- src/Magnum/Trade/MeshObjectData2D.h | 4 +- src/Magnum/Trade/MeshObjectData3D.h | 4 +- src/Magnum/Trade/ObjectData2D.h | 8 +- src/Magnum/Trade/ObjectData3D.h | 8 +- src/Magnum/Trade/PhongMaterialData.h | 2 +- src/Magnum/Trade/SceneData.h | 2 +- src/Magnum/Trade/TextureData.cpp | 2 + src/Magnum/Trade/TextureData.h | 16 +- 15 files changed, 164 insertions(+), 162 deletions(-) diff --git a/src/Magnum/Trade/AbstractImageConverter.h b/src/Magnum/Trade/AbstractImageConverter.h index 96376286e..6352b171f 100644 --- a/src/Magnum/Trade/AbstractImageConverter.h +++ b/src/Magnum/Trade/AbstractImageConverter.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::AbstractImageConverter + * @brief Class @ref Magnum::Trade::AbstractImageConverter */ #include @@ -46,9 +46,9 @@ classes in @ref Trade namespace for available image converter plugins. @section AbstractImageConverter-subclassing Subclassing -Plugin implements function doFeatures() and one or more of doExportToImage(), -doExportToData() or doExportToFile() functions based on what features are -supported. +Plugin implements function @ref doFeatures() and one or more of +@ref doExportToImage(), @ref doExportToData() or @ref doExportToFile() +functions based on what features are supported. You don't need to do most of the redundant sanity checks, these things are checked by the implementation: @@ -63,20 +63,20 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin /** * @brief Features supported by this converter * - * @see Features, features() + * @see @ref Features, @ref features() */ enum class Feature: UnsignedByte { - /** Conversion to image with different format with exportToImage() */ + /** Conversion to image with different format with @ref exportToImage() */ ConvertImage = 1 << 0, - /** Exporting to raw data with exportToData() */ + /** Exporting to raw data with @ref exportToData() */ ConvertData = 1 << 1 }; /** * @brief Features supported by this converter * - * @see features() + * @see @ref features() */ typedef Containers::EnumSet Features; @@ -111,7 +111,7 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin * @brief Export image to file * * Returns `true` on success, `false` otherwise. - * @see features(), exportToImage(), exportToData() + * @see @ref features(), @ref exportToImage(), @ref exportToData() */ bool exportToFile(const ImageReference2D& image, const std::string& filename) const; @@ -120,17 +120,17 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin #else protected: #endif - /** @brief Implementation of features() */ + /** @brief Implementation of @ref features() */ virtual Features doFeatures() const = 0; - /** @brief Implementation of exportToImage() */ + /** @brief Implementation of @ref exportToImage() */ virtual Image2D* doExportToImage(const ImageReference2D& image) const; - /** @brief Implementation of exportToData() */ + /** @brief Implementation of @ref exportToData() */ virtual Containers::Array doExportToData(const ImageReference2D& image) const; /** - * @brief Implementation of exportToFile() + * @brief Implementation of @ref exportToFile() * * If @ref Feature::ConvertData is supported, default implementation * calls @ref doExportToData() and saves the result to given file. diff --git a/src/Magnum/Trade/AbstractImporter.h b/src/Magnum/Trade/AbstractImporter.h index 4d7c78484..7bb3482c6 100644 --- a/src/Magnum/Trade/AbstractImporter.h +++ b/src/Magnum/Trade/AbstractImporter.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::AbstractImporter + * @brief Class @ref Magnum::Trade::AbstractImporter */ #include @@ -49,10 +49,10 @@ data. See @ref plugins for more information and `*Importer` classes in @section AbstractImporter-subclassing Subclassing -Plugin implements function doFeatures(), doIsOpened(), one of or both -doOpenData() and doOpenFile() functions, function doClose() and one or more -tuples of data access functions, based on which features are supported in given -format. +Plugin implements function @ref doFeatures(), @ref doIsOpened(), one of or both +@ref doOpenData() and @ref doOpenFile() functions, function @ref doClose() and +one or more tuples of data access functions, based on which features are +supported in given format. For multi-data formats file opening shouldn't take long, all parsing should be done in data parsing functions, because the user might want to import only @@ -81,10 +81,10 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { /** * @brief Features supported by this importer * - * @see Features, features() + * @see @ref Features, @ref features() */ enum class Feature: UnsignedByte { - /** Opening files from raw data using openData() */ + /** Opening files from raw data using @ref openData() */ OpenData = 1 << 0 }; @@ -109,7 +109,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * Closes previous file, if it was opened, and tries to open given * file. Available only if @ref Feature::OpenData is supported. Returns * `true` on success, `false` otherwise. - * @see features(), openFile() + * @see @ref features(), @ref openFile() */ bool openData(Containers::ArrayReference data); @@ -118,7 +118,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * * Closes previous file, if it was opened, and tries to open given * file. Returns `true` on success, `false` otherwise. - * @see features(), openData() + * @see @ref features(), @ref openData() */ bool openFile(const std::string& filename); @@ -147,21 +147,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief %Scene ID for given name * * If no scene for given name exists, returns `-1`. - * @see sceneName() + * @see @ref sceneName() */ Int sceneForName(const std::string& name); /** * @brief %Scene name - * @param id %Scene ID, from range [0, sceneCount()). + * @param id %Scene ID, from range [0, @ref sceneCount()). * - * @see sceneForName() + * @see @ref sceneForName() */ std::string sceneName(UnsignedInt id); /** * @brief %Scene - * @param id %Scene ID, from range [0, sceneCount()). + * @param id %Scene ID, from range [0, @ref sceneCount()). * * Returns given scene or `std::nullopt` if import failed. */ @@ -174,21 +174,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief %Light ID for given name * * If no light for given name exists, returns `-1`. - * @see lightName() + * @see @ref lightName() */ Int lightForName(const std::string& name); /** * @brief %Light name - * @param id %Light ID, from range [0, lightCount()). + * @param id %Light ID, from range [0, @ref lightCount()). * - * @see lightForName() + * @see @ref lightForName() */ std::string lightName(UnsignedInt id); /** * @brief %Light - * @param id %Light ID, from range [0, lightCount()). + * @param id %Light ID, from range [0, @ref lightCount()). * * Returns given light or `std::nullopt` if importing failed. */ @@ -201,21 +201,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Camera ID for given name * * If no camera for given name exists, returns `-1`. - * @see cameraName() + * @see @ref cameraName() */ Int cameraForName(const std::string& name); /** * @brief Camera name - * @param id Camera ID, from range [0, cameraCount()). + * @param id Camera ID, from range [0, @ref cameraCount()). * - * @see cameraForName() + * @see @ref cameraForName() */ std::string cameraName(UnsignedInt id); /** * @brief Camera - * @param id Camera ID, from range [0, cameraCount()). + * @param id Camera ID, from range [0, @ref cameraCount()). * * Returns given camera or `std::nullopt` if importing failed. */ @@ -228,21 +228,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Two-dimensional object ID for given name * * If no scene for given name exists, returns `-1`. - * @see object2DName() + * @see @ref object2DName() */ Int object2DForName(const std::string& name); /** * @brief Two-dimensional object name - * @param id Object ID, from range [0, object2DCount()). + * @param id Object ID, from range [0, @ref object2DCount()). * - * @see object2DForName() + * @see @ref object2DForName() */ std::string object2DName(UnsignedInt id); /** * @brief Two-dimensional object - * @param id Object ID, from range [0, object2DCount()). + * @param id Object ID, from range [0, @ref object2DCount()). * * Returns given object or `nullptr` if importing failed. */ @@ -255,21 +255,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Three-dimensional object ID for given name * * If no scene for given name exists, returns `-1`. - * @see object3DName() + * @see @ref object3DName() */ Int object3DForName(const std::string& name); /** * @brief Three-dimensional object name - * @param id Object ID, from range [0, object3DCount()). + * @param id Object ID, from range [0, @ref object3DCount()). * - * @see object3DForName() + * @see @ref object3DForName() */ std::string object3DName(UnsignedInt id); /** * @brief Three-dimensional object - * @param id Object ID, from range [0, object3DCount()). + * @param id Object ID, from range [0, @ref object3DCount()). * * Returns given object or `nullptr` if importing failed. */ @@ -282,21 +282,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Two-dimensional mesh ID for given name * * If no mesh for given name exists, returns `-1`. - * @see mesh2DName() + * @see @ref mesh2DName() */ Int mesh2DForName(const std::string& name); /** * @brief Two-dimensional mesh name - * @param id %Mesh ID, from range [0, mesh2DCount()). + * @param id %Mesh ID, from range [0, @ref mesh2DCount()). * - * @see mesh2DForName() + * @see @ref mesh2DForName() */ std::string mesh2DName(UnsignedInt id); /** * @brief Two-dimensional mesh - * @param id %Mesh ID, from range [0, mesh2DCount()). + * @param id %Mesh ID, from range [0, @ref mesh2DCount()). * * Returns given mesh or `std::nullopt` if importing failed. */ @@ -309,21 +309,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Three-dimensional mesh ID for given name * * If no mesh for given name exists, returns `-1`. - * @see mesh3DName() + * @see @ref mesh3DName() */ Int mesh3DForName(const std::string& name); /** * @brief Three-dimensional mesh name - * @param id %Mesh ID, from range [0, mesh3DCount()). + * @param id %Mesh ID, from range [0, @ref mesh3DCount()). * - * @see mesh3DForName() + * @see @ref mesh3DForName() */ std::string mesh3DName(UnsignedInt id); /** * @brief Three-dimensional mesh - * @param id %Mesh ID, from range [0, mesh3DCount()). + * @param id %Mesh ID, from range [0, @ref mesh3DCount()). * * Returns given mesh or `std::nullopt` if importing failed. */ @@ -336,21 +336,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Material ID for given name * * If no material for given name exists, returns `-1`. - * @see materialName() + * @see @ref materialName() */ Int materialForName(const std::string& name); /** * @brief Material name - * @param id Material ID, from range [0, materialCount()). + * @param id Material ID, from range [0, @ref materialCount()). * - * @see materialForName() + * @see @ref materialForName() */ std::string materialName(UnsignedInt id); /** * @brief Material - * @param id Material ID, from range [0, materialCount()). + * @param id Material ID, from range [0, @ref materialCount()). * * Returns given material or `nullptr` if importing failed. */ @@ -363,21 +363,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief %Texture ID for given name * * If no texture for given name exists, returns `-1`. - * @see textureName() + * @see @ref textureName() */ Int textureForName(const std::string& name); /** * @brief %Texture name - * @param id %Texture ID, from range [0, textureCount()). + * @param id %Texture ID, from range [0, @ref textureCount()). * - * @see textureForName() + * @see @ref textureForName() */ std::string textureName(UnsignedInt id); /** * @brief %Texture - * @param id %Texture ID, from range [0, textureCount()). + * @param id %Texture ID, from range [0, @ref textureCount()). * * Returns given texture or `std::nullopt` if importing failed. */ @@ -390,21 +390,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief One-dimensional image ID for given name * * If no image for given name exists, returns `-1`. - * @see image1Dname() + * @see @ref image1DName() */ Int image1DForName(const std::string& name); /** * @brief One-dimensional image name - * @param id %Image ID, from range [0, image1DCount()). + * @param id %Image ID, from range [0, @ref image1DCount()). * - * @see image1DForName() + * @see @ref image1DForName() */ std::string image1DName(UnsignedInt id); /** * @brief One-dimensional image - * @param id %Image ID, from range [0, image1DCount()). + * @param id %Image ID, from range [0, @ref image1DCount()). * * Returns given image or `std::nullopt` if importing failed. */ @@ -417,21 +417,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Two-dimensional image ID for given name * * If no image for given name exists, returns `-1`. - * @see image2DName() + * @see @ref image2DName() */ Int image2DForName(const std::string& name); /** * @brief Two-dimensional image name - * @param id %Image ID, from range [0, image2DCount()). + * @param id %Image ID, from range [0, @ref image2DCount()). * - * @see image2DForName() + * @see @ref image2DForName() */ std::string image2DName(UnsignedInt id); /** * @brief Two-dimensional image - * @param id %Image ID, from range [0, image2DCount()). + * @param id %Image ID, from range [0, @ref image2DCount()). * * Returns given image or `std::nullopt` if importing failed. */ @@ -444,21 +444,21 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @brief Three-dimensional image ID for given name * * If no image for given name exists, returns `-1`. - * @see image3DName() + * @see @ref image3DName() */ Int image3DForName(const std::string& name); /** * @brief Three-dimensional image name - * @param id %Image ID, from range [0, image3DCount()). + * @param id %Image ID, from range [0, @ref image3DCount()). * - * @see image3DForName() + * @see @ref image3DForName() */ std::string image3DName(UnsignedInt id); /** * @brief Three-dimensional image - * @param id %Image ID, from range [0, image3DCount()). + * @param id %Image ID, from range [0, @ref image3DCount()). * * Returns given image or `std::nullopt` if importing failed. */ @@ -471,171 +471,171 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { #else protected: #endif - /** @brief Implementation for features() */ + /** @brief Implementation for @ref features() */ virtual Features doFeatures() const = 0; - /** @brief Implementation for isOpened() */ + /** @brief Implementation for @ref isOpened() */ virtual bool doIsOpened() const = 0; - /** @brief Implementation for openData() */ + /** @brief Implementation for @ref openData() */ virtual void doOpenData(Containers::ArrayReference data); /** - * @brief Implementation for openFile() + * @brief Implementation for @ref openFile() * * If @ref Feature::OpenData is supported, default implementation opens * the file and calls @ref doOpenData() with its contents. */ virtual void doOpenFile(const std::string& filename); - /** @brief Implementation for close() */ + /** @brief Implementation for @ref close() */ virtual void doClose() = 0; - /** @brief Implementation for defaultScene() */ + /** @brief Implementation for @ref defaultScene() */ virtual Int doDefaultScene(); - /** @brief Implementation for sceneCount() */ + /** @brief Implementation for @ref sceneCount() */ virtual UnsignedInt doSceneCount() const; - /** @brief Implementation for sceneForName() */ + /** @brief Implementation for @ref sceneForName() */ virtual Int doSceneForName(const std::string& name); - /** @brief Implementation for sceneName() */ + /** @brief Implementation for @ref sceneName() */ virtual std::string doSceneName(UnsignedInt id); - /** @brief Implementation for scene() */ + /** @brief Implementation for @ref scene() */ virtual std::optional doScene(UnsignedInt id); - /** @brief Implementation for lightCount() */ + /** @brief Implementation for @ref lightCount() */ virtual UnsignedInt doLightCount() const; - /** @brief Implementation for lightForName() */ + /** @brief Implementation for @ref lightForName() */ virtual Int doLightForName(const std::string& name); - /** @brief Implementation for lightName() */ + /** @brief Implementation for @ref lightName() */ virtual std::string doLightName(UnsignedInt id); - /** @brief Implementation for light() */ + /** @brief Implementation for @ref light() */ virtual std::optional doLight(UnsignedInt id); - /** @brief Implementation for cameraCount() */ + /** @brief Implementation for @ref cameraCount() */ virtual UnsignedInt doCameraCount() const; - /** @brief Implementation for cameraForName() */ + /** @brief Implementation for @ref cameraForName() */ virtual Int doCameraForName(const std::string& name); - /** @brief Implementation for cameraName() */ + /** @brief Implementation for @ref cameraName() */ virtual std::string doCameraName(UnsignedInt id); - /** @brief Implementation for camera() */ + /** @brief Implementation for @ref camera() */ virtual std::optional doCamera(UnsignedInt id); - /** @brief Implementation for object2DCount() */ + /** @brief Implementation for @ref object2DCount() */ virtual UnsignedInt doObject2DCount() const; - /** @brief Implementation for object2DForName() */ + /** @brief Implementation for @ref object2DForName() */ virtual Int doObject2DForName(const std::string& name); - /** @brief Implementation for object2DName() */ + /** @brief Implementation for @ref object2DName() */ virtual std::string doObject2DName(UnsignedInt id); - /** @brief Implementation for object2D() */ + /** @brief Implementation for @ref object2D() */ virtual std::unique_ptr doObject2D(UnsignedInt id); - /** @brief Implementation for object3DCount() */ + /** @brief Implementation for @ref object3DCount() */ virtual UnsignedInt doObject3DCount() const; - /** @brief Implementation for object3DForName() */ + /** @brief Implementation for @ref object3DForName() */ virtual Int doObject3DForName(const std::string& name); - /** @brief Implementation for object3DName() */ + /** @brief Implementation for @ref object3DName() */ virtual std::string doObject3DName(UnsignedInt id); - /** @brief Implementation for object3D() */ + /** @brief Implementation for @ref object3D() */ virtual std::unique_ptr doObject3D(UnsignedInt id); - /** @brief Implementation for mesh2DCount() */ + /** @brief Implementation for @ref mesh2DCount() */ virtual UnsignedInt doMesh2DCount() const; - /** @brief Implementation for mesh2DForName() */ + /** @brief Implementation for @ref mesh2DForName() */ virtual Int doMesh2DForName(const std::string& name); - /** @brief Implementation for mesh2DName() */ + /** @brief Implementation for @ref mesh2DName() */ virtual std::string doMesh2DName(UnsignedInt id); - /** @brief Implementation for mesh2D() */ + /** @brief Implementation for @ref mesh2D() */ virtual std::optional doMesh2D(UnsignedInt id); - /** @brief Implementation for mesh3DCount() */ + /** @brief Implementation for @ref mesh3DCount() */ virtual UnsignedInt doMesh3DCount() const; - /** @brief Implementation for mesh3DForName() */ + /** @brief Implementation for @ref mesh3DForName() */ virtual Int doMesh3DForName(const std::string& name); - /** @brief Implementation for mesh3DName() */ + /** @brief Implementation for @ref mesh3DName() */ virtual std::string doMesh3DName(UnsignedInt id); - /** @brief Implementation for mesh3D() */ + /** @brief Implementation for @ref mesh3D() */ virtual std::optional doMesh3D(UnsignedInt id); - /** @brief Implementation for materialCount() */ + /** @brief Implementation for @ref materialCount() */ virtual UnsignedInt doMaterialCount() const; - /** @brief Implementation for materialForName() */ + /** @brief Implementation for @ref materialForName() */ virtual Int doMaterialForName(const std::string& name); - /** @brief Implementation for materialName() */ + /** @brief Implementation for @ref materialName() */ virtual std::string doMaterialName(UnsignedInt id); - /** @brief Implementation for material() */ + /** @brief Implementation for @ref material() */ virtual std::unique_ptr doMaterial(UnsignedInt id); - /** @brief Implementation for textureCount() */ + /** @brief Implementation for @ref textureCount() */ virtual UnsignedInt doTextureCount() const; - /** @brief Implementation for textureForName() */ + /** @brief Implementation for @ref textureForName() */ virtual Int doTextureForName(const std::string& name); - /** @brief Implementation for textureName() */ + /** @brief Implementation for @ref textureName() */ virtual std::string doTextureName(UnsignedInt id); - /** @brief Implementation for texture() */ + /** @brief Implementation for @ref texture() */ virtual std::optional doTexture(UnsignedInt id); - /** @brief Implementation for image1DCount() */ + /** @brief Implementation for @ref image1DCount() */ virtual UnsignedInt doImage1DCount() const; - /** @brief Implementation for image1DForName() */ + /** @brief Implementation for @ref image1DForName() */ virtual Int doImage1DForName(const std::string& name); - /** @brief Implementation for image1DName() */ + /** @brief Implementation for @ref image1DName() */ virtual std::string doImage1DName(UnsignedInt id); - /** @brief Implementation for image1D() */ + /** @brief Implementation for @ref image1D() */ virtual std::optional doImage1D(UnsignedInt id); - /** @brief Implementation for image2DCount() */ + /** @brief Implementation for @ref image2DCount() */ virtual UnsignedInt doImage2DCount() const; - /** @brief Implementation for image2DForName() */ + /** @brief Implementation for @ref image2DForName() */ virtual Int doImage2DForName(const std::string& name); - /** @brief Implementation for image2DName() */ + /** @brief Implementation for @ref image2DName() */ virtual std::string doImage2DName(UnsignedInt id); - /** @brief Implementation for image2D() */ + /** @brief Implementation for @ref image2D() */ virtual std::optional doImage2D(UnsignedInt id); - /** @brief Implementation for image3DCount() */ + /** @brief Implementation for @ref image3DCount() */ virtual UnsignedInt doImage3DCount() const; - /** @brief Implementation for image3DForName() */ + /** @brief Implementation for @ref image3DForName() */ virtual Int doImage3DForName(const std::string& name); - /** @brief Implementation for image3DName() */ + /** @brief Implementation for @ref image3DName() */ virtual std::string doImage3DName(UnsignedInt id); - /** @brief Implementation for image3D() */ + /** @brief Implementation for @ref image3D() */ virtual std::optional doImage3D(UnsignedInt id); }; diff --git a/src/Magnum/Trade/AbstractMaterialData.h b/src/Magnum/Trade/AbstractMaterialData.h index 6b960e18e..9483cc637 100644 --- a/src/Magnum/Trade/AbstractMaterialData.h +++ b/src/Magnum/Trade/AbstractMaterialData.h @@ -78,7 +78,7 @@ class MAGNUM_EXPORT AbstractMaterialData { MaterialType _type; }; -/** @debugoperator{Magnum::Trade::AbstractMaterialData} */ +/** @debugoperatorenum{Magnum::Trade::MaterialType} */ Debug MAGNUM_EXPORT operator<<(Debug debug, MaterialType value); }} diff --git a/src/Magnum/Trade/CameraData.h b/src/Magnum/Trade/CameraData.h index c87119af1..f5267bfd5 100644 --- a/src/Magnum/Trade/CameraData.h +++ b/src/Magnum/Trade/CameraData.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::CameraData + * @brief Class @ref Magnum::Trade::CameraData */ #include diff --git a/src/Magnum/Trade/LightData.h b/src/Magnum/Trade/LightData.h index 5f667c8cb..1220dae46 100644 --- a/src/Magnum/Trade/LightData.h +++ b/src/Magnum/Trade/LightData.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::LightData + * @brief Class @ref Magnum::Trade::LightData */ #include diff --git a/src/Magnum/Trade/MeshData2D.h b/src/Magnum/Trade/MeshData2D.h index decadbba6..6017e1176 100644 --- a/src/Magnum/Trade/MeshData2D.h +++ b/src/Magnum/Trade/MeshData2D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::MeshData2D + * @brief Class @ref Magnum::Trade::MeshData2D */ #include @@ -41,7 +41,7 @@ namespace Magnum { namespace Trade { Provides access to mesh data and additional information, such as primitive type. -@see MeshData3D +@see @ref MeshData3D */ class MAGNUM_EXPORT MeshData2D { public: @@ -80,7 +80,7 @@ class MAGNUM_EXPORT MeshData2D { /** * @brief Indices * - * @see isIndexed() + * @see @ref isIndexed() */ std::vector& indices(); const std::vector& indices() const; /**< @overload */ @@ -96,7 +96,7 @@ class MAGNUM_EXPORT MeshData2D { * @brief Positions * @param id Position array ID * - * @see positionArrayCount() + * @see @ref positionArrayCount() */ std::vector& positions(UnsignedInt id); const std::vector& positions(UnsignedInt id) const; /**< @overload */ @@ -109,9 +109,9 @@ class MAGNUM_EXPORT MeshData2D { /** * @brief 2D texture coordinates - * @param id Texture coordinate array ID + * @param id %Texture coordinate array ID * - * @see textureCoords2DArrayCount() + * @see @ref textureCoords2DArrayCount() */ std::vector& textureCoords2D(UnsignedInt id); const std::vector& textureCoords2D(UnsignedInt id) const; /**< @overload */ diff --git a/src/Magnum/Trade/MeshData3D.h b/src/Magnum/Trade/MeshData3D.h index 86b69c989..11cf381d4 100644 --- a/src/Magnum/Trade/MeshData3D.h +++ b/src/Magnum/Trade/MeshData3D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::MeshData3D + * @brief Class @ref Magnum::Trade::MeshData3D */ #include @@ -41,7 +41,7 @@ namespace Magnum { namespace Trade { Provides access to mesh data and additional information, such as primitive type. -@see MeshData2D +@see @ref MeshData2D */ class MAGNUM_EXPORT MeshData3D { public: @@ -81,7 +81,7 @@ class MAGNUM_EXPORT MeshData3D { /** * @brief Indices * - * @see isIndexed() + * @see @ref isIndexed() */ std::vector& indices(); const std::vector& indices() const; /**< @overload */ @@ -97,7 +97,7 @@ class MAGNUM_EXPORT MeshData3D { * @brief Positions * @param id Position array ID * - * @see positionArrayCount() + * @see @ref positionArrayCount() */ std::vector& positions(UnsignedInt id); const std::vector& positions(UnsignedInt id) const; /**< @overload */ @@ -112,7 +112,7 @@ class MAGNUM_EXPORT MeshData3D { * @brief Normals * @param id Normal array ID * - * @see normalArrayCount() + * @see @ref normalArrayCount() */ std::vector& normals(UnsignedInt id); const std::vector& normals(UnsignedInt id) const; /**< @overload */ @@ -125,9 +125,9 @@ class MAGNUM_EXPORT MeshData3D { /** * @brief 2D texture coordinates - * @param id Texture coordinate array ID + * @param id %Texture coordinate array ID * - * @see textureCoords2DArrayCount() + * @see @ref textureCoords2DArrayCount() */ std::vector& textureCoords2D(UnsignedInt id); const std::vector& textureCoords2D(UnsignedInt id) const; /**< @overload */ diff --git a/src/Magnum/Trade/MeshObjectData2D.h b/src/Magnum/Trade/MeshObjectData2D.h index 4a59eee30..11b7f1004 100644 --- a/src/Magnum/Trade/MeshObjectData2D.h +++ b/src/Magnum/Trade/MeshObjectData2D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::MeshObjectData2D + * @brief Class @ref Magnum::Trade::MeshObjectData2D */ #include "Magnum/Trade/ObjectData2D.h" @@ -37,7 +37,7 @@ namespace Magnum { namespace Trade { @brief Two-dimensional mesh object data Provides access to material information for given mesh instance. -@see MeshObjectData3D +@see @ref MeshObjectData3D */ class MAGNUM_EXPORT MeshObjectData2D: public ObjectData2D { public: diff --git a/src/Magnum/Trade/MeshObjectData3D.h b/src/Magnum/Trade/MeshObjectData3D.h index dafe97632..2f5bf99cc 100644 --- a/src/Magnum/Trade/MeshObjectData3D.h +++ b/src/Magnum/Trade/MeshObjectData3D.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::MeshObjectData3D + * @brief Class @ref Magnum::Trade::MeshObjectData3D */ #include "Magnum/Trade/ObjectData3D.h" @@ -37,7 +37,7 @@ namespace Magnum { namespace Trade { @brief Three-dimensional mesh object data Provides access to material information for given mesh instance. -@see MeshObjectData2D +@see @ref MeshObjectData2D */ class MAGNUM_EXPORT MeshObjectData3D: public ObjectData3D { public: diff --git a/src/Magnum/Trade/ObjectData2D.h b/src/Magnum/Trade/ObjectData2D.h index 779da5c93..0dd7a9798 100644 --- a/src/Magnum/Trade/ObjectData2D.h +++ b/src/Magnum/Trade/ObjectData2D.h @@ -57,7 +57,7 @@ enum class ObjectInstanceType2D: UnsignedByte { @brief Two-dimensional object data Provides access to object transformation and hierarchy. -@see MeshObjectData2D, ObjectData3D +@see @ref MeshObjectData2D, @ref ObjectData3D */ class MAGNUM_EXPORT ObjectData2D { public: @@ -101,14 +101,14 @@ class MAGNUM_EXPORT ObjectData2D { /** * @brief Instance type * - * @see instance() + * @see @ref instance() */ ObjectInstanceType2D instanceType() const { return _instanceType; } /** * @brief Instance ID * @return ID of given camera / light / mesh etc., specified by - * instanceType() + * @ref instanceType() */ Int instance() const { return _instance; } @@ -119,7 +119,7 @@ class MAGNUM_EXPORT ObjectData2D { Int _instance; }; -/** @debugoperator{Magnum::Trade::ObjectData2D} */ +/** @debugoperatorenum{Magnum::Trade::ObjectInstanceType2D} */ Debug MAGNUM_EXPORT operator<<(Debug debug, ObjectInstanceType2D value); }} diff --git a/src/Magnum/Trade/ObjectData3D.h b/src/Magnum/Trade/ObjectData3D.h index 1eafa6c50..61ef895cb 100644 --- a/src/Magnum/Trade/ObjectData3D.h +++ b/src/Magnum/Trade/ObjectData3D.h @@ -59,7 +59,7 @@ enum class ObjectInstanceType3D: UnsignedByte { @brief Three-dimensional object data Provides access to object transformation and hierarchy. -@see MeshObjectData3D, ObjectData2D +@see @ref MeshObjectData3D, @ref ObjectData2D */ class MAGNUM_EXPORT ObjectData3D { public: @@ -103,14 +103,14 @@ class MAGNUM_EXPORT ObjectData3D { /** * @brief Instance type * - * @see instance() + * @see @ref instance() */ ObjectInstanceType3D instanceType() const { return _instanceType; } /** * @brief Instance ID * @return ID of given camera / light / mesh etc., specified by - * instanceType() + * @ref instanceType() */ Int instance() const { return _instance; } @@ -121,7 +121,7 @@ class MAGNUM_EXPORT ObjectData3D { Int _instance; }; -/** @debugoperator{Magnum::Trade::ObjectData3D} */ +/** @debugoperatorenum{Magnum::Trade::ObjectInstanceType3D} */ Debug MAGNUM_EXPORT operator<<(Debug debug, ObjectInstanceType3D value); }} diff --git a/src/Magnum/Trade/PhongMaterialData.h b/src/Magnum/Trade/PhongMaterialData.h index 15443d1a0..6cce3a13b 100644 --- a/src/Magnum/Trade/PhongMaterialData.h +++ b/src/Magnum/Trade/PhongMaterialData.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::PhongMaterialData + * @brief Class @ref Magnum::Trade::PhongMaterialData */ #include "Magnum/Magnum.h" diff --git a/src/Magnum/Trade/SceneData.h b/src/Magnum/Trade/SceneData.h index 6d7c686aa..bfe23a10b 100644 --- a/src/Magnum/Trade/SceneData.h +++ b/src/Magnum/Trade/SceneData.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::SceneData + * @brief Class @ref Magnum::Trade::SceneData */ #include diff --git a/src/Magnum/Trade/TextureData.cpp b/src/Magnum/Trade/TextureData.cpp index 08beb8e99..ae69ab885 100644 --- a/src/Magnum/Trade/TextureData.cpp +++ b/src/Magnum/Trade/TextureData.cpp @@ -27,6 +27,7 @@ namespace Magnum { namespace Trade { +#ifndef DOXYGEN_GENERATING_OUTPUT Debug operator<<(Debug debug, const TextureData::Type value) { switch(value) { #define _c(value) case TextureData::Type::value: return debug << "Trade::TextureData::Type::" #value; @@ -39,5 +40,6 @@ Debug operator<<(Debug debug, const TextureData::Type value) { return debug << "Trade::TextureData::Type::(unknown)"; } +#endif }} diff --git a/src/Magnum/Trade/TextureData.h b/src/Magnum/Trade/TextureData.h index 808be38a4..ca8301c05 100644 --- a/src/Magnum/Trade/TextureData.h +++ b/src/Magnum/Trade/TextureData.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Trade::TextureData + * @brief Class @ref Magnum::Trade::TextureData */ #include "Magnum/Array.h" @@ -41,9 +41,9 @@ namespace Magnum { namespace Trade { class TextureData { public: /** - * @brief Texture type + * @brief %Texture type * - * @see type() + * @see @ref type() */ enum class Type: UnsignedByte { Texture1D, /**< One-dimensional texture */ @@ -54,12 +54,12 @@ class TextureData { /** * @brief Constructor - * @param type Texture type + * @param type %Texture type * @param minificationFilter Minification filter * @param magnificationFilter Magnification filter * @param mipmapFilter Mipmap filter * @param wrapping Wrapping - * @param image Texture image ID + * @param image %Texture image ID */ TextureData(Type type, Sampler::Filter minificationFilter, Sampler::Filter magnificationFilter, Sampler::Mipmap mipmapFilter, Array3D wrapping, UnsignedInt image): _type(type), _minificationFilter(minificationFilter), _magnificationFilter(magnificationFilter), _mipmapFilter(mipmapFilter), _wrapping(wrapping), _image(image) {} @@ -75,7 +75,7 @@ class TextureData { /** @brief Move assignment */ TextureData& operator=(TextureData&&) = default; - /** @brief Texture type */ + /** @brief %Texture type */ Type type() const { return _type; } /** @brief Minification filter */ @@ -91,7 +91,7 @@ class TextureData { Array3D wrapping() const { return _wrapping; } /** - * @brief Image ID + * @brief %Image ID * * ID of 1D, 2D or 3D image based on texture type. If type is * @ref Type::Cube the function returns first of six consecutive @@ -109,7 +109,7 @@ class TextureData { UnsignedInt _image; }; -/** @debugoperator{Magnum::Trade::TextureData} */ +/** @debugoperatorclassenum{Magnum::Trade::TextureData,Magnum::Trade::TextureData::Type} */ Debug MAGNUM_EXPORT operator<<(Debug debug, TextureData::Type value); }} From bfbd4d203689615f7b1ca910b4c7099dcedf6f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 May 2014 22:42:17 +0200 Subject: [PATCH 18/47] Completed documentation review in root namespace. --- src/Magnum/AbstractImage.h | 17 ++-- src/Magnum/AbstractResourceLoader.h | 2 +- src/Magnum/AbstractShaderProgram.h | 18 ++-- src/Magnum/Array.h | 10 +-- src/Magnum/Buffer.h | 4 +- src/Magnum/ColorFormat.h | 4 +- src/Magnum/Context.h | 31 ++++--- src/Magnum/DebugMessage.h | 6 +- src/Magnum/DefaultFramebuffer.h | 8 +- src/Magnum/DimensionTraits.h | 9 +- src/Magnum/Extensions.h | 19 +++-- src/Magnum/Framebuffer.h | 10 +-- src/Magnum/Magnum.h | 2 +- src/Magnum/Mesh.h | 10 +-- src/Magnum/Renderer.h | 122 +++++++++++++++------------- src/Magnum/Resource.h | 17 ++-- src/Magnum/ResourceManager.h | 30 +++---- src/Magnum/Sampler.h | 12 +-- src/Magnum/Shader.h | 14 ++-- src/Magnum/Texture.h | 2 +- src/Magnum/Timeline.h | 23 +++--- 21 files changed, 197 insertions(+), 173 deletions(-) diff --git a/src/Magnum/AbstractImage.h b/src/Magnum/AbstractImage.h index 289e49cba..b5cb7a1cf 100644 --- a/src/Magnum/AbstractImage.h +++ b/src/Magnum/AbstractImage.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::AbstractImage + * @brief Class @ref Magnum::AbstractImage */ #include @@ -39,12 +39,12 @@ namespace Magnum { /** @brief Non-templated base for one-, two- or three-dimensional images -See Image, ImageReference, BufferImage, Trade::ImageData documentation for -more information. +See @ref Image, @ref ImageReference, @ref BufferImage, @ref Trade::ImageData +documentation for more information. @todo Where to put glClampColor() and glPixelStore() encapsulation? It is -needed in AbstractFramebuffer::read(), Texture::setImage() etc (i.e. all -functions operating with images). It also possibly needs to be "stackable" to -easily revert the state back. + needed in AbstractFramebuffer::read(), Texture::setImage() etc (i.e. all + functions operating with images). It also possibly needs to be "stackable" + to easily revert the state back. */ class MAGNUM_EXPORT AbstractImage { public: @@ -53,7 +53,7 @@ class MAGNUM_EXPORT AbstractImage { * @param format Format of the pixel * @param type Data type of the pixel * - * @see pixelSize() const + * @see @ref pixelSize() */ static std::size_t pixelSize(ColorFormat format, ColorType type); @@ -66,7 +66,8 @@ class MAGNUM_EXPORT AbstractImage { /** * @brief Pixel size (in bytes) * - * Convenience member alternative for pixelSize(Format, Type). + * Convenience member alternative for + * @ref pixelSize(ColorFormat, ColorType). */ std::size_t pixelSize() const { return pixelSize(_format, _type); } diff --git a/src/Magnum/AbstractResourceLoader.h b/src/Magnum/AbstractResourceLoader.h index 8eedaefcd..ba24ebb8a 100644 --- a/src/Magnum/AbstractResourceLoader.h +++ b/src/Magnum/AbstractResourceLoader.h @@ -60,7 +60,7 @@ In your @ref doLoad() implementation, after your resources are loaded, call @ref set() to pass them to @ref ResourceManager or call @ref setNotFound() to indicate that the resource was not found. -You can also implement @ref name() to provide meaningful names for resource +You can also implement @ref doName() to provide meaningful names for resource keys. Example implementation for synchronous mesh loader: diff --git a/src/Magnum/AbstractShaderProgram.h b/src/Magnum/AbstractShaderProgram.h index d137c25d6..bb4b23ee5 100644 --- a/src/Magnum/AbstractShaderProgram.h +++ b/src/Magnum/AbstractShaderProgram.h @@ -385,7 +385,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{ARB,shader_image_load_store} * is not available, returns `0`. - * @requires_gl Image load/store is not available in OpenGL ES. + * @requires_gl %Image load/store is not available in OpenGL ES. * @see @fn_gl{Get} with @def_gl{MAX_IMAGE_UNITS} */ static Int maxImageUnits(); @@ -396,7 +396,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{ARB,shader_image_load_store} * is not available, returns `0`. - * @requires_gl Image load/store is not available in OpenGL ES. + * @requires_gl %Image load/store is not available in OpenGL ES. * @see @fn_gl{Get} with @def_gl{MAX_IMAGE_SAMPLES} */ static Int maxImageSamples(); @@ -408,7 +408,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { * OpenGL calls. If neither @extension{ARB,shader_image_load_store} * nor @extension{ARB,shader_storage_buffer_object} extension is * available, returns `0`. - * @requires_gl Image load/store is not available in OpenGL ES. + * @requires_gl %Image load/store is not available in OpenGL ES. * @see @fn_gl{Get} with @def_gl{MAX_COMBINED_SHADER_OUTPUT_RESOURCES} */ static Int maxCombinedShaderOutputResources(); @@ -419,7 +419,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object} * is not available, returns `0`. - * @requires_gl Shader storage is not available in OpenGL ES. + * @requires_gl %Shader storage is not available in OpenGL ES. * @see @fn_gl{Get} with @def_gl{MAX_SHADER_STORAGE_BLOCK_SIZE} */ static Long maxShaderStorageBlockSize(); @@ -458,7 +458,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{EXT,gpu_shader4} is not * available, returns `0`. - * @requires_gles30 Texture lookup with offset is not available in + * @requires_gles30 %Texture lookup with offset is not available in * OpenGL ES 2.0. * @see @fn_gl{Get} with @def_gl{MIN_PROGRAM_TEXEL_OFFSET} */ @@ -470,7 +470,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{EXT,gpu_shader4} is not * available, returns `0`. - * @requires_gles30 Texture lookup with offset is not available in + * @requires_gles30 %Texture lookup with offset is not available in * OpenGL ES 2.0. * @see @fn_gl{Get} with @def_gl{MAX_PROGRAM_TEXEL_OFFSET} */ @@ -609,7 +609,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject { /** * @brief Bind attribute to given location * @param location Location - * @param name Attribute name + * @param name %Attribute name * * Binds attribute to location which is used later for binding vertex * buffers. @@ -1163,10 +1163,10 @@ template class AbstractShaderProgram::Attribute { }; #ifdef DOXYGEN_GENERATING_OUTPUT -/** @debugoperator{Magnum::AbstractShaderProgram::Attribute} */ +/** @debugoperatorclassenum{Magnum::AbstractShaderProgram::Attribute,Magnum::AbstractShaderProgram::Attribute::Components} */ template Debug operator<<(Debug debug, AbstractShaderProgram::Attribute::Components); -/** @debugoperator{Magnum::AbstractShaderProgram::Attribute} */ +/** @debugoperatorclassenum{Magnum::AbstractShaderProgram::Attribute,Magnum::AbstractShaderProgram::Attribute::DataType} */ template Debug operator<<(Debug debug, AbstractShaderProgram::Attribute::DataType); #endif diff --git a/src/Magnum/Array.h b/src/Magnum/Array.h index eea51f20a..4a6c5d4c9 100644 --- a/src/Magnum/Array.h +++ b/src/Magnum/Array.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Array, Magnum::Array1D, Magnum::Array2D, Magnum::Array3D + * @brief Class @ref Magnum::Array, @ref Magnum::Array1D, @ref Magnum::Array2D, @ref Magnum::Array3D */ #include @@ -41,10 +41,10 @@ namespace Magnum { @tparam dimensions Dimension count @tparam T Data type -Similar to Math::Vector, but more suitable for storing enum values which don't -need any math operations and fuzzy comparison (e.g. enum values). Unlike -Math::Vector this class has non-explicit constructor from one value. -@see Array1D, Array2D, Array3D +Similar to @ref Math::Vector, but more suitable for storing enum values which +don't need any math operations and fuzzy comparison (e.g. enum values). Unlike +@ref Math::Vector this class has implicit constructor from one value. +@see @ref Array1D, @ref Array2D, @ref Array3D */ template class Array { public: diff --git a/src/Magnum/Buffer.h b/src/Magnum/Buffer.h index 5d009b0ef..5ae77e135 100644 --- a/src/Magnum/Buffer.h +++ b/src/Magnum/Buffer.h @@ -291,7 +291,7 @@ class MAGNUM_EXPORT Buffer: public AbstractObject { ShaderStorage = GL_SHADER_STORAGE_BUFFER, /** - * Source for texel fetches. See BufferTexture. + * Source for texel fetches. See @ref BufferTexture. * @requires_gl31 %Extension @extension{ARB,texture_buffer_object} * @requires_gl Texture buffers are not available in OpenGL ES. */ @@ -926,7 +926,7 @@ class MAGNUM_EXPORT Buffer: public AbstractObject { CORRADE_ENUMSET_OPERATORS(Buffer::MapFlags) -/** @debugoperator{Magnum::Buffer} */ +/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::Target} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Buffer::Target value); inline Buffer::Buffer(Buffer&& other) noexcept: _id(other._id), _targetHint(other._targetHint) { diff --git a/src/Magnum/ColorFormat.h b/src/Magnum/ColorFormat.h index 67c6a1e9e..f8029a8ad 100644 --- a/src/Magnum/ColorFormat.h +++ b/src/Magnum/ColorFormat.h @@ -491,10 +491,10 @@ enum class ColorType: GLenum { #endif }; -/** @debugoperator{ColorFormat} */ +/** @debugoperatorenum{Magnum::ColorFormat} */ Debug MAGNUM_EXPORT operator<<(Debug debug, ColorFormat value); -/** @debugoperator{ColorFormat} */ +/** @debugoperatorenum{Magnum::ColorType} */ Debug MAGNUM_EXPORT operator<<(Debug debug, ColorType value); } diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index df00aa1dc..f998a6504 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -41,8 +41,6 @@ namespace Magnum { -/** @todoc Resolve conflict with Audio/Context.h (Doxygen doesn't list this file) */ - namespace Implementation { struct State; } @@ -85,7 +83,7 @@ class MAGNUM_EXPORT Extension { }; /** -@brief Magnum context +@brief %Magnum context Provides access to version and extension information. Instance available through @ref Context::current() is automatically created during construction of @@ -94,14 +92,9 @@ instance is available during whole lifetime of *Application object. See @ref platform documentation for more information about engine setup. */ class MAGNUM_EXPORT Context { - Context(const Context&) = delete; - Context(Context&&) = delete; - Context& operator=(const Context&) = delete; - Context& operator=(Context&&) = delete; - public: /** - * @brief Context flag + * @brief %Context flag * * @see @ref Flags, @ref flags(), @ref Platform::Sdl2Application::Configuration::setFlags() "Platform::*Application::Configuration::setFlags()" */ @@ -170,7 +163,7 @@ class MAGNUM_EXPORT Context { typedef Containers::EnumSet States; /** - * @brief Context flags + * @brief %Context flags * * @see @ref flags() */ @@ -187,8 +180,20 @@ class MAGNUM_EXPORT Context { */ explicit Context(); + /** @brief Copying is not allowed */ + Context(const Context&) = delete; + + /** @brief Moving is not allowed */ + Context(Context&&) = delete; + ~Context(); + /** @brief Copying is not allowed */ + Context& operator=(const Context&) = delete; + + /** @brief Moving is not allowed */ + Context& operator=(Context&&) = delete; + /** @brief Current context */ static Context* current() { return _current; } @@ -274,7 +279,7 @@ class MAGNUM_EXPORT Context { std::vector shadingLanguageVersionStrings() const; /** - * @brief Extension strings + * @brief %Extension strings * * The result is *not* cached, repeated queries will result in repeated * OpenGL calls. Note that this function returns list of all extensions @@ -286,7 +291,7 @@ class MAGNUM_EXPORT Context { */ std::vector extensionStrings() const; - /** @brief Context flags */ + /** @brief %Context flags */ Flags flags() const { return _flags; } /** @@ -446,7 +451,7 @@ class MAGNUM_EXPORT Context { Implementation::State* _state; }; -/** @debugoperator{Magnum::Context} */ +/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flag} */ MAGNUM_EXPORT Debug operator<<(Debug debug, Context::Flag value); /** @hideinitializer diff --git a/src/Magnum/DebugMessage.h b/src/Magnum/DebugMessage.h index 61b2c5f78..c7fafa951 100644 --- a/src/Magnum/DebugMessage.h +++ b/src/Magnum/DebugMessage.h @@ -317,13 +317,13 @@ class MAGNUM_EXPORT DebugMessage { static MAGNUM_LOCAL void callbackImplementationKhr(Callback callback, const void* userParam); }; -/** @debugoperator{Magnum::DebugMessage} */ +/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Source} */ Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Source value); -/** @debugoperator{Magnum::DebugMessage} */ +/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Type} */ Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Type value); -/** @debugoperator{Magnum::DebugMessage} */ +/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Severity} */ Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Severity value); } diff --git a/src/Magnum/DefaultFramebuffer.h b/src/Magnum/DefaultFramebuffer.h index b28353fea..98fec42de 100644 --- a/src/Magnum/DefaultFramebuffer.h +++ b/src/Magnum/DefaultFramebuffer.h @@ -145,7 +145,8 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer { /** * Write output to back buffer. * - * On desktop OpenGL, this is equal to @ref DrawAttachment::BackLeft. + * On desktop OpenGL, this is equal to + * @ref DrawAttachment::BackLeft. */ #ifdef MAGNUM_TARGET_GLES Back = GL_BACK, @@ -156,7 +157,8 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer { /** * Write output to front buffer. * - * On desktop OpenGL, this is equal to @ref DrawAttachment::FrontLeft. + * On desktop OpenGL, this is equal to + * @ref DrawAttachment::FrontLeft. */ #ifdef MAGNUM_TARGET_GLES Front = GL_FRONT @@ -433,7 +435,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer { /** @brief Default framebuffer instance */ extern DefaultFramebuffer MAGNUM_EXPORT defaultFramebuffer; -/** @debugoperator{DefaultFramebuffer} */ +/** @debugoperatorclassenum{Magnum::DefaultFramebuffer,Magnum::DefaultFramebuffer::Status} */ Debug MAGNUM_EXPORT operator<<(Debug debug, DefaultFramebuffer::Status value); } diff --git a/src/Magnum/DimensionTraits.h b/src/Magnum/DimensionTraits.h index add483fbe..6c04a9d03 100644 --- a/src/Magnum/DimensionTraits.h +++ b/src/Magnum/DimensionTraits.h @@ -29,7 +29,7 @@ #include "Magnum/Types.h" /** @file - * @brief Class Magnum::DimensionTraits + * @brief Class @ref Magnum::DimensionTraits */ namespace Magnum { @@ -42,15 +42,16 @@ template struct DimensionTraits { /** * @brief Vector type * - * Math::Vector, Math::Vector2 or Math::Vector3 based on dimension count. + * @ref Math::Vector, @ref Math::Vector2 or @ref Math::Vector3 based on + * dimension count. */ typedef U VectorType; /** * @brief Matrix type * - * Floating-point Math::Matrix3 or Math::Matrix4 for 2D or 3D. No matrix - * type defined for one dimension and integral types. + * Floating-point @ref Math::Matrix3 or @ref Math::Matrix4 for 2D or 3D. No + * matrix type defined for one dimension and integral types. */ typedef U MatrixType; #endif diff --git a/src/Magnum/Extensions.h b/src/Magnum/Extensions.h index dc4dc0cab..3e967f931 100644 --- a/src/Magnum/Extensions.h +++ b/src/Magnum/Extensions.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Namespace Magnum::Extensions + * @brief Namespace @ref Magnum::Extensions */ #include "Magnum/Version.h" @@ -37,16 +37,21 @@ namespace Magnum { @brief Compile-time information about OpenGL extensions Each extension is `struct` named hierarchically by prefix, vendor and -extension name, for example `GL::APPLE::vertex_array_object`. Each struct has -the same public methods as Extension class (requiredVersion(), coreVersion() -and string(), but these structs are better suited for compile-time decisions -rather than %Extension instances. See Context::isExtensionSupported() for -example usage. +extension name taken from list at @ref opengl-support, for example +`GL::ARB::texture_storage`. Note that desktop extensions are available only on +desktop build, OpenGL ES 2.0 extensions which are part of ES 3.0 are available +only on @ref MAGNUM_TARGET_GLES2 "OpenGL ES 2.0 build" and vendor OpenGL ES +extensions are available only on @ref MAGNUM_TARGET_GLES "OpenGL ES builds". + +Each struct has the same public methods as Extension class (requiredVersion(), +coreVersion() and string(), but these structs are better suited for +compile-time decisions rather than %Extension instances. See +@ref Context::isExtensionSupported() for example usage. This namespace is built by default. To use it, you need to add `${MAGNUM_INCLUDE_DIRS}` to include path and link to `${MAGNUM_LIBRARIES}`. See @ref building and @ref cmake for more information. -@see MAGNUM_ASSERT_EXTENSION_SUPPORTED() +@see @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED() @todo Manual indices for extensions, this has gaps */ namespace Extensions { diff --git a/src/Magnum/Framebuffer.h b/src/Magnum/Framebuffer.h index 7d6f27091..1e2e72a3b 100644 --- a/src/Magnum/Framebuffer.h +++ b/src/Magnum/Framebuffer.h @@ -480,7 +480,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje /** * @brief Attach texture to given buffer * @param attachment %Buffer attachment - * @param texture Texture + * @param texture %Texture * @param level Mip level * @return Reference to self (for method chaining) * @@ -498,7 +498,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje /** * @brief Attach texture to given buffer * @param attachment %Buffer attachment - * @param texture Texture + * @param texture %Texture * @param level Mip level * @return Reference to self (for method chaining) * @@ -528,7 +528,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje /** * @brief Attach cube map texture to given buffer * @param attachment %Buffer attachment - * @param texture Cube map texture + * @param texture %Texture * @param coordinate Cube map coordinate * @param level Mip level * @return Reference to self (for method chaining) @@ -545,7 +545,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje /** * @brief Attach texture layer to given buffer * @param attachment %Buffer attachment - * @param texture Texture + * @param texture %Texture * @param level Mip level * @param layer Layer * @return Reference to self (for method chaining) @@ -647,7 +647,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje #endif }; -/** @debugoperator{DefaultFramebuffer} */ +/** @debugoperatorclassenum{Magnum::Framebuffer,Magnum::Framebuffer::Status} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Framebuffer::Status value); inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept { diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index b48e0b054..ab7c7b81d 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Forward declarations for Magnum namespace + * @brief Forward declarations for @ref Magnum namespace */ #include diff --git a/src/Magnum/Mesh.h b/src/Magnum/Mesh.h index 1ddf868b7..ac6697013 100644 --- a/src/Magnum/Mesh.h +++ b/src/Magnum/Mesh.h @@ -743,7 +743,7 @@ class MAGNUM_EXPORT Mesh: public AbstractObject { /** * @brief Draw the mesh - * @param shader Shader to use for drawing + * @param shader %Shader to use for drawing * * Expects that the shader is compatible with this mesh and is fully * set up. If vertex/index count or instance count is `0`, no draw @@ -985,17 +985,17 @@ class MAGNUM_EXPORT Mesh: public AbstractObject { #endif }; -/** @debugoperator{Magnum::Mesh} */ +/** @debugoperatorenum{Magnum::MeshPrimitive} */ Debug MAGNUM_EXPORT operator<<(Debug debug, MeshPrimitive value); -/** @debugoperator{Magnum::Mesh} */ +/** @debugoperatorclassenum{Magnum::Mesh,Magnum::Mesh::IndexType} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Mesh::IndexType value); } namespace Corrade { namespace Utility { -/** @configurationvalue{Magnum::Mesh} */ +/** @configurationvalue{Magnum::MeshPrimitive} */ template<> struct MAGNUM_EXPORT ConfigurationValue { ConfigurationValue() = delete; @@ -1014,7 +1014,7 @@ template<> struct MAGNUM_EXPORT ConfigurationValue { static Magnum::MeshPrimitive fromString(const std::string& stringValue, ConfigurationValueFlags); }; -/** @configurationvalue{Magnum::Mesh} */ +/** @configurationvalue{Magnum::Mesh::IndexType} */ template<> struct MAGNUM_EXPORT ConfigurationValue { ConfigurationValue() = delete; diff --git a/src/Magnum/Renderer.h b/src/Magnum/Renderer.h index b26bd93f2..06d31838d 100644 --- a/src/Magnum/Renderer.h +++ b/src/Magnum/Renderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Renderer + * @brief Class @ref Magnum::Renderer */ #include @@ -57,10 +57,10 @@ class MAGNUM_EXPORT Renderer { /** * @brief Affected polygon facing for culling, stencil operations and masks * - * @see setFaceCullingMode(), - * setStencilFunction(PolygonFacing, StencilFunction, Int, UnsignedInt), - * setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation), - * setStencilMask(PolygonFacing, UnsignedInt) + * @see @ref setFaceCullingMode(), + * @ref setStencilFunction(PolygonFacing, StencilFunction, Int, UnsignedInt), + * @ref setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation), + * @ref setStencilMask(PolygonFacing, UnsignedInt) */ enum class PolygonFacing: GLenum { Front = GL_FRONT, /**< Front-facing polygons */ @@ -74,12 +74,13 @@ class MAGNUM_EXPORT Renderer { * @brief Features * * All features are disabled by default unless specified otherwise. - * @see setFeature() + * @see @ref setFeature() */ enum class Feature: GLenum { /** * Blending - * @see setBlendEquation(), setBlendFunction(), setBlendColor() + * @see @ref setBlendEquation(), @ref setBlendFunction(), + * @ref setBlendColor() */ Blending = GL_BLEND, @@ -119,7 +120,8 @@ class MAGNUM_EXPORT Renderer { /** * Depth test - * @see setClearDepth(), setDepthFunction(), setDepthMask() + * @see @ref setClearDepth(), @ref setDepthFunction(), + * @ref setDepthMask() */ DepthTest = GL_DEPTH_TEST, @@ -127,14 +129,14 @@ class MAGNUM_EXPORT Renderer { /** * Back face culling - * @see setFrontFace() + * @see @ref setFrontFace() */ FaceCulling = GL_CULL_FACE, #ifndef MAGNUM_TARGET_GLES /** * Logical operation - * @see setLogicOperation() + * @see @ref setLogicOperation() * @requires_gl Logical operations on framebuffer are not * available in OpenGL ES. */ @@ -155,7 +157,7 @@ class MAGNUM_EXPORT Renderer { * Offset filled polygons * @see @ref Magnum::Renderer::Feature "Feature::PolygonOffsetLine", * @ref Magnum::Renderer::Feature "Feature::PolygonOffsetPoint", - * setPolygonOffset() + * @ref setPolygonOffset() */ PolygonOffsetFill = GL_POLYGON_OFFSET_FILL, @@ -164,7 +166,7 @@ class MAGNUM_EXPORT Renderer { * Offset lines * @see @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill", * @ref Magnum::Renderer::Feature "Feature::PolygonOffsetPoint", - * setPolygonOffset() + * @ref setPolygonOffset() * @requires_gl Only @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill" * is available in OpenGL ES. */ @@ -174,7 +176,7 @@ class MAGNUM_EXPORT Renderer { * Offset points * @see @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill", * @ref Magnum::Renderer::Feature "Feature::PolygonOffsetLine", - * setPolygonOffset() + * @ref setPolygonOffset() * @requires_gl Only @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill" * is available in OpenGL ES. */ @@ -185,7 +187,7 @@ class MAGNUM_EXPORT Renderer { /** * Programmable point size. If enabled, the point size is taken * from vertex/geometry shader builtin `gl_PointSize`. - * @see setPointSize() + * @see @ref setPointSize() * @requires_gl Always enabled on OpenGL ES. */ ProgramPointSize = GL_PROGRAM_POINT_SIZE, @@ -193,14 +195,14 @@ class MAGNUM_EXPORT Renderer { /** * Scissor test - * @see setScissor() + * @see @ref setScissor() */ ScissorTest = GL_SCISSOR_TEST, #ifndef MAGNUM_TARGET_GLES /** * Seamless cube map texture. - * @see CubeMapTexture, CubeMapTextureArray + * @see @ref CubeMapTexture, @ref CubeMapTextureArray * @requires_gl32 %Extension @extension{ARB,seamless_cube_map} * @requires_gl Not available in OpenGL ES 2.0, always enabled in * OpenGL ES 3.0. @@ -210,8 +212,8 @@ class MAGNUM_EXPORT Renderer { /** * Stencil test - * @see setClearStencil(), setStencilFunction(), - * setStencilOperation(), setStencilMask() + * @see @ref setClearStencil(), @ref setStencilFunction(), + * @ref setStencilOperation(), @ref setStencilMask() */ StencilTest = GL_STENCIL_TEST }; @@ -226,7 +228,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Hint * - * @see setHint() + * @see @ref setHint() * @todo other hints */ enum class Hint: GLenum { @@ -245,7 +247,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Hint mode * - * @see setHint() + * @see @ref setHint() */ enum class HintMode: GLenum { Fastest = GL_FASTEST, /**< Most efficient option. */ @@ -279,7 +281,8 @@ class MAGNUM_EXPORT Renderer { * * Initial value is `1.0`. * @see @ref Feature::DepthTest, @fn_gl{ClearDepth} - * @requires_gl See setClearDepth(Float), which is available in OpenGL ES. + * @requires_gl See @ref Magnum::Renderer::setClearDepth(Float) "setClearDepth(Float)", + * which is available in OpenGL ES. */ static void setClearDepth(Double depth); #endif @@ -287,9 +290,10 @@ class MAGNUM_EXPORT Renderer { /** * @overload * - * @see @ref Feature::DepthTest, @fn_gl{ClearDepth} * If OpenGL ES, OpenGL 4.1 or extension @extension{ARB,ES2_compatibility} - * is not available, this function behaves exactly as setClearDepth(Double). + * is not available, this function behaves exactly as + * @ref setClearDepth(Double). + * @see @ref Feature::DepthTest, @fn_gl{ClearDepth} */ static void setClearDepth(Float depth); @@ -308,7 +312,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Front facing polygon winding * - * @see setFrontFace() + * @see @ref setFrontFace() */ enum class FrontFace: GLenum { /** @brief Counterclockwise polygons are front facing (default). */ @@ -322,7 +326,7 @@ class MAGNUM_EXPORT Renderer { * @brief Set front-facing polygon winding * * Initial value is `FrontFace::%CounterClockWise`. - * @see setFaceCullingMode(), @fn_gl{FrontFace} + * @see @ref setFaceCullingMode(), @fn_gl{FrontFace} */ static void setFrontFace(FrontFace mode); @@ -331,7 +335,7 @@ class MAGNUM_EXPORT Renderer { * * Initial value is @ref PolygonFacing::Back. If set to both front and * back, only points and lines are drawn. - * @see @ref Feature::FaceCulling, setFrontFace(), + * @see @ref Feature::FaceCulling, @ref setFrontFace(), * @fn_gl{CullFace} */ static void setFaceCullingMode(PolygonFacing mode); @@ -340,7 +344,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Provoking vertex * - * @see setProvokingVertex() + * @see @ref setProvokingVertex() * @requires_gl32 %Extension @extension{ARB,provoking_vertex}. Older * versions behave always like * @ref Magnum::Renderer::ProvokingVertex "ProvokingVertex::LastVertexConvention". @@ -369,7 +373,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Polygon mode * - * @see setPolygonMode() + * @see @ref setPolygonMode() * @requires_gl OpenGL ES behaves always like @ref Magnum::Renderer::PolygonMode "PolygonMode::Fill". * See @ref Magnum::Mesh::setPrimitive() "Mesh::setPrimitive()" * for possible workaround. @@ -381,13 +385,13 @@ class MAGNUM_EXPORT Renderer { Fill = GL_FILL, /** - * Boundary edges are filled. See also setLineWidth(). + * Boundary edges are filled. See also @ref setLineWidth(). */ Line = GL_LINE, /** * Starts of boundary edges are drawn as points. See also - * setPointSize(). + * @ref setPointSize(). */ Point = GL_POINT }; @@ -452,7 +456,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Stencil function * - * @see setStencilFunction(), @ref DepthFunction + * @see @ref setStencilFunction(), @ref DepthFunction */ enum class StencilFunction: GLenum { Never = GL_NEVER, /**< Never pass the test. */ @@ -468,7 +472,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Stencil operation * - * @see setStencilOperation() + * @see @ref setStencilOperation() */ enum class StencilOperation: GLenum { Keep = GL_KEEP, /**< Keep the current value. */ @@ -476,7 +480,7 @@ class MAGNUM_EXPORT Renderer { /** * Set the stencil value to reference value specified by - * setStencilFunction(). + * @ref setStencilFunction(). */ Replace = GL_REPLACE, @@ -569,7 +573,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Depth function * - * @see setDepthFunction() + * @see @ref setDepthFunction() */ typedef StencilFunction DepthFunction; @@ -600,7 +604,7 @@ class MAGNUM_EXPORT Renderer { * * Set to `false` to disallow writing to depth buffer. Initial value * is `true`. - * @see setColorMask(), setStencilMask(), @fn_gl{DepthMask} + * @see @ref setColorMask(), @ref setStencilMask(), @fn_gl{DepthMask} */ static void setDepthMask(GLboolean allow); @@ -612,8 +616,8 @@ class MAGNUM_EXPORT Renderer { * * @attention In @ref MAGNUM_TARGET_WEBGL "WebGL" the mask must be the * same for both front and back polygon facing. - * @see setStencilMask(UnsignedInt), setColorMask(), setDepthMask(), - * @fn_gl{StencilMaskSeparate} + * @see @ref setStencilMask(UnsignedInt), @ref setColorMask(), + * @ref setDepthMask(), @fn_gl{StencilMaskSeparate} */ static void setStencilMask(PolygonFacing facing, UnsignedInt allowBits); @@ -638,7 +642,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Blend equation * - * @see setBlendEquation() + * @see @ref setBlendEquation() */ enum class BlendEquation: GLenum { Add = GL_FUNC_ADD, /**< `source + destination` */ @@ -666,7 +670,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Blend function * - * @see setBlendFunction() + * @see @ref setBlendFunction() */ enum class BlendFunction: GLenum { /** Zero (@f$ RGB = (0.0, 0.0, 0.0); A = 0.0 @f$) */ @@ -678,28 +682,28 @@ class MAGNUM_EXPORT Renderer { /** * Constant color (@f$ RGB = (R_c, G_c, B_c); A = A_c @f$) * - * @see setBlendColor() + * @see @ref setBlendColor() */ ConstantColor = GL_CONSTANT_COLOR, /** * One minus constant color (@f$ RGB = (1.0 - R_c, 1.0 - G_c, 1.0 - B_c); A = 1.0 - A_c @f$) * - * @see setBlendColor() + * @see @ref setBlendColor() */ OneMinusConstantColor = GL_ONE_MINUS_CONSTANT_COLOR, /** * Constant alpha (@f$ RGB = (A_c, A_c, A_c); A = A_c @f$) * - * @see setBlendColor() + * @see @ref setBlendColor() */ ConstantAlpha = GL_CONSTANT_ALPHA, /** * One minus constant alpha (@f$ RGB = (1.0 - A_c, 1.0 - A_c, 1.0 - A_c); A = 1.0 - A_c @f$) * - * @see setBlendColor() + * @see @ref setBlendColor() */ OneMinusConstantAlpha = GL_ONE_MINUS_CONSTANT_ALPHA, @@ -710,7 +714,7 @@ class MAGNUM_EXPORT Renderer { /** * Second source color (@f$ RGB = (R_{s1}, G_{s1}, B_{s1}); A = A_{s1} @f$) * - * @see AbstractShaderProgram::bindFragmentDataLocationIndexed() + * @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed() * @requires_gl33 %Extension @extension{ARB,blend_func_extended} * @requires_gl Multiple blending inputs are not available in * OpenGL ES. @@ -727,7 +731,7 @@ class MAGNUM_EXPORT Renderer { /** * One minus second source color (@f$ RGB = (1.0 - R_{s1}, 1.0 - G_{s1}, 1.0 - B_{s1}); A = 1.0 - A_{s1} @f$) * - * @see AbstractShaderProgram::bindFragmentDataLocationIndexed() + * @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed() * @requires_gl33 %Extension @extension{ARB,blend_func_extended} * @requires_gl Multiple blending inputs are not available in * OpenGL ES. @@ -741,7 +745,7 @@ class MAGNUM_EXPORT Renderer { /** * Saturate source alpha (@f$ RGB = (f, f, f); A = 1.0; f = min(A_s, 1.0 - A_d) @f$) * - * Can be used only in source parameter of setBlendFunction(). + * Can be used only in source parameter of @ref setBlendFunction(). */ SourceAlphaSaturate = GL_SRC_ALPHA_SATURATE, @@ -749,7 +753,7 @@ class MAGNUM_EXPORT Renderer { /** * Second source alpha (@f$ RGB = (A_{s1}, A_{s1}, A_{s1}); A = A_{s1} @f$) * - * @see AbstractShaderProgram::bindFragmentDataLocationIndexed() + * @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed() * @requires_gl33 %Extension @extension{ARB,blend_func_extended} * @requires_gl Multiple blending inputs are not available in * OpenGL ES. @@ -766,7 +770,7 @@ class MAGNUM_EXPORT Renderer { /** * One minus second source alpha (@f$ RGB = (1.0 - A_{s1}, 1.0 - A_{s1}, 1.0 - A_{s1}); A = 1.0 - A_{s1} @f$) * - * @see AbstractShaderProgram::bindFragmentDataLocationIndexed() + * @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed() * @requires_gl33 %Extension @extension{ARB,blend_func_extended} * @requires_gl Multiple blending inputs are not available in * OpenGL ES. @@ -830,7 +834,8 @@ class MAGNUM_EXPORT Renderer { /** * @brief Set blend function separately for RGB and alpha components * - * See @ref setBlendFunction(BlendFunction, BlendFunction) for more information. + * See @ref setBlendFunction(BlendFunction, BlendFunction) for more + * information. * @see @ref Feature::Blending, @ref setBlendEquation(), * @ref setBlendColor(), @fn_gl{BlendFuncSeparate} */ @@ -895,7 +900,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Flush the pipeline * - * @see finish(), @fn_gl{Flush} + * @see @ref finish(), @fn_gl{Flush} */ static void flush() { glFlush(); } @@ -903,14 +908,14 @@ class MAGNUM_EXPORT Renderer { * @brief Finish the pipeline * * Blocks until all commands in the pipeline are finished. - * @see flush(), @fn_gl{Finish} + * @see @ref flush(), @fn_gl{Finish} */ static void finish() { glFinish(); } /** * @brief Error status * - * @see error() + * @see @ref error() */ enum class Error: GLenum { /** No error has been recorded */ @@ -971,7 +976,7 @@ class MAGNUM_EXPORT Renderer { /** * @brief Graphics reset notification strategy * - * @see resetNotificationStrategy() + * @see @ref resetNotificationStrategy() * @requires_extension %Extension @extension{ARB,robustness} * @requires_es_extension %Extension @es_extension{EXT,robustness} */ @@ -1005,14 +1010,15 @@ class MAGNUM_EXPORT Renderer { * OpenGL calls. If OpenGL extension @extension{ARB,robustness} or ES * extension @es_extension{EXT,robustness} is not available, this * function always returns @ref ResetNotificationStrategy::NoResetNotification. - * @see graphicsResetStatus(), @fn_gl{Get} with @def_gl{RESET_NOTIFICATION_STRATEGY_ARB} + * @see @ref graphicsResetStatus(), @fn_gl{Get} with + * @def_gl{RESET_NOTIFICATION_STRATEGY_ARB} */ static ResetNotificationStrategy resetNotificationStrategy(); /** * @brief Graphics reset status * - * @see resetNotificationStrategy(), graphicsResetStatus() + * @see @ref resetNotificationStrategy(), @ref graphicsResetStatus() * @requires_extension %Extension @extension{ARB,robustness} * @requires_es_extension %Extension @es_extension{EXT,robustness} */ @@ -1066,13 +1072,13 @@ class MAGNUM_EXPORT Renderer { static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationRobustness(); }; -/** @debugoperator{Renderer} */ +/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::Error} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::Error value); -/** @debugoperator{Renderer} */ +/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::ResetNotificationStrategy} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::ResetNotificationStrategy value); -/** @debugoperator{Renderer} */ +/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::GraphicsResetStatus} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::GraphicsResetStatus value); } diff --git a/src/Magnum/Resource.h b/src/Magnum/Resource.h index 787e39f90..c051a83e4 100644 --- a/src/Magnum/Resource.h +++ b/src/Magnum/Resource.h @@ -68,7 +68,7 @@ enum class ResourceState: UnsignedByte { Final }; -/** @debugoperator{Magnum::Resource} */ +/** @debugoperatorenum{Magnum::ResourceState} */ Debug MAGNUM_EXPORT operator<<(Debug debug, ResourceState value); /** @@ -149,13 +149,14 @@ class Resource { /** @brief Move assignment */ Resource& operator=(Resource&& other); - /** @brief Resource key */ + /** @brief %Resource key */ ResourceKey key() const { return _key; } /** * @brief %Resource state * - * @see @ref operator bool(), @ref ResourceManager::state() + * @see operator bool(), @ref ResourceManager::state() + * @todoc Make explicit reference when Doxygen can handle operators */ ResourceState state() { acquire(); @@ -166,9 +167,9 @@ class Resource { * @brief Whether the resource is available * * Returns `false` when resource is not loaded and no fallback is - * available (i.e. state() is either @ref ResourceState::NotLoaded, - * @ref ResourceState::Loading or @ref ResourceState::NotFound), `true` - * otherwise. + * available (i.e. @ref state() is either + * @ref ResourceState::NotLoaded, @ref ResourceState::Loading or + * @ref ResourceState::NotFound), `true` otherwise. */ operator bool() { acquire(); @@ -201,10 +202,10 @@ class Resource { #ifdef MAGNUM_BUILD_DEPRECATED /** * @overload - * @deprecated Use the explicit @ref Magnum::Resource::operator*() "operator*()" or - * @ref Magnum::Resource::operator->() "operator->()" instead. + * @deprecated Use the explicit operator*() or operator->() instead. * Implicit conversion is no longer allowed if it might throw an * assertion. + * @todoc Explicit reference when Doxygen can handle operators */ CORRADE_DEPRECATED("use operator*() or operator->() instead") operator U&() { return **this; } #endif diff --git a/src/Magnum/ResourceManager.h b/src/Magnum/ResourceManager.h index 265a875f1..83e1662ad 100644 --- a/src/Magnum/ResourceManager.h +++ b/src/Magnum/ResourceManager.h @@ -98,14 +98,15 @@ template class ResourceManagerData { template friend class Magnum::Resource; friend class AbstractResourceLoader; - ResourceManagerData(const ResourceManagerData&) = delete; - ResourceManagerData(ResourceManagerData&&) = delete; - ResourceManagerData& operator=(const ResourceManagerData&) = delete; - ResourceManagerData& operator=(ResourceManagerData&&) = delete; - public: + ResourceManagerData(const ResourceManagerData&) = delete; + ResourceManagerData(ResourceManagerData&&) = delete; + virtual ~ResourceManagerData(); + ResourceManagerData& operator=(const ResourceManagerData&) = delete; + ResourceManagerData& operator=(ResourceManagerData&&) = delete; + std::size_t lastChange() const { return _lastChange; } std::size_t count() const { return _data.size(); } @@ -198,10 +199,10 @@ MyResourceManager manager; contains the data for it, as long as the resource data are not accessed (or fallback is provided). @code -MyResourceManager* manager = MyResourceManager::instance(); -Resource texture(manager->get("texture")); -Resource shader(manager->get("shader")); -Resource cube(manager->get("cube")); +MyResourceManager& manager = MyResourceManager::instance(); +Resource texture{manager.get("texture")}; +Resource shader{manager.get("shader")}; +Resource cube{manager.get("cube")}; // The manager doesn't have data for the cube yet, add them if(!cube) { @@ -218,7 +219,7 @@ cube->draw(*shader); - Destroying resource references and deleting manager instance when nothing references the resources anymore. -@see AbstractResourceLoader +@see @ref AbstractResourceLoader */ /* Due to too much work involved with explicit template instantiation (all Resource combinations, all ResourceManagerData...), this class doesn't have @@ -580,12 +581,10 @@ template void ResourceManagerData::decrementReferenceCount(ResourceK } template struct ResourceManagerData::Data { - Data(const Data&) = delete; - Data& operator=(const Data&) = delete; - Data& operator=(Data&&) = delete; - Data(): data(nullptr), state(ResourceDataState::Mutable), policy(ResourcePolicy::Manual), referenceCount(0) {} + Data(const Data&) = delete; + Data(Data&& other): data(other.data), state(other.state), policy(other.policy), referenceCount(other.referenceCount) { other.data = nullptr; other.referenceCount = 0; @@ -593,6 +592,9 @@ template struct ResourceManagerData::Data { ~Data(); + Data& operator=(const Data&) = delete; + Data& operator=(Data&&) = delete; + T* data; ResourceDataState state; ResourcePolicy policy; diff --git a/src/Magnum/Sampler.h b/src/Magnum/Sampler.h index 286c10fa1..e65627462 100644 --- a/src/Magnum/Sampler.h +++ b/src/Magnum/Sampler.h @@ -243,23 +243,23 @@ class MAGNUM_EXPORT Sampler { #endif }; -/** @debugoperator{Magnum::Sampler} */ +/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Filter} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Filter value); -/** @debugoperator{Magnum::Sampler} */ +/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Mipmap} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Mipmap value); -/** @debugoperator{Magnum::Sampler} */ +/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Wrapping} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Wrapping value); -/** @debugoperator{Magnum::Sampler} */ +/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareMode} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::CompareMode value); -/** @debugoperator{Magnum::Sampler} */ +/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareFunction} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::CompareFunction value); #ifndef MAGNUM_TARGET_GLES -/** @debugoperator{Magnum::Sampler} */ +/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::DepthStencilMode} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::DepthStencilMode value); #endif diff --git a/src/Magnum/Shader.h b/src/Magnum/Shader.h index 4e1a7f735..165ebc665 100644 --- a/src/Magnum/Shader.h +++ b/src/Magnum/Shader.h @@ -301,7 +301,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{ARB,shader_image_load_store} * or particular shader stage is not available, returns `0`. - * @requires_gl Image load/store is not available in OpenGL ES. + * @requires_gl %Image load/store is not available in OpenGL ES. * @see @ref maxCombinedImageUniforms(), * @fn_gl{Get} with @def_gl{MAX_VERTEX_IMAGE_UNIFORMS}, * @def_gl{MAX_TESS_CONTROL_IMAGE_UNIFORMS}, @@ -318,7 +318,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{ARB,shader_image_load_store} * is not available, returns `0`. - * @requires_gl Image load/store is not available in OpenGL ES. + * @requires_gl %Image load/store is not available in OpenGL ES. * @see @ref maxImageUniforms(), * @fn_gl{Get} with @def_gl{MAX_COMBINED_IMAGE_UNIFORMS} */ @@ -330,7 +330,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object} * or particular shader stage is not available, returns `0`. - * @requires_gl Shader storage is not available in OpenGL ES. + * @requires_gl %Shader storage is not available in OpenGL ES. * @see @ref maxCombinedShaderStorageBlocks(), * @fn_gl{Get} with @def_gl{MAX_VERTEX_SHADER_STORAGE_BLOCKS}, * @def_gl{MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS}, @@ -347,7 +347,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject { * The result is cached, repeated queries don't result in repeated * OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object} * is not available, returns `0`. - * @requires_gl Shader storage is not available in OpenGL ES. + * @requires_gl %Shader storage is not available in OpenGL ES. * @see @ref maxShaderStorageBlocks(), * @fn_gl{Get} with @def_gl{MAX_COMBINED_SHADER_STORAGE_BLOCKS} */ @@ -508,10 +508,10 @@ class MAGNUM_EXPORT Shader: public AbstractObject { */ Shader& setLabel(const std::string& label); - /** @brief Shader type */ + /** @brief %Shader type */ Type type() const { return _type; } - /** @brief Shader sources */ + /** @brief %Shader sources */ std::vector sources() const; /** @@ -553,7 +553,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject { std::vector _sources; }; -/** @debugoperator{Magnum::Shader} */ +/** @debugoperatorclassenum{Magnum::Shader,Magnum::Shader::Type} */ Debug MAGNUM_EXPORT operator<<(Debug debug, Shader::Type value); inline Shader::Shader(Shader&& other) noexcept: _type(other._type), _id(other._id), _sources(std::move(other._sources)) { diff --git a/src/Magnum/Texture.h b/src/Magnum/Texture.h index 9986348a0..0a13ad6e2 100644 --- a/src/Magnum/Texture.h +++ b/src/Magnum/Texture.h @@ -699,7 +699,7 @@ template class Texture: public AbstractTexture { * * If @extension{EXT,direct_state_access} is not available, the texture * is bound to some texture unit before the operation. - * @see setMinificationFilter(), @fn_gl{ActiveTexture}, + * @see @ref setMinificationFilter(), @fn_gl{ActiveTexture}, * @fn_gl{BindTexture} and @fn_gl{GenerateMipmap} or * @fn_gl_extension{GenerateTextureMipmap,EXT,direct_state_access} * @requires_gl30 %Extension @extension{ARB,framebuffer_object} diff --git a/src/Magnum/Timeline.h b/src/Magnum/Timeline.h index 14a867da7..d86a1dc3b 100644 --- a/src/Magnum/Timeline.h +++ b/src/Magnum/Timeline.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class Magnum::Timeline + * @brief Class @ref Magnum::Timeline */ #include @@ -45,17 +45,18 @@ as source for animation speed computations. @section Timeline-usage Basic usage Construct the timeline on initialization so the instance is available for -whole lifetime of the application. Call start() before first draw event is +whole lifetime of the application. Call @ref start() before first draw event is performed, after everything is properly initialized. @note When timeline is started, it immediately starts measuring frame time. Be prepared that time of first frame will be much longer than time of - following frames. It mainly depends on where you called start() in your - initialization routine, but can be also affected by driver- and + following frames. It mainly depends on where you called @ref start() in + your initialization routine, but can be also affected by driver- and GPU-specific lazy texture binding, shader recompilations etc. -In your draw event implementation don't forget to call nextFrame() after -buffer swap. You can use previousFrameDuration() to compute animation speed. +In your draw event implementation don't forget to call @ref nextFrame() after +buffer swap. You can use @ref previousFrameDuration() to compute animation +speed. Example usage: @code @@ -87,7 +88,7 @@ class MAGNUM_EXPORT Timeline { * @brief Constructor * * Creates stopped timeline. - * @see start() + * @see @ref start() */ explicit Timeline(): _minimalFrameTime(0), _previousFrameDuration(0), running(false) {} @@ -99,7 +100,7 @@ class MAGNUM_EXPORT Timeline { * @return Reference to self (for method chaining) * * Default value is 0. - * @see nextFrame() + * @see @ref nextFrame() */ Timeline& setMinimalFrameTime(Float seconds) { _minimalFrameTime = seconds; @@ -110,14 +111,14 @@ class MAGNUM_EXPORT Timeline { * @brief Start timeline * * Sets previous frame time and duration to `0`. - * @see stop(), previousFrameDuration() + * @see @ref stop(), @ref previousFrameDuration() */ void start(); /** * @brief Stop timeline * - * @see start(), nextFrame() + * @see @ref start(), @ref nextFrame() */ void stop(); @@ -127,7 +128,7 @@ class MAGNUM_EXPORT Timeline { * If current frame time is smaller than minimal frame time, pauses * the execution for remaining time. * @note This function does nothing if the timeline is stopped. - * @see setMinimalFrameTime(), stop() + * @see @ref setMinimalFrameTime(), @ref stop() */ void nextFrame(); From 7590bc9b52d36d5e38f5762d21f1a021b171e2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 13 May 2014 20:30:52 +0200 Subject: [PATCH 19/47] Updated toolchains submodule. --- toolchains | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchains b/toolchains index f1228ede0..19d1e7ee8 160000 --- a/toolchains +++ b/toolchains @@ -1 +1 @@ -Subproject commit f1228ede05fc03db403711bf1458261a7758e68d +Subproject commit 19d1e7ee8bc61a6e1b4871c93e3aca4743e0ca9e From 2ca955bb29914f795ce25e59260f8053467f0ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 13 May 2014 21:29:49 +0200 Subject: [PATCH 20/47] Math: documented Matrix[34]::invertedRigid(). --- src/Magnum/Math/Matrix.h | 2 +- src/Magnum/Math/Matrix3.h | 9 +++++++-- src/Magnum/Math/Matrix4.h | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index 0b088714e..7e152f55f 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -137,7 +137,7 @@ template class Matrix: public RectangularMatrix class Matrix3: public Matrix<3, T> { * @brief Inverted rigid transformation matrix * * Expects that the matrix represents rigid transformation. - * Significantly faster than the general algorithm in @ref inverted(). + * Significantly faster than the general algorithm in @ref inverted(). @f[ + * A^{-1} = \begin{pmatrix} (A^{2,2})^T & (A^{2,2})^T \begin{pmatrix} a_{2,0} \\ a_{2,1} \end{pmatrix} \\ \begin{array}{cc} 0 & 0 \end{array} & 1 \end{pmatrix} + * @f] + * @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see + * @ref ij() * @see @ref isRigidTransformation(), @ref invertedOrthogonal(), - * @ref rotationScaling(), translation() const + * @ref rotationScaling(), translation() const, + * @ref Matrix4::invertedRigid() * @todoc Explicit reference when Doxygen can handle const */ Matrix3 invertedRigid() const; diff --git a/src/Magnum/Math/Matrix4.h b/src/Magnum/Math/Matrix4.h index 05c666482..c43fd1a98 100644 --- a/src/Magnum/Math/Matrix4.h +++ b/src/Magnum/Math/Matrix4.h @@ -350,9 +350,14 @@ template class Matrix4: public Matrix<4, T> { * @brief Inverted rigid transformation matrix * * Expects that the matrix represents rigid transformation. - * Significantly faster than the general algorithm in @ref inverted(). + * Significantly faster than the general algorithm in @ref inverted(). @f[ + * A^{-1} = \begin{pmatrix} (A^{3,3})^T & (A^{3,3})^T \begin{pmatrix} a_{3,0} \\ a_{3,1} \\ a_{3,2} \\ \end{pmatrix} \\ \begin{array}{ccc} 0 & 0 & 0 \end{array} & 1 \end{pmatrix} + * @f] + * @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see + * @ref ij() * @see @ref isRigidTransformation(), @ref invertedOrthogonal(), - * @ref rotationScaling(), translation() const + * @ref rotationScaling(), translation() const, + * @ref Matrix3::invertedRigid() * @todoc Explicit reference when Doxygen can handle const */ Matrix4 invertedRigid() const; From 257426d77c9fe7855f905830eb75e61ea7b61592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 13 May 2014 21:34:25 +0200 Subject: [PATCH 21/47] Updated Optional with fix for GCC 4.8 on OSX. Thanks to Stefan Wasilewski for reporting. --- src/MagnumExternal/Optional/optional.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MagnumExternal/Optional/optional.hpp b/src/MagnumExternal/Optional/optional.hpp index 07db190f5..e837628b3 100644 --- a/src/MagnumExternal/Optional/optional.hpp +++ b/src/MagnumExternal/Optional/optional.hpp @@ -151,7 +151,7 @@ template inline constexpr typename std::remove_reference::type&& co __assert(expr, line, file); // WHY. # elif defined __ANDROID__ __assert(file, line, expr); - # elif defined __clang__ || defined __GNU_LIBRARY__ + # elif defined __clang__ || defined __GNU_LIBRARY__ || (defined __GNUC__ && defined __APPLE__) __assert(expr, file, line); # elif defined __GNUC__ _assert(expr, file, line); From 3dde8a3d2d056ca5afe8583c540476a97ad2eaf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 13 May 2014 21:51:09 +0200 Subject: [PATCH 22/47] Updated Coding Style with new Doxygen commands. --- doc/coding-style.dox | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/coding-style.dox b/doc/coding-style.dox index ec1f45ca3..7650b7f98 100644 --- a/doc/coding-style.dox +++ b/doc/coding-style.dox @@ -98,8 +98,9 @@ void setPolygonMode(PolygonMode mode); @subsection documentation-commands Special documentation commands -Additionally to @c \@todoc, @c \@debugoperator @c \@configurationvalue and -@c \@configurationvalueref (same as in Corrade), these are defined: +Additionally to @c \@todoc, @c \@debugoperator, @c \debugoperatorenum, +@c \debugoperatorclassenum, @c \@configurationvalue and +@c \@configurationvalueref (same as in %Corrade), these are defined: @subsubsection documentation-commands-collisionoperator Shape collision operators From ac22d5ae5bb511738941439e93f66cca3faf3ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 13 May 2014 21:56:54 +0200 Subject: [PATCH 23/47] doc: Oops. --- doc/coding-style.dox | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/coding-style.dox b/doc/coding-style.dox index 7650b7f98..c2c9434a2 100644 --- a/doc/coding-style.dox +++ b/doc/coding-style.dox @@ -98,8 +98,8 @@ void setPolygonMode(PolygonMode mode); @subsection documentation-commands Special documentation commands -Additionally to @c \@todoc, @c \@debugoperator, @c \debugoperatorenum, -@c \debugoperatorclassenum, @c \@configurationvalue and +Additionally to @c \@todoc, @c \@debugoperator, @c \@debugoperatorenum, +@c \@debugoperatorclassenum, @c \@configurationvalue and @c \@configurationvalueref (same as in %Corrade), these are defined: @subsubsection documentation-commands-collisionoperator Shape collision operators From 4ceec156b52dc8676b47162f969b1e642fa0a198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 16 May 2014 23:44:26 +0200 Subject: [PATCH 24/47] MagnumExternal: updated glLoadGen-generated files. --- src/MagnumExternal/OpenGL/GL/extensions.txt | 1 + src/MagnumExternal/OpenGL/GL/gl_magnum.c | 7 +++++-- src/MagnumExternal/OpenGL/GL/gl_magnum.h | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/MagnumExternal/OpenGL/GL/extensions.txt b/src/MagnumExternal/OpenGL/GL/extensions.txt index 135a48876..9b9733d36 100644 --- a/src/MagnumExternal/OpenGL/GL/extensions.txt +++ b/src/MagnumExternal/OpenGL/GL/extensions.txt @@ -9,6 +9,7 @@ EXT_texture_filter_anisotropic EXT_texture_mirror_clamp EXT_direct_state_access + EXT_texture_sRGB_decode EXT_debug_label EXT_debug_marker GREMEDY_string_marker diff --git a/src/MagnumExternal/OpenGL/GL/gl_magnum.c b/src/MagnumExternal/OpenGL/GL/gl_magnum.c index f72669798..136800cfe 100644 --- a/src/MagnumExternal/OpenGL/GL/gl_magnum.c +++ b/src/MagnumExternal/OpenGL/GL/gl_magnum.c @@ -90,6 +90,7 @@ int ogl_ext_ATI_texture_mirror_once = ogl_LOAD_FAILED; int ogl_ext_EXT_texture_filter_anisotropic = ogl_LOAD_FAILED; int ogl_ext_EXT_texture_mirror_clamp = ogl_LOAD_FAILED; int ogl_ext_EXT_direct_state_access = ogl_LOAD_FAILED; +int ogl_ext_EXT_texture_sRGB_decode = ogl_LOAD_FAILED; int ogl_ext_EXT_debug_label = ogl_LOAD_FAILED; int ogl_ext_EXT_debug_marker = ogl_LOAD_FAILED; int ogl_ext_GREMEDY_string_marker = ogl_LOAD_FAILED; @@ -2632,7 +2633,7 @@ typedef struct ogl_StrToExtMap_s PFN_LOADFUNCPOINTERS LoadExtension; } ogl_StrToExtMap; -static ogl_StrToExtMap ExtensionMap[10] = { +static ogl_StrToExtMap ExtensionMap[11] = { {"GL_AMD_vertex_shader_layer", &ogl_ext_AMD_vertex_shader_layer, NULL}, {"GL_AMD_shader_trinary_minmax", &ogl_ext_AMD_shader_trinary_minmax, NULL}, {"GL_ARB_robustness", &ogl_ext_ARB_robustness, Load_ARB_robustness}, @@ -2640,12 +2641,13 @@ static ogl_StrToExtMap ExtensionMap[10] = { {"GL_EXT_texture_filter_anisotropic", &ogl_ext_EXT_texture_filter_anisotropic, NULL}, {"GL_EXT_texture_mirror_clamp", &ogl_ext_EXT_texture_mirror_clamp, NULL}, {"GL_EXT_direct_state_access", &ogl_ext_EXT_direct_state_access, Load_EXT_direct_state_access}, + {"GL_EXT_texture_sRGB_decode", &ogl_ext_EXT_texture_sRGB_decode, NULL}, {"GL_EXT_debug_label", &ogl_ext_EXT_debug_label, Load_EXT_debug_label}, {"GL_EXT_debug_marker", &ogl_ext_EXT_debug_marker, Load_EXT_debug_marker}, {"GL_GREMEDY_string_marker", &ogl_ext_GREMEDY_string_marker, Load_GREMEDY_string_marker}, }; -static int g_extensionMapSize = 10; +static int g_extensionMapSize = 11; static void ClearExtensionVars() { @@ -2656,6 +2658,7 @@ static void ClearExtensionVars() ogl_ext_EXT_texture_filter_anisotropic = ogl_LOAD_FAILED; ogl_ext_EXT_texture_mirror_clamp = ogl_LOAD_FAILED; ogl_ext_EXT_direct_state_access = ogl_LOAD_FAILED; + ogl_ext_EXT_texture_sRGB_decode = ogl_LOAD_FAILED; ogl_ext_EXT_debug_label = ogl_LOAD_FAILED; ogl_ext_EXT_debug_marker = ogl_LOAD_FAILED; ogl_ext_GREMEDY_string_marker = ogl_LOAD_FAILED; diff --git a/src/MagnumExternal/OpenGL/GL/gl_magnum.h b/src/MagnumExternal/OpenGL/GL/gl_magnum.h index cd53bf8a7..08bceb8e2 100644 --- a/src/MagnumExternal/OpenGL/GL/gl_magnum.h +++ b/src/MagnumExternal/OpenGL/GL/gl_magnum.h @@ -170,6 +170,7 @@ extern int ogl_ext_ATI_texture_mirror_once; extern int ogl_ext_EXT_texture_filter_anisotropic; extern int ogl_ext_EXT_texture_mirror_clamp; extern int ogl_ext_EXT_direct_state_access; +extern int ogl_ext_EXT_texture_sRGB_decode; extern int ogl_ext_EXT_debug_label; extern int ogl_ext_EXT_debug_marker; extern int ogl_ext_GREMEDY_string_marker; @@ -197,6 +198,10 @@ extern int ogl_ext_GREMEDY_string_marker; #define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F #define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_DECODE_EXT 0x8A49 +#define GL_SKIP_DECODE_EXT 0x8A4A +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 + #define GL_BUFFER_OBJECT_EXT 0x9151 #define GL_PROGRAM_OBJECT_EXT 0x8B40 #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F @@ -2081,6 +2086,7 @@ extern GLLOADGEN_EXPORT void (CODEGEN_FUNCPTR *_ptrc_glVertexArrayVertexOffsetEX #define glVertexArrayVertexOffsetEXT _ptrc_glVertexArrayVertexOffsetEXT #endif /*GL_EXT_direct_state_access*/ + #ifndef GL_EXT_debug_label #define GL_EXT_debug_label 1 extern GLLOADGEN_EXPORT void (CODEGEN_FUNCPTR *_ptrc_glGetObjectLabelEXT)(GLenum, GLuint, GLsizei, GLsizei *, GLchar *); From 4b6ae7afe6716c4fe977321e9e25e0708a8f21f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 16 May 2014 23:46:37 +0200 Subject: [PATCH 25/47] Support for EXT_texture_sRGB_decode. --- doc/opengl-mapping.dox | 2 +- doc/opengl-support.dox | 1 + src/Magnum/AbstractTexture.cpp | 5 ++ src/Magnum/AbstractTexture.h | 1 + src/Magnum/Context.cpp | 2 + src/Magnum/CubeMapTexture.h | 6 +++ src/Magnum/CubeMapTextureArray.h | 6 +++ src/Magnum/Extensions.h | 2 + src/Magnum/RectangleTexture.h | 17 ++++++ src/Magnum/Test/CubeMapTextureArrayGLTest.cpp | 14 +++++ src/Magnum/Test/CubeMapTextureGLTest.cpp | 16 ++++++ src/Magnum/Test/RectangleTextureGLTest.cpp | 14 +++++ src/Magnum/Test/TextureArrayGLTest.cpp | 36 +++++++++++++ src/Magnum/Test/TextureGLTest.cpp | 52 +++++++++++++++++++ src/Magnum/Texture.h | 20 +++++++ src/Magnum/TextureArray.h | 6 +++ 16 files changed, 199 insertions(+), 1 deletion(-) diff --git a/doc/opengl-mapping.dox b/doc/opengl-mapping.dox index dae5de8ee..9b06599c0 100644 --- a/doc/opengl-mapping.dox +++ b/doc/opengl-mapping.dox @@ -232,7 +232,7 @@ OpenGL function | Matching API @fn_gl{TexBuffer}, \n @fn_gl_extension{TextureBuffer,EXT,direct_state_access}, \n @fn_gl{TexBufferRange}, \n @fn_gl_extension{TextureBufferRange,EXT,direct_state_access} | @ref BufferTexture::setBuffer() @fn_gl{TexImage1D}, \n @fn_gl_extension{TextureImage1D,EXT,direct_state_access} \n @fn_gl{TexImage2D}, \n @fn_gl_extension{TextureImage2D,EXT,direct_state_access}, \n @fn_gl{TexImage3D}, \n @fn_gl_extension{TextureImage3D,EXT,direct_state_access} | @ref Texture::setImage(), \n @ref TextureArray::setImage(), \n @ref CubeMapTexture::setImage(), \n @ref CubeMapTextureArray::setImage(), \n @ref RectangleTexture::setImage() @fn_gl{TexImage2DMultisample}, \n @fn_gl{TexImage3DMultisample} | @ref MultisampleTexture::setStorage() -@fn_gl{TexParameter}, \n @fn_gl_extension{TextureParameter,EXT,direct_state_access} | @ref Texture::setBaseLevel() "*Texture::setBaseLevel()", \n @ref Texture::setMaxLevel() "*Texture::setMaxLevel()", \n @ref Texture::setMinificationFilter() "*Texture::setMinificationFilter()", \n @ref Texture::setMagnificationFilter() "*Texture::setMagnificationFilter()", \n @ref Texture::setMinLod() "*Texture::setMinLod()", \n @ref Texture::setMaxLod() "*Texture::setMaxLod()", \n @ref Texture::setLodBias() "*Texture::setLodBias()", \n @ref Texture::setWrapping() "*Texture::setWrapping()", \n @ref Texture::setBorderColor() "*Texture::setBorderColor()", \n @ref Texture::setMaxAnisotropy() "*Texture::setMaxAnisotropy()", \n @ref Texture::setSwizzle() "*Texture::setSwizzle()", \n @ref Texture::setCompareMode() "*Texture::setCompareMode()", \n @ref Texture::setCompareFunction() "*Texture::setCompareFunction()", \n @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()" +@fn_gl{TexParameter}, \n @fn_gl_extension{TextureParameter,EXT,direct_state_access} | @ref Texture::setBaseLevel() "*Texture::setBaseLevel()", \n @ref Texture::setMaxLevel() "*Texture::setMaxLevel()", \n @ref Texture::setMinificationFilter() "*Texture::setMinificationFilter()", \n @ref Texture::setMagnificationFilter() "*Texture::setMagnificationFilter()", \n @ref Texture::setMinLod() "*Texture::setMinLod()", \n @ref Texture::setMaxLod() "*Texture::setMaxLod()", \n @ref Texture::setLodBias() "*Texture::setLodBias()", \n @ref Texture::setWrapping() "*Texture::setWrapping()", \n @ref Texture::setBorderColor() "*Texture::setBorderColor()", \n @ref Texture::setMaxAnisotropy() "*Texture::setMaxAnisotropy()", \n @ref Texture::setSRGBDecode() "*Texture::setSRGBDecode()", \n @ref Texture::setSwizzle() "*Texture::setSwizzle()", \n @ref Texture::setCompareMode() "*Texture::setCompareMode()", \n @ref Texture::setCompareFunction() "*Texture::setCompareFunction()", \n @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()" @fn_gl{TexStorage1D}, \n @fn_gl_extension{TextureStorage1D,EXT,direct_state_access}, \n @fn_gl{TexStorage2D}, \n @fn_gl_extension{TextureStorage2D,EXT,direct_state_access}, \n @fn_gl{TexStorage3D}, \n @fn_gl_extension{TextureStorage3D,EXT,direct_state_access} | @ref Texture::setStorage(), \n @ref TextureArray::setStorage(), \n @ref CubeMapTexture::setStorage(), \n @ref CubeMapTextureArray::setStorage(), \n @ref RectangleTexture::setStorage() @fn_gl{TexStorage2DMultisample}, \n @fn_gl_extension{TextureStorage2DMultisample,EXT,direct_state_access}, \n @fn_gl{TexStorage3DMultisample}, \n @fn_gl_extension{TextureStorage3DMultisample,EXT,direct_state_access} | @ref MultisampleTexture::setStorage() @fn_gl{TexSubImage1D}, \n @fn_gl_extension{TextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{TexSubImage2D}, \n @fn_gl_extension{TextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{TexSubImage3D}, \n @fn_gl_extension{TextureSubImage3D,EXT,direct_state_access} | @ref Texture::setSubImage(), \n @ref TextureArray::setSubImage(), \n @ref CubeMapTexture::setSubImage(), \n @ref CubeMapTextureArray::setSubImage(), \n @ref RectangleTexture::setSubImage() diff --git a/doc/opengl-support.dox b/doc/opengl-support.dox index c6d91e1bf..3e71f098f 100644 --- a/doc/opengl-support.dox +++ b/doc/opengl-support.dox @@ -222,6 +222,7 @@ following: @extension{EXT,texture_filter_anisotropic} (also in ES) | done @extension{EXT,texture_mirror_clamp} | only GL 4.4 subset @extension{EXT,direct_state_access} | done for implemented functionality +@extension{EXT,texture_sRGB_decode} (also in ES) | done @extension{EXT,shader_integer_mix} (also in ES) | done (shading language only) @extension2{EXT,debug_label} (also in ES) | missing pipeline, transform feedback and sampler label @extension2{EXT,debug_marker} (also in ES) | missing marker groups diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index 56b005e64..b28a3b928 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -287,6 +287,11 @@ void AbstractTexture::setMaxAnisotropy(const Float anisotropy) { (this->*Context::current()->state().texture->setMaxAnisotropyImplementation)(anisotropy); } +void AbstractTexture::setSRGBDecode(bool decode) { + (this->*Context::current()->state().texture->parameteriImplementation)(GL_TEXTURE_SRGB_DECODE_EXT, + decode ? GL_DECODE_EXT : GL_SKIP_DECODE_EXT); +} + #ifndef MAGNUM_TARGET_GLES2 void AbstractTexture::setSwizzleInternal(const GLint r, const GLint g, const GLint b, const GLint a) { #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/AbstractTexture.h b/src/Magnum/AbstractTexture.h index 68e377828..58032d5aa 100644 --- a/src/Magnum/AbstractTexture.h +++ b/src/Magnum/AbstractTexture.h @@ -309,6 +309,7 @@ class MAGNUM_EXPORT AbstractTexture: public AbstractObject { void setBorderColor(const Vector4ui& color); #endif void setMaxAnisotropy(Float anisotropy); + void setSRGBDecode(bool decode); #ifndef MAGNUM_TARGET_GLES2 template void setSwizzle() { diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index ad57fa6be..c8e077396 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -66,6 +66,7 @@ const std::vector& Extension::extensions(Version version) { _extension(GL,EXT,texture_filter_anisotropic), _extension(GL,EXT,texture_mirror_clamp), _extension(GL,EXT,direct_state_access), + _extension(GL,EXT,texture_sRGB_decode), _extension(GL,EXT,shader_integer_mix), _extension(GL,EXT,debug_label), _extension(GL,EXT,debug_marker), @@ -199,6 +200,7 @@ const std::vector& Extension::extensions(Version version) { _extension(GL,EXT,debug_label), _extension(GL,EXT,debug_marker), _extension(GL,EXT,disjoint_timer_query), + _extension(GL,EXT,texture_sRGB_decode), _extension(GL,EXT,separate_shader_objects), _extension(GL,EXT,sRGB), _extension(GL,EXT,multisampled_render_to_texture), diff --git a/src/Magnum/CubeMapTexture.h b/src/Magnum/CubeMapTexture.h index 45372823f..59d7ad2e6 100644 --- a/src/Magnum/CubeMapTexture.h +++ b/src/Magnum/CubeMapTexture.h @@ -188,6 +188,12 @@ class MAGNUM_EXPORT CubeMapTexture: public AbstractTexture { return *this; } + /** @copydoc Texture::setSRGBDecode() */ + CubeMapTexture& setSRGBDecode(bool decode) { + AbstractTexture::setSRGBDecode(decode); + return *this; + } + #ifndef MAGNUM_TARGET_GLES2 /** @copydoc Texture::setSwizzle() */ template CubeMapTexture& setSwizzle() { diff --git a/src/Magnum/CubeMapTextureArray.h b/src/Magnum/CubeMapTextureArray.h index ab24ca357..7349f1d8e 100644 --- a/src/Magnum/CubeMapTextureArray.h +++ b/src/Magnum/CubeMapTextureArray.h @@ -218,6 +218,12 @@ class CubeMapTextureArray: public AbstractTexture { return *this; } + /** @copydoc RectangleTexture::setSRGBDecode() */ + CubeMapTextureArray& setSRGBDecode(bool decode) { + AbstractTexture::setSRGBDecode(decode); + return *this; + } + /** * @copybrief Texture::setSwizzle() * @return Reference to self (for method chaining) diff --git a/src/Magnum/Extensions.h b/src/Magnum/Extensions.h index 3e967f931..d5257f838 100644 --- a/src/Magnum/Extensions.h +++ b/src/Magnum/Extensions.h @@ -187,6 +187,7 @@ namespace GL { _extension(GL,EXT,transform_feedback, GL210, GL300) // #352 _extension(GL,EXT,direct_state_access, GL210, None) // #353 _extension(GL,EXT,texture_snorm, GL300, GL310) // #365 + _extension(GL,EXT,texture_sRGB_decode, GL210, None) // #402 _extension(GL,EXT,shader_integer_mix, GL300, None) // #437 _extension(GL,EXT,debug_label, GL210, None) // #439 _extension(GL,EXT,debug_marker, GL210, None) // #440 @@ -259,6 +260,7 @@ namespace GL { _extension(GL,EXT,map_buffer_range, GLES200, GLES300) // #121 #endif _extension(GL,EXT,disjoint_timer_query, GLES200, None) // #150 + _extension(GL,EXT,texture_sRGB_decode, GLES200, None) // #152 #ifdef MAGNUM_TARGET_GLES2 _extension(GL,EXT,instanced_arrays, GLES200, GLES300) // #156 _extension(GL,EXT,draw_instanced, GLES200, GLES300) // #157 diff --git a/src/Magnum/RectangleTexture.h b/src/Magnum/RectangleTexture.h index 3b5e4c5f9..02c1aa0a5 100644 --- a/src/Magnum/RectangleTexture.h +++ b/src/Magnum/RectangleTexture.h @@ -190,6 +190,23 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture { return *this; } + /** + * @brief Set sRGB decoding + * @return Reference to self (for method chaining) + * + * Disables or reenables decoding of sRGB values. Initial value is + * `true`. + * @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and + * @fn_gl{TexParameter} or + * @fn_gl_extension{TextureParameter,EXT,direct_state_access} with + * @def_gl{TEXTURE_SRGB_DECODE_EXT} + * @requires_extension %Extension @extension{EXT,texture_sRGB_decode} + */ + RectangleTexture& setSRGBDecode(bool decode) { + AbstractTexture::setSRGBDecode(decode); + return *this; + } + /** * @copybrief Texture::setSwizzle() * @return Reference to self (for method chaining) diff --git a/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp b/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp index 5fadb807a..1a3272d81 100644 --- a/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp +++ b/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp @@ -43,6 +43,7 @@ class CubeMapTextureArrayGLTest: public AbstractOpenGLTester { void bind(); void sampling(); + void samplingSRGBDecode(); void samplingBorderInteger(); void samplingSwizzle(); void samplingDepthStencilMode(); @@ -65,6 +66,7 @@ CubeMapTextureArrayGLTest::CubeMapTextureArrayGLTest() { &CubeMapTextureArrayGLTest::bind, &CubeMapTextureArrayGLTest::sampling, + &CubeMapTextureArrayGLTest::samplingSRGBDecode, &CubeMapTextureArrayGLTest::samplingBorderInteger, &CubeMapTextureArrayGLTest::samplingSwizzle, &CubeMapTextureArrayGLTest::samplingDepthStencilMode, @@ -141,6 +143,18 @@ void CubeMapTextureArrayGLTest::sampling() { MAGNUM_VERIFY_NO_ERROR(); } +void CubeMapTextureArrayGLTest::samplingSRGBDecode() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::ARB::texture_cube_map_array::string() + std::string(" is not supported.")); + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + CubeMapTextureArray texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + void CubeMapTextureArrayGLTest::samplingBorderInteger() { if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::texture_cube_map_array::string() + std::string(" is not supported.")); diff --git a/src/Magnum/Test/CubeMapTextureGLTest.cpp b/src/Magnum/Test/CubeMapTextureGLTest.cpp index 2dd8454dc..7428b0e10 100644 --- a/src/Magnum/Test/CubeMapTextureGLTest.cpp +++ b/src/Magnum/Test/CubeMapTextureGLTest.cpp @@ -46,6 +46,7 @@ class CubeMapTextureGLTest: public AbstractOpenGLTester { void bind(); void sampling(); + void samplingSRGBDecode(); #ifndef MAGNUM_TARGET_GLES2 void samplingSwizzle(); #else @@ -80,6 +81,7 @@ CubeMapTextureGLTest::CubeMapTextureGLTest() { &CubeMapTextureGLTest::bind, &CubeMapTextureGLTest::sampling, + &CubeMapTextureGLTest::samplingSRGBDecode, #ifndef MAGNUM_TARGET_GLES2 &CubeMapTextureGLTest::samplingSwizzle, #else @@ -169,6 +171,20 @@ void CubeMapTextureGLTest::sampling() { MAGNUM_VERIFY_NO_ERROR(); } +void CubeMapTextureGLTest::samplingSRGBDecode() { + #ifdef MAGNUM_TARGET_GLES2 + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::sRGB::string() + std::string(" is not supported.")); + #endif + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + CubeMapTexture texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + #ifndef MAGNUM_TARGET_GLES2 void CubeMapTextureGLTest::samplingSwizzle() { #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/Test/RectangleTextureGLTest.cpp b/src/Magnum/Test/RectangleTextureGLTest.cpp index 7a925626f..8bc4a3994 100644 --- a/src/Magnum/Test/RectangleTextureGLTest.cpp +++ b/src/Magnum/Test/RectangleTextureGLTest.cpp @@ -44,6 +44,7 @@ class RectangleTextureGLTest: public AbstractOpenGLTester { void bind(); void sampling(); + void samplingSRGBDecode(); void samplingBorderInteger(); void samplingSwizzle(); void samplingDepthStencilMode(); @@ -64,6 +65,7 @@ RectangleTextureGLTest::RectangleTextureGLTest() { &RectangleTextureGLTest::bind, &RectangleTextureGLTest::sampling, + &RectangleTextureGLTest::samplingSRGBDecode, &RectangleTextureGLTest::samplingBorderInteger, &RectangleTextureGLTest::samplingSwizzle, &RectangleTextureGLTest::samplingDepthStencilMode, @@ -137,6 +139,18 @@ void RectangleTextureGLTest::sampling() { MAGNUM_VERIFY_NO_ERROR(); } +void RectangleTextureGLTest::samplingSRGBDecode() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported.")); + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + RectangleTexture texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + void RectangleTextureGLTest::samplingBorderInteger() { if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported.")); diff --git a/src/Magnum/Test/TextureArrayGLTest.cpp b/src/Magnum/Test/TextureArrayGLTest.cpp index 495bcc392..9ba943824 100644 --- a/src/Magnum/Test/TextureArrayGLTest.cpp +++ b/src/Magnum/Test/TextureArrayGLTest.cpp @@ -55,6 +55,11 @@ class TextureArrayGLTest: public AbstractOpenGLTester { #endif void sampling2D(); + #ifndef MAGNUM_TARGET_GLES + void samplingSRGBDecode1D(); + #endif + void samplingSRGBDecode2D(); + #ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES void samplingSwizzle1D(); @@ -128,6 +133,11 @@ TextureArrayGLTest::TextureArrayGLTest() { #endif &TextureArrayGLTest::sampling2D, + #ifndef MAGNUM_TARGET_GLES + &TextureArrayGLTest::samplingSRGBDecode1D, + #endif + &TextureArrayGLTest::samplingSRGBDecode2D, + #ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES &TextureArrayGLTest::samplingSwizzle1D, @@ -292,6 +302,18 @@ void TextureArrayGLTest::sampling1D() { MAGNUM_VERIFY_NO_ERROR(); } +void TextureArrayGLTest::samplingSRGBDecode1D() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + Texture1DArray texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + void TextureArrayGLTest::samplingSwizzle1D() { if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::texture_swizzle::string() + std::string(" is not supported.")); @@ -361,6 +383,20 @@ void TextureArrayGLTest::sampling2D() { MAGNUM_VERIFY_NO_ERROR(); } +void TextureArrayGLTest::samplingSRGBDecode2D() { + #ifndef MAGNUM_TARGET_GLES + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); + #endif + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + Texture2DArray texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + #ifndef MAGNUM_TARGET_GLES2 void TextureArrayGLTest::samplingSwizzle2D() { #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/Test/TextureGLTest.cpp b/src/Magnum/Test/TextureGLTest.cpp index 8f6b6fead..fcbe09c4f 100644 --- a/src/Magnum/Test/TextureGLTest.cpp +++ b/src/Magnum/Test/TextureGLTest.cpp @@ -60,6 +60,12 @@ class TextureGLTest: public AbstractOpenGLTester { void sampling2D(); void sampling3D(); + #ifndef MAGNUM_TARGET_GLES + void samplingSRGBDecode1D(); + #endif + void samplingSRGBDecode2D(); + void samplingSRGBDecode3D(); + #ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES void samplingSwizzle1D(); @@ -156,6 +162,12 @@ TextureGLTest::TextureGLTest() { &TextureGLTest::sampling2D, &TextureGLTest::sampling3D, + #ifndef MAGNUM_TARGET_GLES + &TextureGLTest::samplingSRGBDecode1D, + #endif + &TextureGLTest::samplingSRGBDecode2D, + &TextureGLTest::samplingSRGBDecode3D, + #ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES &TextureGLTest::samplingSwizzle1D, @@ -367,6 +379,16 @@ void TextureGLTest::sampling1D() { MAGNUM_VERIFY_NO_ERROR(); } +void TextureGLTest::samplingSRGBDecode1D() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + Texture1D texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + void TextureGLTest::samplingSwizzle1D() { if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::texture_swizzle::string() + std::string(" is not supported.")); @@ -414,6 +436,20 @@ void TextureGLTest::sampling2D() { MAGNUM_VERIFY_NO_ERROR(); } +void TextureGLTest::samplingSRGBDecode2D() { + #ifdef MAGNUM_TARGET_GLES2 + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::sRGB::string() + std::string(" is not supported.")); + #endif + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + Texture2D texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + #ifndef MAGNUM_TARGET_GLES2 void TextureGLTest::samplingSwizzle2D() { #ifndef MAGNUM_TARGET_GLES @@ -515,6 +551,22 @@ void TextureGLTest::sampling3D() { MAGNUM_VERIFY_NO_ERROR(); } +void TextureGLTest::samplingSRGBDecode3D() { + #ifdef MAGNUM_TARGET_GLES2 + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::OES::texture_3D::string() + std::string(" is not supported.")); + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::sRGB::string() + std::string(" is not supported.")); + #endif + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported.")); + + Texture3D texture; + texture.setSRGBDecode(false); + + MAGNUM_VERIFY_NO_ERROR(); +} + #ifndef MAGNUM_TARGET_GLES2 void TextureGLTest::samplingSwizzle3D() { #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/Texture.h b/src/Magnum/Texture.h index 0a13ad6e2..864669fe6 100644 --- a/src/Magnum/Texture.h +++ b/src/Magnum/Texture.h @@ -442,6 +442,26 @@ template class Texture: public AbstractTexture { return *this; } + /** + * @brief Set sRGB decoding + * @return Reference to self (for method chaining) + * + * Disables or reenables decoding of sRGB values. Initial value is + * `true`. + * @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and + * @fn_gl{TexParameter} or + * @fn_gl_extension{TextureParameter,EXT,direct_state_access} with + * @def_gl{TEXTURE_SRGB_DECODE_EXT} + * @requires_extension %Extension @extension{EXT,texture_sRGB_decode} + * @requires_es_extension OpenGL ES 3.0 or extension + * @es_extension{EXT,sRGB} and + * @es_extension2{EXT,texture_sRGB_decode,texture_sRGB_decode} + */ + Texture& setSRGBDecode(bool decode) { + AbstractTexture::setSRGBDecode(decode); + return *this; + } + #ifndef MAGNUM_TARGET_GLES2 /** * @brief Set component swizzle diff --git a/src/Magnum/TextureArray.h b/src/Magnum/TextureArray.h index 0a671dbd7..bf4d8e94b 100644 --- a/src/Magnum/TextureArray.h +++ b/src/Magnum/TextureArray.h @@ -196,6 +196,12 @@ template class TextureArray: public AbstractTexture { return *this; } + /** @copydoc Texture::setSRGBDecode() */ + TextureArray& setSRGBDecode(bool decode) { + AbstractTexture::setSRGBDecode(decode); + return *this; + } + #ifndef MAGNUM_TARGET_GLES2 /** @copydoc Texture::setSwizzle() */ template TextureArray& setSwizzle() { From 839a87df430df2cfcd69557cef548650ef2c7b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 16 May 2014 23:58:58 +0200 Subject: [PATCH 26/47] Missing extension checks in texture GL tests. --- src/Magnum/Test/CubeMapTextureArrayGLTest.cpp | 3 +++ src/Magnum/Test/TextureArrayGLTest.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp b/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp index 1a3272d81..253c56ae2 100644 --- a/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp +++ b/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp @@ -99,6 +99,9 @@ void CubeMapTextureArrayGLTest::construct() { } void CubeMapTextureArrayGLTest::bind() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::ARB::texture_cube_map_array::string() + std::string(" is not supported.")); + CubeMapTextureArray texture; #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/Test/TextureArrayGLTest.cpp b/src/Magnum/Test/TextureArrayGLTest.cpp index 9ba943824..dc8fc08b9 100644 --- a/src/Magnum/Test/TextureArrayGLTest.cpp +++ b/src/Magnum/Test/TextureArrayGLTest.cpp @@ -315,6 +315,8 @@ void TextureArrayGLTest::samplingSRGBDecode1D() { } void TextureArrayGLTest::samplingSwizzle1D() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::texture_swizzle::string() + std::string(" is not supported.")); @@ -325,6 +327,8 @@ void TextureArrayGLTest::samplingSwizzle1D() { } void TextureArrayGLTest::samplingBorderInteger1D() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported.")); @@ -339,6 +343,8 @@ void TextureArrayGLTest::samplingBorderInteger1D() { } void TextureArrayGLTest::samplingDepthStencilMode1D() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported.")); @@ -400,6 +406,8 @@ void TextureArrayGLTest::samplingSRGBDecode2D() { #ifndef MAGNUM_TARGET_GLES2 void TextureArrayGLTest::samplingSwizzle2D() { #ifndef MAGNUM_TARGET_GLES + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::texture_swizzle::string() + std::string(" is not supported.")); #endif @@ -435,6 +443,8 @@ void TextureArrayGLTest::samplingCompare2D() { #ifndef MAGNUM_TARGET_GLES void TextureArrayGLTest::samplingBorderInteger2D() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::EXT::texture_integer::string() + std::string(" is not supported.")); @@ -449,6 +459,8 @@ void TextureArrayGLTest::samplingBorderInteger2D() { } void TextureArrayGLTest::samplingDepthStencilMode2D() { + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported.")); if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported.")); From 08dbf60b9345d942a1348785787cef8ef40e4ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 17 May 2014 11:18:24 +0200 Subject: [PATCH 27/47] Revert "Fixed compilation with GCC 4.9." The final release doesn't have the issue with non-explicit default std::vector constructor. Most of the conflicts resulted from Mesh::Primitve -> MeshPrimitive refactoring. This reverts commit c2ad09706e2bae00581b9942041e0e8c91c4bb03. Conflicts: src/Magnum/Primitives/Capsule.cpp src/Magnum/Primitives/Circle.cpp src/Magnum/Primitives/Crosshair.cpp src/Magnum/Primitives/Cylinder.cpp src/Magnum/Primitives/Icosphere.cpp src/Magnum/Primitives/Implementation/WireframeSpheroid.cpp src/Magnum/Primitives/Line.cpp src/Magnum/Primitives/Plane.cpp src/Magnum/Primitives/Square.cpp src/Magnum/Primitives/UVSphere.cpp src/Magnum/SceneGraph/Object.hpp src/Magnum/Text/GlyphCache.cpp src/Magnum/TextureTools/Atlas.cpp src/Magnum/TextureTools/Test/AtlasTest.cpp --- src/Magnum/MeshTools/Test/GenerateFlatNormalsTest.cpp | 2 +- src/Magnum/Primitives/Capsule.cpp | 8 ++++---- src/Magnum/Primitives/Circle.cpp | 8 ++++---- src/Magnum/Primitives/Crosshair.cpp | 8 ++++---- src/Magnum/Primitives/Cube.cpp | 4 ++-- src/Magnum/Primitives/Cylinder.cpp | 4 ++-- src/Magnum/Primitives/Icosphere.cpp | 2 +- .../Primitives/Implementation/WireframeSpheroid.cpp | 2 +- src/Magnum/Primitives/Line.cpp | 8 ++++---- src/Magnum/Primitives/Plane.cpp | 6 +++--- src/Magnum/Primitives/Square.cpp | 6 +++--- src/Magnum/Primitives/UVSphere.cpp | 4 ++-- src/Magnum/SceneGraph/Object.hpp | 8 ++++---- src/Magnum/Text/AbstractFontConverter.cpp | 8 ++++---- src/Magnum/Text/GlyphCache.cpp | 2 +- src/Magnum/TextureTools/Atlas.cpp | 2 +- src/Magnum/TextureTools/Test/AtlasTest.cpp | 2 +- src/MagnumPlugins/MagnumFont/MagnumFont.cpp | 2 +- 18 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/Magnum/MeshTools/Test/GenerateFlatNormalsTest.cpp b/src/Magnum/MeshTools/Test/GenerateFlatNormalsTest.cpp index ed124c931..5a3bd797e 100644 --- a/src/Magnum/MeshTools/Test/GenerateFlatNormalsTest.cpp +++ b/src/Magnum/MeshTools/Test/GenerateFlatNormalsTest.cpp @@ -51,7 +51,7 @@ void GenerateFlatNormalsTest::wrongIndexCount() { std::vector normals; std::tie(indices, normals) = MeshTools::generateFlatNormals({ 0, 1 - }, std::vector{}); + }, {}); CORRADE_COMPARE(indices.size(), 0); CORRADE_COMPARE(normals.size(), 0); diff --git a/src/Magnum/Primitives/Capsule.cpp b/src/Magnum/Primitives/Capsule.cpp index e68d1281d..dc6271d18 100644 --- a/src/Magnum/Primitives/Capsule.cpp +++ b/src/Magnum/Primitives/Capsule.cpp @@ -36,7 +36,7 @@ namespace Magnum { namespace Primitives { Trade::MeshData2D Capsule2D::wireframe(UnsignedInt hemisphereRings, UnsignedInt cylinderRings, Float halfLength) { - CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData2D(MeshPrimitive::Lines, std::vector{}, std::vector>{}, std::vector>{})); + CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData2D(MeshPrimitive::Lines, {}, {}, {})); std::vector positions; positions.reserve(hemisphereRings*4+2+(cylinderRings-1)*2); @@ -87,11 +87,11 @@ Trade::MeshData2D Capsule2D::wireframe(UnsignedInt hemisphereRings, UnsignedInt {UnsignedInt(positions.size())-3, UnsignedInt(positions.size())-1, UnsignedInt(positions.size())-2, UnsignedInt(positions.size())-1}); - return Trade::MeshData2D(MeshPrimitive::Lines, std::move(indices), {std::move(positions)}, std::vector>{}); + return Trade::MeshData2D(MeshPrimitive::Lines, std::move(indices), {std::move(positions)}, {}); } Trade::MeshData3D Capsule3D::solid(UnsignedInt hemisphereRings, UnsignedInt cylinderRings, UnsignedInt segments, Float halfLength, TextureCoords textureCoords) { - CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 3, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData3D(MeshPrimitive::Triangles, std::vector{}, std::vector>{}, std::vector>{}, std::vector>{})); + CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 3, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData3D(MeshPrimitive::Triangles, {}, {}, {}, {})); Implementation::Spheroid capsule(segments, textureCoords == TextureCoords::Generate ? Implementation::Spheroid::TextureCoords::Generate : @@ -125,7 +125,7 @@ Trade::MeshData3D Capsule3D::solid(UnsignedInt hemisphereRings, UnsignedInt cyli } Trade::MeshData3D Capsule3D::wireframe(const UnsignedInt hemisphereRings, const UnsignedInt cylinderRings, const UnsignedInt segments, const Float halfLength) { - CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Capsule::wireframe(): improper parameters", Trade::MeshData3D(MeshPrimitive::Lines, std::vector{}, std::vector>{}, std::vector>{}, std::vector>{})); + CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Capsule::wireframe(): improper parameters", Trade::MeshData3D(MeshPrimitive::Lines, {}, {}, {}, {})); Implementation::WireframeSpheroid capsule(segments/4); diff --git a/src/Magnum/Primitives/Circle.cpp b/src/Magnum/Primitives/Circle.cpp index 0645ff61d..73a7e5ac3 100644 --- a/src/Magnum/Primitives/Circle.cpp +++ b/src/Magnum/Primitives/Circle.cpp @@ -34,7 +34,7 @@ namespace Magnum { namespace Primitives { Trade::MeshData2D Circle::solid(UnsignedInt segments) { CORRADE_ASSERT(segments >= 3, "Primitives::Circle::solid(): segments must be >= 3", - Trade::MeshData2D(MeshPrimitive::TriangleFan, std::vector{}, std::vector>{}, std::vector>{})); + Trade::MeshData2D(MeshPrimitive::TriangleFan, {}, {}, {})); std::vector positions; positions.reserve(segments+1); @@ -49,12 +49,12 @@ Trade::MeshData2D Circle::solid(UnsignedInt segments) { positions.emplace_back(Math::cos(angle), Math::sin(angle)); } - return Trade::MeshData2D(MeshPrimitive::TriangleFan, std::vector{}, {std::move(positions)}, std::vector>{}); + return Trade::MeshData2D(MeshPrimitive::TriangleFan, {}, {std::move(positions)}, {}); } Trade::MeshData2D Circle::wireframe(UnsignedInt segments) { CORRADE_ASSERT(segments >= 3, "Primitives::Circle::wireframe(): segments must be >= 3", - Trade::MeshData2D(MeshPrimitive::LineLoop, std::vector{}, std::vector>{}, std::vector>{})); + Trade::MeshData2D(MeshPrimitive::LineLoop, {}, {}, {})); std::vector positions; positions.reserve(segments); @@ -66,7 +66,7 @@ Trade::MeshData2D Circle::wireframe(UnsignedInt segments) { positions.emplace_back(Math::cos(angle), Math::sin(angle)); } - return Trade::MeshData2D(MeshPrimitive::LineLoop, std::vector{}, {std::move(positions)}, std::vector>{}); + return Trade::MeshData2D(MeshPrimitive::LineLoop, {}, {std::move(positions)}, {}); } }} diff --git a/src/Magnum/Primitives/Crosshair.cpp b/src/Magnum/Primitives/Crosshair.cpp index 1e560a1cf..1ff21a27a 100644 --- a/src/Magnum/Primitives/Crosshair.cpp +++ b/src/Magnum/Primitives/Crosshair.cpp @@ -33,18 +33,18 @@ namespace Magnum { namespace Primitives { Trade::MeshData2D Crosshair2D::wireframe() { - return Trade::MeshData2D(MeshPrimitive::Lines, std::vector{}, {{ + return Trade::MeshData2D(MeshPrimitive::Lines, {}, {{ {-1.0f, 0.0f}, {1.0f, 0.0f}, { 0.0f, -1.0f}, {0.0f, 1.0f} - }}, std::vector>{}); + }}, {}); } Trade::MeshData3D Crosshair3D::wireframe() { - return Trade::MeshData3D(MeshPrimitive::Lines, std::vector{}, {{ + return Trade::MeshData3D(MeshPrimitive::Lines, {}, {{ {-1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, { 0.0f, -1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, { 0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, 1.0f} - }}, std::vector>{}, std::vector>{}); + }}, {}, {}); } }} diff --git a/src/Magnum/Primitives/Cube.cpp b/src/Magnum/Primitives/Cube.cpp index 55d221766..bddbc78ca 100644 --- a/src/Magnum/Primitives/Cube.cpp +++ b/src/Magnum/Primitives/Cube.cpp @@ -99,7 +99,7 @@ Trade::MeshData3D Cube::solid() { {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, /* -X */ {-1.0f, 0.0f, 0.0f} - }}, std::vector>{}); + }}, {}); } Trade::MeshData3D Cube::wireframe() { @@ -118,7 +118,7 @@ Trade::MeshData3D Cube::wireframe() { { 1.0f, -1.0f, -1.0f}, { 1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f} - }}, std::vector>{}, std::vector>{}); + }}, {}, {}); } }} diff --git a/src/Magnum/Primitives/Cylinder.cpp b/src/Magnum/Primitives/Cylinder.cpp index ca07526de..cf32b5602 100644 --- a/src/Magnum/Primitives/Cylinder.cpp +++ b/src/Magnum/Primitives/Cylinder.cpp @@ -34,7 +34,7 @@ namespace Magnum { namespace Primitives { Trade::MeshData3D Cylinder::solid(const UnsignedInt rings, const UnsignedInt segments, const Float halfLength, const Flags flags) { - CORRADE_ASSERT(rings >= 1 && segments >= 3, "Primitives::Cylinder::solid(): cylinder must have at least one ring and three segments", Trade::MeshData3D(MeshPrimitive::Triangles, std::vector{}, std::vector>{}, std::vector>{}, std::vector>{})); + CORRADE_ASSERT(rings >= 1 && segments >= 3, "Primitives::Cylinder::solid(): cylinder must have at least one ring and three segments", Trade::MeshData3D(MeshPrimitive::Triangles, {}, {}, {}, {})); Implementation::Spheroid cylinder(segments, flags & Flag::GenerateTextureCoords ? Implementation::Spheroid::TextureCoords::Generate : Implementation::Spheroid::TextureCoords::DontGenerate); @@ -65,7 +65,7 @@ Trade::MeshData3D Cylinder::solid(const UnsignedInt rings, const UnsignedInt seg } Trade::MeshData3D Cylinder::wireframe(const UnsignedInt rings, const UnsignedInt segments, const Float halfLength) { - CORRADE_ASSERT(rings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Cylinder::wireframe(): improper parameters", Trade::MeshData3D(MeshPrimitive::Lines, std::vector{}, std::vector>{}, std::vector>{}, std::vector>{})); + CORRADE_ASSERT(rings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Cylinder::wireframe(): improper parameters", Trade::MeshData3D(MeshPrimitive::Lines, {}, {}, {}, {})); Implementation::WireframeSpheroid cylinder(segments/4); diff --git a/src/Magnum/Primitives/Icosphere.cpp b/src/Magnum/Primitives/Icosphere.cpp index 83a3d7496..8afa4699a 100644 --- a/src/Magnum/Primitives/Icosphere.cpp +++ b/src/Magnum/Primitives/Icosphere.cpp @@ -81,7 +81,7 @@ Trade::MeshData3D Icosphere::solid(const UnsignedInt subdivisions) { indices = MeshTools::duplicate(indices, MeshTools::removeDuplicates(positions)); std::vector normals(positions); - return Trade::MeshData3D(MeshPrimitive::Triangles, std::move(indices), {std::move(positions)}, {std::move(normals)}, std::vector>{}); + return Trade::MeshData3D(MeshPrimitive::Triangles, std::move(indices), {std::move(positions)}, {std::move(normals)}, {}); } }} diff --git a/src/Magnum/Primitives/Implementation/WireframeSpheroid.cpp b/src/Magnum/Primitives/Implementation/WireframeSpheroid.cpp index 73a0d1957..269049158 100644 --- a/src/Magnum/Primitives/Implementation/WireframeSpheroid.cpp +++ b/src/Magnum/Primitives/Implementation/WireframeSpheroid.cpp @@ -111,7 +111,7 @@ void WireframeSpheroid::cylinder() { } Trade::MeshData3D WireframeSpheroid::finalize() { - return Trade::MeshData3D(MeshPrimitive::Lines, std::move(_indices), {std::move(_positions)}, std::vector>{}, std::vector>{}); + return Trade::MeshData3D(MeshPrimitive::Lines, std::move(_indices), {std::move(_positions)}, {}, {}); } }}} diff --git a/src/Magnum/Primitives/Line.cpp b/src/Magnum/Primitives/Line.cpp index ec372e3bd..6ed3fc9c8 100644 --- a/src/Magnum/Primitives/Line.cpp +++ b/src/Magnum/Primitives/Line.cpp @@ -33,15 +33,15 @@ namespace Magnum { namespace Primitives { Trade::MeshData2D Line2D::wireframe() { - return Trade::MeshData2D(MeshPrimitive::Lines, std::vector{}, {{ + return Trade::MeshData2D(MeshPrimitive::Lines, {}, {{ {0.0f, 0.0f}, {1.0f, 0.0f} - }}, std::vector>{}); + }}, {}); } Trade::MeshData3D Line3D::wireframe() { - return Trade::MeshData3D(MeshPrimitive::Lines, std::vector{}, {{ + return Trade::MeshData3D(MeshPrimitive::Lines, {}, {{ {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, - }}, std::vector>{}, std::vector>{}); + }}, {}, {}); } }} diff --git a/src/Magnum/Primitives/Plane.cpp b/src/Magnum/Primitives/Plane.cpp index 1885bfda3..1d84dd578 100644 --- a/src/Magnum/Primitives/Plane.cpp +++ b/src/Magnum/Primitives/Plane.cpp @@ -40,7 +40,7 @@ Trade::MeshData3D Plane::solid(const TextureCoords textureCoords) { {0.0f, 1.0f} }); - return Trade::MeshData3D(MeshPrimitive::TriangleStrip, std::vector{}, {{ + return Trade::MeshData3D(MeshPrimitive::TriangleStrip, {}, {{ {1.0f, -1.0f, 0.0f}, {1.0f, 1.0f, 0.0f}, {-1.0f, -1.0f, 0.0f}, @@ -54,12 +54,12 @@ Trade::MeshData3D Plane::solid(const TextureCoords textureCoords) { } Trade::MeshData3D Plane::wireframe() { - return Trade::MeshData3D(MeshPrimitive::LineLoop, std::vector{}, {{ + return Trade::MeshData3D(MeshPrimitive::LineLoop, {}, {{ {-1.0f, -1.0f, 0.0f}, {1.0f, -1.0f, 0.0f}, {1.0f, 1.0f, 0.0f}, {-1.0f, 1.0f, 0.0f} - }}, std::vector>{}, std::vector>{}); + }}, {}, {}); } }} diff --git a/src/Magnum/Primitives/Square.cpp b/src/Magnum/Primitives/Square.cpp index 31f26ad1d..6de852eed 100644 --- a/src/Magnum/Primitives/Square.cpp +++ b/src/Magnum/Primitives/Square.cpp @@ -40,7 +40,7 @@ Trade::MeshData2D Square::solid(const TextureCoords textureCoords) { {0.0f, 1.0f} }); - return Trade::MeshData2D(MeshPrimitive::TriangleStrip, std::vector{}, {{ + return Trade::MeshData2D(MeshPrimitive::TriangleStrip, {}, {{ {1.0f, -1.0f}, {1.0f, 1.0f}, {-1.0f, -1.0f}, @@ -49,12 +49,12 @@ Trade::MeshData2D Square::solid(const TextureCoords textureCoords) { } Trade::MeshData2D Square::wireframe() { - return Trade::MeshData2D(MeshPrimitive::LineLoop, std::vector{}, {{ + return Trade::MeshData2D(MeshPrimitive::LineLoop, {}, {{ {-1.0f, -1.0f}, {1.0f, -1.0f}, {1.0f, 1.0f}, {-1.0f, 1.0f} - }}, std::vector>{}); + }}, {}); } }} diff --git a/src/Magnum/Primitives/UVSphere.cpp b/src/Magnum/Primitives/UVSphere.cpp index e8b0c8166..996cca089 100644 --- a/src/Magnum/Primitives/UVSphere.cpp +++ b/src/Magnum/Primitives/UVSphere.cpp @@ -34,7 +34,7 @@ namespace Magnum { namespace Primitives { Trade::MeshData3D UVSphere::solid(UnsignedInt rings, UnsignedInt segments, TextureCoords textureCoords) { - CORRADE_ASSERT(rings >= 2 && segments >= 3, "UVSphere must have at least two rings and three segments", Trade::MeshData3D(MeshPrimitive::Triangles, std::vector{}, std::vector>{}, std::vector>{}, std::vector>{})); + CORRADE_ASSERT(rings >= 2 && segments >= 3, "UVSphere must have at least two rings and three segments", Trade::MeshData3D(MeshPrimitive::Triangles, {}, {}, {}, {})); Implementation::Spheroid sphere(segments, textureCoords == TextureCoords::Generate ? Implementation::Spheroid::TextureCoords::Generate : @@ -61,7 +61,7 @@ Trade::MeshData3D UVSphere::solid(UnsignedInt rings, UnsignedInt segments, Textu } Trade::MeshData3D UVSphere::wireframe(const UnsignedInt rings, const UnsignedInt segments) { - CORRADE_ASSERT(rings >= 2 && rings%2 == 0 && segments >= 4 && segments%2 == 0, "Primitives::UVSphere::wireframe(): improper parameters", Trade::MeshData3D(MeshPrimitive::Lines, std::vector{}, std::vector>{}, std::vector>{}, std::vector>{})); + CORRADE_ASSERT(rings >= 2 && rings%2 == 0 && segments >= 4 && segments%2 == 0, "Primitives::UVSphere::wireframe(): improper parameters", Trade::MeshData3D(MeshPrimitive::Lines, {}, {}, {}, {})); Implementation::WireframeSpheroid sphere(segments/4); diff --git a/src/Magnum/SceneGraph/Object.hpp b/src/Magnum/SceneGraph/Object.hpp index 876d3653e..a08a0c8d4 100644 --- a/src/Magnum/SceneGraph/Object.hpp +++ b/src/Magnum/SceneGraph/Object.hpp @@ -275,7 +275,7 @@ computed and recursively concatenated together. Resulting transformations for joints which were originally in `object` list is then returned. */ template std::vector Object::transformations(std::vector>> objects, const typename Transformation::DataType& initialTransformation) const { - CORRADE_ASSERT(objects.size() < 0xFFFFu, "SceneGraph::Object::transformations(): too large scene", std::vector{}); + CORRADE_ASSERT(objects.size() < 0xFFFFu, "SceneGraph::Object::transformations(): too large scene", {}); /* Remember object count for later */ std::size_t objectCount = objects.size(); @@ -296,7 +296,7 @@ template std::vector Ob const Scene* scene = this->scene(); /* Nearest common ancestor not yet implemented - assert this is done on scene */ - CORRADE_ASSERT(scene == this, "SceneGraph::Object::transformationMatrices(): currently implemented only for Scene", std::vector{}); + CORRADE_ASSERT(scene == this, "SceneGraph::Object::transformationMatrices(): currently implemented only for Scene", {}); /* Mark all objects up the hierarchy as visited */ auto it = objects.begin(); @@ -314,7 +314,7 @@ template std::vector Ob /* If this is root object, remove from list */ if(!parent) { - CORRADE_ASSERT(&it->get() == scene, "SceneGraph::Object::transformations(): the objects are not part of the same tree", std::vector{}); + CORRADE_ASSERT(&it->get() == scene, "SceneGraph::Object::transformations(): the objects are not part of the same tree", {}); it = objects.erase(it); /* Parent is an joint or already visited - remove current from list */ @@ -325,7 +325,7 @@ template std::vector Ob list of joint objects */ if(!(parent->flags & Flag::Joint)) { CORRADE_ASSERT(jointObjects.size() < 0xFFFFu, - "SceneGraph::Object::transformations(): too large scene", std::vector{}); + "SceneGraph::Object::transformations(): too large scene", {}); CORRADE_INTERNAL_ASSERT(parent->counter == 0xFFFFu); parent->counter = UnsignedShort(jointObjects.size()); parent->flags |= Flag::Joint; diff --git a/src/Magnum/Text/AbstractFontConverter.cpp b/src/Magnum/Text/AbstractFontConverter.cpp index fad84639e..0ae8e6278 100644 --- a/src/Magnum/Text/AbstractFontConverter.cpp +++ b/src/Magnum/Text/AbstractFontConverter.cpp @@ -41,7 +41,7 @@ AbstractFontConverter::AbstractFontConverter(PluginManager::AbstractManager& man std::vector>> AbstractFontConverter::exportFontToData(AbstractFont& font, GlyphCache& cache, const std::string& filename, const std::string& characters) const { CORRADE_ASSERT(features() >= (Feature::ExportFont|Feature::ConvertData), - "Text::AbstractFontConverter::exportFontToData(): feature not supported", (std::vector>>{})); + "Text::AbstractFontConverter::exportFontToData(): feature not supported", {}); return doExportFontToData(font, cache, filename, uniqueUnicode(characters)); } @@ -53,7 +53,7 @@ std::vector>> AbstractFo #endif { CORRADE_ASSERT(!(features() & Feature::MultiFile), - "Text::AbstractFontConverter::exportFontToData(): feature advertised but not implemented", (std::vector>>{})); + "Text::AbstractFontConverter::exportFontToData(): feature advertised but not implemented", {}); std::vector>> out; out.emplace_back(filename, std::move(doExportFontToSingleData(font, cache, characters))); @@ -107,14 +107,14 @@ bool AbstractFontConverter::doExportFontToFile(AbstractFont& font, GlyphCache& c std::vector>> AbstractFontConverter::exportGlyphCacheToData(GlyphCache& cache, const std::string& filename) const { CORRADE_ASSERT(features() >= (Feature::ExportGlyphCache|Feature::ConvertData), - "Text::AbstractFontConverter::exportGlyphCacheToData(): feature not supported", (std::vector>>{})); + "Text::AbstractFontConverter::exportGlyphCacheToData(): feature not supported", {}); return doExportGlyphCacheToData(cache, filename); } std::vector>> AbstractFontConverter::doExportGlyphCacheToData(GlyphCache& cache, const std::string& filename) const { CORRADE_ASSERT(!(features() & Feature::MultiFile), - "Text::AbstractFontConverter::exportGlyphCacheToData(): feature advertised but not implemented", (std::vector>>{})); + "Text::AbstractFontConverter::exportGlyphCacheToData(): feature advertised but not implemented", {}); std::vector>> out; out.emplace_back(filename, std::move(doExportGlyphCacheToSingleData(cache))); diff --git a/src/Magnum/Text/GlyphCache.cpp b/src/Magnum/Text/GlyphCache.cpp index 551cec2ce..65fe27ad0 100644 --- a/src/Magnum/Text/GlyphCache.cpp +++ b/src/Magnum/Text/GlyphCache.cpp @@ -82,7 +82,7 @@ void GlyphCache::initialize(const TextureFormat internalFormat, const Vector2i& std::vector GlyphCache::reserve(const std::vector& sizes) { CORRADE_ASSERT((glyphs.size() == 1 && glyphs.at(0) == std::pair()), - "Text::GlyphCache::reserve(): reserving space in non-empty cache is not yet implemented", std::vector{}); + "Text::GlyphCache::reserve(): reserving space in non-empty cache is not yet implemented", {}); glyphs.reserve(glyphs.size() + sizes.size()); return TextureTools::atlas(_size, sizes, _padding); } diff --git a/src/Magnum/TextureTools/Atlas.cpp b/src/Magnum/TextureTools/Atlas.cpp index 0e1492afc..c7f14d6a7 100644 --- a/src/Magnum/TextureTools/Atlas.cpp +++ b/src/Magnum/TextureTools/Atlas.cpp @@ -31,7 +31,7 @@ namespace Magnum { namespace TextureTools { std::vector atlas(const Vector2i& atlasSize, const std::vector& sizes, const Vector2i& padding) { - if(sizes.empty()) return std::vector{}; + if(sizes.empty()) return {}; /* Size of largest texture */ Vector2i maxSize; diff --git a/src/Magnum/TextureTools/Test/AtlasTest.cpp b/src/Magnum/TextureTools/Test/AtlasTest.cpp index 5ab66bc68..b0a99d272 100644 --- a/src/Magnum/TextureTools/Test/AtlasTest.cpp +++ b/src/Magnum/TextureTools/Test/AtlasTest.cpp @@ -77,7 +77,7 @@ void AtlasTest::createPadding() { } void AtlasTest::createEmpty() { - std::vector atlas = TextureTools::atlas({}, std::vector{}); + std::vector atlas = TextureTools::atlas({}, {}); CORRADE_VERIFY(atlas.empty()); } diff --git a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp index f0a5f2342..577da8116 100644 --- a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp +++ b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp @@ -149,7 +149,7 @@ std::pair MagnumFont::doOpenFile(const std::string& filename, Floa std::pair MagnumFont::openInternal(Utility::Configuration&& conf, Trade::ImageData2D&& image) { /* Everything okay, save the data internally */ - _opened = new Data{std::move(conf), std::move(image), std::unordered_map{}, std::vector{}}; + _opened = new Data{std::move(conf), std::move(image), std::unordered_map{}, {}}; /* Glyph advances */ const std::vector glyphs = _opened->conf.groups("glyph"); From fd609b65ef44b0c265a0b410bf9a3f9114474ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 17 May 2014 11:20:12 +0200 Subject: [PATCH 28/47] package: removed GCC 4.9 PKGBUILD. Useless now, as 4.9 is in the repo. --- package/archlinux/PKGBUILD-gcc49 | 56 -------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 package/archlinux/PKGBUILD-gcc49 diff --git a/package/archlinux/PKGBUILD-gcc49 b/package/archlinux/PKGBUILD-gcc49 deleted file mode 100644 index 1421f402c..000000000 --- a/package/archlinux/PKGBUILD-gcc49 +++ /dev/null @@ -1,56 +0,0 @@ -# Author: mosra -pkgname=magnum -pkgver=dev.gcc49 -pkgrel=1 -pkgdesc="C++11 and OpenGL 2D/3D graphics engine (built with GCC 4.9)" -arch=('i686' 'x86_64') -url="http://mosra.cz/blog/magnum.php" -license=('MIT') -depends=('corrade' 'openal' 'freeglut' 'sdl2') -makedepends=('cmake' 'ninja' 'gcc-git') -options=('!strip' 'staticlibs') -provides=('magnum-git') - -build() { - if [ ! -d "$startdir/build-gcc49" ] ; then - mkdir "$startdir/build-gcc49" - cd "$startdir/build-gcc49" - - cmake .. \ - -DCMAKE_CXX_COMPILER=g++-4.9 \ - -G Ninja - fi - - cd "$startdir/build-gcc49" - - cmake .. \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DWITH_AUDIO=ON \ - -DWITH_GLUTAPPLICATION=ON \ - -DWITH_GLXAPPLICATION=ON \ - -DWITH_SDL2APPLICATION=ON \ - -DWITH_WINDOWLESSGLXAPPLICATION=ON \ - -DWITH_MAGNUMFONT=ON \ - -DWITH_MAGNUMFONTCONVERTER=ON \ - -DWITH_OBJIMPORTER=ON \ - -DWITH_TGAIMAGECONVERTER=ON \ - -DWITH_TGAIMPORTER=ON \ - -DWITH_WAVAUDIOIMPORTER=ON \ - -DWITH_DISTANCEFIELDCONVERTER=ON \ - -DWITH_FONTCONVERTER=ON \ - -DWITH_MAGNUMINFO=ON \ - -DBUILD_TESTS=ON \ - -DBUILD_GL_TESTS=ON - ninja -} - -check() { - cd "$startdir/build-gcc49" - ctest --output-on-failure -j5 -} - -package() { - cd "$startdir/build-gcc49" - DESTDIR="$pkgdir/" ninja install -} From ce08ef6a04f3ac6925b4b03cd56eb0f2c87fad50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 17 May 2014 12:43:44 +0200 Subject: [PATCH 29/47] Updated Doxyfile to 1.8.7. --- Doxyfile | 2307 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 1364 insertions(+), 943 deletions(-) diff --git a/Doxyfile b/Doxyfile index e5aff0b02..538c742ca 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,112 +1,129 @@ -# Doxyfile 1.8.4 +# Doxyfile 1.8.7 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # -# All text after a double hash (##) is considered a comment and is placed -# in front of the TAG it is preceding . -# All text after a hash (#) is considered a comment and will be ignored. +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. # The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or sequence of words) that should -# identify the project. Note that if you do not use Doxywizard you need -# to put quotes around the project name if it contains spaces. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. PROJECT_NAME = Magnum -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. PROJECT_LOGO = -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. OUTPUT_DIRECTORY = build/doc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. CREATE_SUBDIRS = NO +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, -# Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, -# Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. +# The default value is: YES. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# doxygen will generate a detailed section even if there is only a brief # description. +# The default value is: NO. ALWAYS_DETAILED_SEC = NO @@ -114,92 +131,106 @@ ALWAYS_DETAILED_SEC = NO # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. +# The default value is: NO. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. Note that you specify absolute paths here, but also -# relative paths, which will be relative from the directory where doxygen is -# started. +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = ../magnum/src \ ../magnum-plugins/src \ ../magnum-integration/src -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. STRIP_FROM_INC_PATH = ../magnum/src \ ../magnum-plugins/src \ ../magnum-integration/src -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. JAVADOC_AUTOBRIEF = NO -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. ALIASES = \ "debugoperator{1}=@relates \1\n@brief Debug output operator @xrefitem debugoperators \"Debug output operator\" \"Debug output operators for custom types\" Allows printing @ref \1 with @ref Corrade::Utility::Debug and friends." \ @@ -240,57 +271,65 @@ ALIASES = \ "def_al{1}=`AL_\1`" # This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding -# "class=itcl::class" will allow you to use the command class in the -# itcl::class meaning. +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. TCL_SUBST = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, -# and language is one of the parsers supported by doxygen: IDL, Java, -# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, -# C++. For instance to make doxygen treat .inc files as Fortran files (default -# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note -# that for custom extensions you also need to set FILE_PATTERNS otherwise the -# files are not read by doxygen. +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. EXTENSION_MAPPING = -# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all -# comments according to the Markdown format, which allows for more readable +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you -# can mix doxygen, HTML, and XML commands with Markdown formatting. -# Disable only in case of backward compatibilities issues. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. MARKDOWN_SUPPORT = YES @@ -298,35 +337,41 @@ MARKDOWN_SUPPORT = YES # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by by putting a % sign in front of the word # or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. +# The default value is: NO. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. +# The default value is: NO. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES (the -# default) will make doxygen replace the get and set methods by a property in -# the documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. IDL_PROPERTY_SUPPORT = YES @@ -334,52 +379,63 @@ IDL_PROPERTY_SUPPORT = YES # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. +# The default value is: NO. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. SUBGROUPING = YES -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. INLINE_GROUPED_CLASSES = NO -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and -# unions with only public data fields or simple typedef fields will be shown -# inline in the documentation of the scope in which they are defined (i.e. file, +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set -# to NO (the default), structs, classes, and unions are shown on a separate -# page (for HTML and Man pages) or section (for LaTeX and RTF). +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. ## `YES` causes unclosed element for TgaImporter class in tag file + INLINE_SIMPLE_STRUCTS = NO -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can -# be an expensive process and often the same symbol appear multiple times in -# the code, doxygen keeps a cache of pre-resolved symbols. If the cache is too -# small doxygen will become slower. If the cache is too large, memory is wasted. -# The cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid -# range is 0..9, the default is 0, corresponding to a cache size of 2^16 = 65536 -# symbols. +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 @@ -388,312 +444,357 @@ LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. +# The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. EXTRACT_LOCAL_CLASSES = NO -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. HIDE_FRIEND_COMPOUNDS = YES -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. +# The default value is: system dependent. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. SHOW_INCLUDE_FILES = YES -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. FORCE_LOCAL_INCLUDES = NO -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. SORT_MEMBER_DOCS = NO -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. SORT_BRIEF_DOCS = NO -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. SORT_BY_SCOPE_NAME = YES -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if section-label ... \endif -# and \cond section-label ... \endcond blocks. +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. SHOW_USED_FILES = NO -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. LAYOUT_FILE = -# The CITE_BIB_FILES tag can be used to specify one or more bib files -# containing the references data. This must be a list of .bib files. The -# .bib extension is automatically appended if omitted. Using this command -# requires the bibtex tool to be installed. See also -# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style -# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this -# feature you need bibtex and perl available in the search path. Do not use -# file names with spaces, bibtex cannot handle them. +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. WARN_IF_DOC_ERROR = YES -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. INPUT = src/Magnum \ src/MagnumPlugins \ @@ -705,35 +806,38 @@ INPUT = src/Magnum \ ../magnum-examples/doc/ # This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. FILE_PATTERNS = *.cpp \ *.h \ *.hpp \ *.dox -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. +# # Note that relative paths are relative to the directory from which doxygen is # run. @@ -742,14 +846,16 @@ EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. +# The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = @@ -758,44 +864,51 @@ EXCLUDE_PATTERNS = # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = Magnum::*Implementation \ Magnum::*Test -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). EXAMPLE_PATH = ../magnum-examples/src/ # If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). IMAGE_PATH = doc/ \ ../magnum-examples/src/ # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be ignored. +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. @@ -803,172 +916,222 @@ IMAGE_PATH = doc/ \ INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = -# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub -# and want reuse the introduction page also for the doxygen output. +# and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C, C++ and Fortran comments will always remain visible. +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. REFERENCED_BY_RELATION = NO -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. REFERENCES_RELATION = NO -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 3 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is advised to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when -# changing the value of configuration settings such as GENERATE_TREEVIEW! +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If left blank doxygen will -# generate a default style sheet. Note that it is recommended to use -# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this -# tag will in the future become obsolete. +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional -# user-defined cascading style sheet that is included after the standard -# style sheets created by doxygen. Using this option one can overrule -# certain style aspects. This is preferred over using HTML_STYLESHEET -# since it does not replace the standard style sheet and is therefor more -# robust against future updates. Doxygen will copy the style sheet file to -# the output directory. +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = @@ -976,632 +1139,803 @@ HTML_EXTRA_STYLESHEET = # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the style sheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of -# entries shown in the various tree structured indices initially; the user -# can expand and collapse entries dynamically later on. Doxygen will expand -# the tree to such a level that at most the specified number of entries are -# visible (unless a fully collapsed tree already exceeds this amount). -# So setting the number of entries 1 will produce a full collapsed tree by -# default. 0 is a special value representing an infinite number of entries -# and will result in a full expanded tree by default. +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely -# identify the documentation publisher. This should be a reverse domain-name -# style string, e.g. com.mycompany.MyDocSet.documentation. +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be # written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project -# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) -# at top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. Since the tabs have the same information as the -# navigation tree you can set this option to NO if you already set -# GENERATE_TREEVIEW to YES. +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. -# Since the tree basically has the same information as the tab index you -# could consider to set DISABLE_INDEX to NO when enabling this option. +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 12 # Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you may also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for -# the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and -# SVG. The default value is HTML-CSS, which is slower, but has the best -# compatibility. +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to -# the MathJax Content Delivery Network so you can quickly see the result without -# installing MathJax. -# However, it is strongly recommended to install a local -# copy of MathJax from http://www.mathjax.org before deployment. +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax -# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension -# names that should be enabled during MathJax rendering. +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript -# pieces of code that will be used on startup of the MathJax code. +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /