diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index 760ab480a17..becfeb9a8dc 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -174,9 +174,12 @@ jobs: uses: actions/checkout@master with: path: src/Radium-Engine + submodules: 'recursive' - name: pull updated repo (e.g. with new VERSION) if: ${{ github.event_name == 'push' }} - run: git -C src/Radium-Engine pull origin ${{ github.event.ref }} + run: | + git -C src/Radium-Engine pull origin ${{ github.event.ref }} + git -C src/Radium-Engine submodule update --init --recursive - name: Cache externals id: cache-external uses: actions/cache@v3 diff --git a/.github/workflows/deploy-doc.yml b/.github/workflows/deploy-doc.yml index 2676d0a7090..1fe2556e388 100644 --- a/.github/workflows/deploy-doc.yml +++ b/.github/workflows/deploy-doc.yml @@ -42,7 +42,7 @@ jobs: sudo apt-get install graphviz plantuml clang-9 libclang-9-dev - name: Fetch recent doxygen (1.9.8) run: | - wget https://sourceforge.net/projects/doxygen/files/rel-1.9.8/doxygen-1.9.8.linux.bin.tar.gz -O doxygen.tar.gz + wget https://sourceforge.net/projects/doxygen/files/rel-1.12.0/doxygen-1.12.0.linux.bin.tar.gz -O doxygen.tar.gz tar -zxvf doxygen.tar.gz -C doxygen --wildcards "*/bin" mv doxygen/*/bin doxygen/ - name: Extract ref for badges prefix diff --git a/.gitmodules b/.gitmodules index 41142acc89f..29ea01a6fa6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "external/doxygen-awesome-css"] path = external/doxygen-awesome-css url = https://github.com/jothepro/doxygen-awesome-css.git +[submodule "cmake/cmake-message-helpers"] + path = cmake/cmake-message-helpers + url = https://github.com/dlyr/cmake-message-helpers.git diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ede5f024344..090b0c2aff3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: trailing-whitespace exclude: ^tests/.*/data/.*$ @@ -26,12 +26,12 @@ repos: # - id: cppcheck # args: [--enable=all] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.37.0 + rev: v0.42.0 hooks: - id: markdownlint args: [-f] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.2 + rev: v19.1.1 hooks: - id: clang-format types_or: [c++, c, cuda] diff --git a/CMakeLists.txt b/CMakeLists.txt index 30f0208ccae..645f59fab26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,8 @@ cmake_policy(SET CMP0092 NEW) # do not set /W3 for msvc set(CMAKE_DISABLE_SOURCE_CHANGES ON) set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) - +include(${CMAKE_SOURCE_DIR}/cmake/cmake-message-helpers/MessageHelpers.cmake) +message_prefix_push("Main") # Project setup, versioning stuff here, change when changing the version # ~~~ # Note: keep the project name lower case only for easy linux packaging support @@ -172,6 +173,7 @@ endif(RADIUM_ENABLE_COVERAGE) # Installation utilities include(RadiumSetupFunctions) +message_prefix_pop() # Documentation build add_subdirectory(doc) @@ -296,7 +298,7 @@ install(FILES LICENSE README.md TYPE DATA) # ------------------------------------------------------------------------------- # Wrap up of settings printed on build -include(MessageFunc) + message(NOTICE "") message_title(" Final overview for ${PROJECT_NAME} ") message_info(" ") diff --git a/README.md b/README.md index 3f84f60e590..5247219e44d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Radium-Engine libraries -![banner](doc/images/radium-banner.png) +![banner](doc/images/radium-banner.webp) Radium is a research 3D Engine for rendering, animation and processing. It is developed and maintained by the [STORM research group](https://www.irit.fr/STORM/site/). diff --git a/cmake/MessageFunc.cmake b/cmake/MessageFunc.cmake deleted file mode 100644 index abea7f94628..00000000000 --- a/cmake/MessageFunc.cmake +++ /dev/null @@ -1,113 +0,0 @@ -# these functions are to print nice messages in some boxes ... - -# you can control the output width with the DISPLAY_WIDTH var which as a default value set to -# set(DISPLAY_WIDTH 80) - -# ~~~ -# For instance -# -# message_title(" Example ") -# message_info(" Some information") -# message_setting("DISPLAY_WIDTH") -# message_end() -# Outputs -# -# ┌────────────────────────────────┤│ Example │├──────────────────────────────────┐ -# │ Some information │ -# │ DISPLAY_WIDTH 80 │ -# └───────────────────────────────────────────────────────────────────────────────┘ -# -# Or outputs -# -# ┌──┤│ Example │├────┐ -# │ Some information │ -# │ DISPLAY_WIDTH ⏎│ -# │ 20 │ -# └───────────────────┘ -# -# Depending of the DISPLAY_WIDTH value -# ~~~ - -# set default value -if(NOT DEFINED DISPLAY_WIDTH) - set(DISPLAY_WIDTH 80) -endif() - -# message_format used internally -function(message_format TEXT PRE PRE_LEN POST POST_LEN FILL) - set(TEXT_LEN 0) - if(TEXT) - string(LENGTH ${TEXT} TEXT_LEN) - endif() - math(EXPR LEN "${DISPLAY_WIDTH} - ${TEXT_LEN} - ${PRE_LEN} - ${POST_LEN}") - set(FILL1 "") - if(LEN LESS 0) - math(EXPR SUBLEN "${DISPLAY_WIDTH} - ${PRE_LEN} - ${POST_LEN}-1") - string(SUBSTRING ${TEXT} 0 ${SUBLEN} STRING1) - math(EXPR PL2 "${POST_LEN}+1") - message_format(${STRING1} ${PRE} ${PRE_LEN} "⏎${POST}" ${PL2} ${FILL}) - string(SUBSTRING ${TEXT} ${SUBLEN} -1 STRING2) - message_format(${STRING2} ${PRE} ${PRE_LEN} ${POST} ${POST_LEN} ${FILL}) - else() - foreach(i RANGE ${LEN}) - set(FILL1 "${FILL1}${FILL}") - endforeach() - - message(NOTICE "${PRE}${TEXT}${FILL1}${POST}") - endif() -endfunction() - -function(message_info INFO) - set(PRE "│ ") - set(PRE_LEN 2) - set(POST "│") - set(POST_LEN 1) - message_format(${INFO} ${PRE} ${PRE_LEN} ${POST} ${POST_LEN} " ") -endfunction() - -function(message_setting OPTION) - set(PRE "│ ") - set(PRE_LEN 2) - set(POST "│") - set(POST_LEN 1) - - string(LENGTH ${OPTION} len) - math(EXPR len "30-${len}") - set(FILL "") - foreach(i RANGE ${len}) - set(FILL "${FILL} ") - endforeach() - - if(DEFINED ${OPTION}) - set(MSG "${OPTION}${FILL}${${OPTION}}") - else() - set(MSG "${OPTION}${FILL}[undef]") - endif() - message_format(${MSG} ${PRE} ${PRE_LEN} ${POST} ${POST_LEN} " ") -endfunction() - -function(message_title TITLE) - string(LENGTH ${TITLE} len) - math(EXPR len "${DISPLAY_WIDTH}-6-${len}") - math(EXPR len1 "${len}/2") - math(EXPR len1 "${len1}-1") - math(EXPR len2 "${len}-${len1}-1") - set(FILL1 "") - foreach(i RANGE ${len1}) - set(FILL1 "${FILL1}─") - endforeach() - set(FILL2 "") - - foreach(i RANGE ${len2}) - set(FILL2 "${FILL2}─") - endforeach() - message(NOTICE "┌${FILL1}┤│${TITLE}│├${FILL2}┐") -endfunction() - -function(message_end) - set(PRE "└") - set(PRE_LEN 1) - set(POST "┘") - set(POST_LEN 1) - message_format("" ${PRE} ${PRE_LEN} ${POST} ${POST_LEN} "─") -endfunction() diff --git a/cmake/Sanitizers.cmake b/cmake/Sanitizers.cmake index 610d0eb0e94..68303d41721 100644 --- a/cmake/Sanitizers.cmake +++ b/cmake/Sanitizers.cmake @@ -1,4 +1,4 @@ -list(APPEND CMAKE_MESSAGE_INDENT "[Sanitizers] ") +message_prefix_push("Sanitizers") # ------------------------------------------------------------------------------ # Clang and gcc sanitizers if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") @@ -36,4 +36,4 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL endif() endif() -list(REMOVE_AT CMAKE_MESSAGE_INDENT -1) +message_prefix_pop() diff --git a/cmake/cmake-message-helpers b/cmake/cmake-message-helpers new file mode 160000 index 00000000000..4b695812e62 --- /dev/null +++ b/cmake/cmake-message-helpers @@ -0,0 +1 @@ +Subproject commit 4b695812e6263b7130baabf114b8737a2ea59f38 diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 9826eaaaa06..18348fdebf8 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,8 +1,4 @@ -# This CMake file will add doc target for convenient documentation generation. -# -# Additional features are supported: -# * dot = for automatically generated UML diagrams (class, include, caller, call, collaboration) -# * PlantUML = for easy generation of custom diagrams +# inspiration https://github.com/kracejic/EmptyDoxygenCMake/blob/master/CMakeLists.txt cmake_minimum_required(VERSION 3.18) project(radium-doc) @@ -10,51 +6,29 @@ project(radium-doc) if(POLICY CMP0077) cmake_policy(SET CMP0077 NEW) endif() -# Helper functions -list(APPEND CMAKE_MESSAGE_INDENT "[Doc] ") -macro(path_linux_to_win MsysPath ResultingPath) - string(REGEX REPLACE "^/([a-zA-Z])/" "\\1:/" ${ResultingPath} "${MsysPath}") -endmacro() -macro(path_win_to_linux MsysPath ResultingPath) - string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" ${ResultingPath} "${MsysPath}") -endmacro() +include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/cmake-message-helpers/MessageHelpers.cmake) +message_prefix_push("Doc") # enable if doxygen found -find_package(Doxygen 1.8.0) -message(STATUS "Can build doc? ${DOXYGEN_FOUND}") +find_package(Doxygen 1.8 OPTIONAL_COMPONENTS dot) + +message(NOTICE "") +message_title(" documentation ${PROJECT_NAME} ") +message_info("Can build doc? ${DOXYGEN_FOUND}") + if(DOXYGEN_FOUND) # Search for plantUML for creating UML diagrams from doxygen - find_program( - PLANT_UML_PATH NAMES plantuml.jar plantuml PATH_SUFFIXES PlantUML plantuml Plantuml - PATHS /usr/share /usr/local/share/ /usr/local/bin /opt/local/bin c/Program\ Files* + get_target_property(DOT_IMPORTED Doxygen::dot "IMPORTED") + message_setting("DOT_IMPORTED") + find_file(PLANT_UML_PATH NAMES plantuml.jar plantuml PATH_SUFFIXES PlantUML plantuml Plantuml + PATHS /usr/share /usr/local/share/ /usr/local/bin /opt/local/bin c/Program\ Files* ) - if(NOT PLANT_UML_PATH) - message( - WARNING - "Looking for PlantUML - not found, some UML diagrams will not be generated via doxygen." - ) - else() - message(STATUS " + PlantUML - for custom UML YES ") - endif() - - # Search for DOT for autogenerated UML diagrams from doxygen - find_program(DOT_PATH dot PATH_SUFFIXES graphviz2.38/bin graphviz/bin) - if(NOT DOT_PATH) - message( - WARNING - "Looking for DOT (Graphviz) - not found, some UML diagrams will not be generated via doxygen." - ) - else() - message(STATUS " + Graphviz/Dot - for generated graphs YES ") + message_setting("PLANT_UML_PATH") + if(PLANT_UML_PATH) + set(DOXYGEN_PLANTUML_JAR_PATH "${PLANT_UML_PATH}") endif() - path_win_to_linux(${CMAKE_CURRENT_SOURCE_DIR} CMAKE_CURRENT_SOURCE_DIR_LINUX) - path_win_to_linux(${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_LINUX) - path_win_to_linux(${DOT_PATH} DOT_PATH_LINUX) - path_win_to_linux(${PLANT_UML_PATH} PLANT_UML_PATH_LINUX) - path_win_to_linux(${CMAKE_CURRENT_BINARY_DIR} CMAKE_CURRENT_BINARY_DIR_LINUX) - # configure doxygen target set(RADIUM_DOC_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/) set(RADIUM_MAIN_DOC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/main.md) @@ -84,7 +58,7 @@ if(DOXYGEN_FOUND) set(RADIUM_DOXYGEN_AWESOME_CSS "") endif() endif() - message(STATUS "Use Doxygen Awesome CSS? ${USE_AWESOME_CSS}") + message_setting("USE_AWESOME_CSS") # set RADIUM_PROJECT_NUMBER from VERSION file file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/../VERSION" INPUT_Radium_VERSION) @@ -119,18 +93,12 @@ if(DOXYGEN_FOUND) set(DOXYGEN_EXTRACT_ALL "NO") set(DOXYGEN_EXTRACT_STATIC "YES") set(DOXYGEN_EXT_LINKS_IN_WINDOW "YES") - set(DOXYGEN_FORCE_LOCAL_INCLUDES "NO") - set(DOXYGEN_GENERATE_TREEVIEW "YES") - set(DOXYGEN_HAVE_DOT "YES") set(DOXYGEN_HIDE_UNDOC_CLASSES "YES") set(DOXYGEN_HIDE_UNDOC_RELATIONS "NO") set(DOXYGEN_HTML_COLORSTYLE "LIGHT") - set(DOXYGEN_HTML_COLORSTYLE_GAMMA "160") - set(DOXYGEN_HTML_COLORSTYLE_HUE "40") - set(DOXYGEN_HTML_COLORSTYLE_SAT "50") + set(DOXYGEN_HTML_COPY_CLIPBOARD "NO") set(DOXYGEN_HTML_DYNAMIC_SECTIONS "YES") set(DOXYGEN_HTML_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/header.html") - set(DOXYGEN_HTML_TIMESTAMP "YES") set(DOXYGEN_IMAGE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/images") set(DOXYGEN_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../src") set(DOXYGEN_INTERACTIVE_SVG "YES") @@ -138,7 +106,7 @@ if(DOXYGEN_FOUND) set(DOXYGEN_MATHJAX_EXTENSIONS "TeX/AMSsymbols" "TeX/AMSmath") set(DOXYGEN_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/") set(DOXYGEN_PREDEFINED "PARSED_BY_DOXYGEN MULTIARCH= ") - set(DOXYGEN_PROJECT_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/images/radium-logo.png") + set(DOXYGEN_PROJECT_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/images/radium-logo.webp") set(DOXYGEN_PROJECT_NAME "Radium Engine") set(DOXYGEN_PROJECT_NUMBER "${RADIUM_PROJECT_NUMBER}") set(DOXYGEN_RECURSIVE "YES") @@ -156,6 +124,9 @@ if(DOXYGEN_FOUND) set(DOXYGEN_WARN_IF_UNDOCUMENTED "NO") if(USE_AWESOME_CSS) + set(DOXYGEN_GENERATE_TREEVIEW "YES") + set(DOXYGEN_DISABLE_INDEX "NO") + set(DOXYGEN_FULL_SIDEBAR "NO") set(DOXYGEN_HTML_EXTRA_STYLESHEET "${RADIUM_DOXYGEN_AWESOME_CSS}" "${RADIUM_DOXYGEN_AWESOME_CSS_ROOT}/doxygen-awesome-sidebar-only.css" @@ -179,11 +150,12 @@ if(DOXYGEN_FOUND) ${CURRENT_SRC_DIR} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMENT "Generating API documentation with Doxygen" ) - # Where docs will be installed. if(RADIUM_INSTALL_DOC) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html TYPE DOC OPTIONAL) endif() endif() +message_end() +message(NOTICE "") -list(REMOVE_AT CMAKE_MESSAGE_INDENT -1) +message_prefix_pop() diff --git a/doc/LICENSES.md b/doc/LICENSES.md index 169b90d0ca1..bb5027b3477 100644 --- a/doc/LICENSES.md +++ b/doc/LICENSES.md @@ -13,7 +13,7 @@ Radium Engine © the Radium Contributors : * Hugo Rens (imgui and shader editor) * Valentin Roussellet (core engine, animation and skinning plugins, Windows port) * Thomas Subileau (spatial data structures) -* David Vanderhaeghe (core, engine, gui, rendering) +* David Vanderhaeghe (core, engine, gui, rendering, logo and graphics) * Florian Canezin (core, engine, gui, plugins, file loading) # Third-party libraries @@ -61,7 +61,3 @@ be obtained at [https://github.com/assimp/assimp/blob/master/LICENSE](https://gi STB image is a header-only library, released in the public domain. The source code is included in this repository or can be obtained at [https://github.com/nothings/stb](https://github.com/nothings/stb) - -## Additional material - -X-ray Icon, made by *Freepik* from www.flaticon.com is licensed under CC BY 3.0 diff --git a/doc/developer/cmakeutilities.md b/doc/developer/cmakeutilities.md index ab3f10331db..2180be78192 100644 --- a/doc/developer/cmakeutilities.md +++ b/doc/developer/cmakeutilities.md @@ -69,6 +69,7 @@ The Radium components are : - IO_HAS_TINYPLY : Identify if Radium::IO was compiled with tinyply support, - IO_HAS_VOLUMES : Identify if Radium::IO was compiled with pvm volume loader support. You might use these properties to define compilation macro in your code + - ~~~{.cmake} get_target_property(USE_ASSIMP Radium::IO IO_HAS_ASSIMP) @@ -117,10 +118,8 @@ This function takes the following parameters: *Parameter name* | *Parameter description* --------------------------------------------|-------------------- ` applicationName` | The name of the *executable* target to configure and install -`` | If this option is given, the plugins installed into the Radium bundle at -the installation time will be copied into the application bundle. -` ResourceDir1 ResourceDir2 ...` | Optional list of directories to be considered as application resources -and installed into the application bundle. +`` | If this option is given, the plugins installed into the Radium bundle at the installation time will be copied into the application bundle. +` ResourceDir1 ResourceDir2 ...` | Optional list of directories to be considered as application resources and installed into the application bundle. When installed into a directory ``, the application bundle has the following structure on linux, windows or on MacOsX (if the executable is not configured as a `MACOSX_BUNDLE`): diff --git a/doc/developer/material.md b/doc/developer/material.md index 6222d11246e..20c9a4a8a61 100644 --- a/doc/developer/material.md +++ b/doc/developer/material.md @@ -148,9 +148,9 @@ Then to set a texture according to the semantic: ### Making a material editable {#editable-interface} -Material which implement the Ra::Engine::Data::ParameterSetEditionInterface might be modified at runtime. +Material which implement the Ra::Engine::Data::ParameterSetEditingInterface might be modified at runtime. -This interface exposes the method Ra::Engine::Data::ParameterSetEditionInterface::getParametersMetadata +This interface exposes the method Ra::Engine::Data::ParameterSetEditingInterface::getParametersMetadata which return a json-formatted parameter set informations containing type, constraints and documentation on each editable parameter. @@ -173,7 +173,7 @@ The "editable" property specifies whether the boolean is editable, for instance #### Enums -When a parameter is referenced as an enum, the edition gui will present a combobox with the string representation of +When a parameter is referenced as an enum, the editing gui will present a combobox with the string representation of the enumaration values. Enumeration strings, could be defined in two ways. Either by associating a RenderParameter::EnumConverter with the material's parameter set or by defining the strings diff --git a/doc/header.html b/doc/header.html index 63fefbb6398..f31369f23fc 100644 --- a/doc/header.html +++ b/doc/header.html @@ -1,36 +1,40 @@ - - + - + $projectname: $title $title + + + + -$treeview -$search -$mathjax - -$extrastylesheet - - - + + + +$treeview +$search +$mathjax + +$extrastylesheet +
diff --git a/doc/images/radium-banner.png b/doc/images/radium-banner.png deleted file mode 100644 index 9ef2919f3d5..00000000000 Binary files a/doc/images/radium-banner.png and /dev/null differ diff --git a/doc/images/radium-banner.webp b/doc/images/radium-banner.webp new file mode 100644 index 00000000000..de8285a227e Binary files /dev/null and b/doc/images/radium-banner.webp differ diff --git a/doc/images/radium-logo.png b/doc/images/radium-logo.png deleted file mode 100644 index 57b88c4166c..00000000000 Binary files a/doc/images/radium-logo.png and /dev/null differ diff --git a/doc/images/radium-logo.webp b/doc/images/radium-logo.webp new file mode 100644 index 00000000000..29e089cef3e Binary files /dev/null and b/doc/images/radium-logo.webp differ diff --git a/doc/main.md b/doc/main.md index c10a3f84ee9..d6470542667 100644 --- a/doc/main.md +++ b/doc/main.md @@ -1,12 +1,22 @@ \mainpage -![banner](images/radium-banner.png) +![banner](images/radium-banner.webp) Radium is a research 3D Engine for rendering, animation and processing. Developed and maintained by the [STORM research group](https://www.irit.fr/STORM/site/). The source code is hosted on github: -# Badges +### Overview + +See [this presentation](https://docs.google.com/presentation/d/12W2KXY7ctJXFIelmgNEn7obiBv_E4bmcMl3mXeJPVgc/edit?usp=sharing) for an overview of the project. + +The documentation is structured as follow: + +- \ref basicsmanual : how to compile Radium and use it in your own project. +- \ref develmanual : general topics (e.g. coding conventions) and description of the concepts found in the API of Radium. +- \ref conceptsmanual : high level concepts used in Radium Engine + +### Badges [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/374bd173d03946a9b54c3c6bbd8cd589)](https://app.codacy.com/gh/STORM-IRIT/Radium-Engine?utm_source=github.com&utm_medium=referral&utm_content=STORM-IRIT/Radium-Engine&utm_campaign=Badge_Grade_Settings) @@ -26,13 +36,3 @@ The source code is hosted on github: addWidget( &editor ); - //! [Creating the edition dialog] + //! [Creating the editing dialog] //! [Management of string<->value conversion for enumeration parameters] auto vnc = new Ra::Core::Utils::EnumConverter( { { Values::VALUE_0, "VALUE_0" }, @@ -217,10 +217,10 @@ int main( int argc, char* argv[] ) { parameters.addParameter( "embedded", embedded ); //! [filling the parameter set to edit ] - //! [Printing several parameters before edition ] - std::cout << "\nPrinting all parameters before edition :\n"; + //! [Printing several parameters before editing ] + std::cout << "\nPrinting all parameters before editing :\n"; parameters.visit( ParameterPrinter {} ); - //! [Printing several parameters before edition ] + //! [Printing several parameters before editing ] //! [Filling the editor with the parameter set ] editor.setupFromParameters( parameters, parameterSet_metadata ); @@ -236,9 +236,9 @@ int main( int argc, char* argv[] ) { a.exec(); - //! [Printing several parameters after edition ] + //! [Printing several parameters after editing ] std::cout << "\nPrinting all parameters before quit : "; parameters.visit( ParameterPrinter {} ); - //! [Printing several parameters after edition ] + //! [Printing several parameters after editing ] } diff --git a/examples/RawShaderMaterial/main.cpp b/examples/RawShaderMaterial/main.cpp index cd1f99516d5..533a41357d7 100644 --- a/examples/RawShaderMaterial/main.cpp +++ b/examples/RawShaderMaterial/main.cpp @@ -12,7 +12,7 @@ // include the custom material definition #include -// include the Viewer to demonstrate dynamic edition of materials +// include the Viewer to demonstrate dynamic editing of materials #include // Qt @@ -112,7 +112,7 @@ std::shared_ptr initQuad( Ra::Gui::BaseAppl auto system = app.m_engine->getSystem( "GeometrySystem" ); system->addComponent( e, c ); - //![get the renderobject for further edition] + //![get the renderobject for further editing] auto ro = Ra::Engine::RadiumEngine::getInstance()->getRenderObjectManager()->getRenderObject( c->m_renderObjects[0] ); diff --git a/external/doxygen-awesome-css b/external/doxygen-awesome-css index df83fbf22cf..568f56cde6a 160000 --- a/external/doxygen-awesome-css +++ b/external/doxygen-awesome-css @@ -1 +1 @@ -Subproject commit df83fbf22cfff76b875c13d324baf584c74e96d0 +Subproject commit 568f56cde6ac78b6dfcc14acd380b2e745c301ea diff --git a/src/Core/Animation/Skeleton.hpp b/src/Core/Animation/Skeleton.hpp index 1338c86055e..7be575b2ca0 100644 --- a/src/Core/Animation/Skeleton.hpp +++ b/src/Core/Animation/Skeleton.hpp @@ -17,18 +17,18 @@ namespace Animation { * the former being the parent of the latter in the hierarchy. * For animation purposes, a bone transform refers to the proximal joint's tranform. * - * During the edition of the transformation of a skeleton bone, the transformations + * During the editing of the transformation of a skeleton bone, the transformations * of all the bones are updated accroding to the Manipulation scheme * (cf Ra::Core:Animation::Skeleton::Manipulation). */ class RA_CORE_API Skeleton : public HandleArray { public: - /// Edition scheme for the manipulation of the skeleton. + /// Editing scheme for the manipulation of the skeleton. /// \todo also implement Inverse Kynematics. enum Manipulation { - FORWARD = 0, ///< Standard edition scheme: rotation and / or translation of one bone. - PSEUDO_IK ///< Advanced edition scheme: translation of a bone means parent's rotation. + FORWARD = 0, ///< Standard editing scheme: rotation and / or translation of one bone. + PSEUDO_IK ///< Advanced editing scheme: translation of a bone means parent's rotation. }; Skeleton(); diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt index 7a874fee7bc..093a764811f 100644 --- a/src/Core/CMakeLists.txt +++ b/src/Core/CMakeLists.txt @@ -1,9 +1,10 @@ set(ra_core_target Core) +message_prefix_push("${ra_core_target}") + project(${ra_core_target} LANGUAGES CXX VERSION ${Radium_VERSION}) option(RADIUM_QUIET "Disable Radium Log messages" OFF) -list(APPEND CMAKE_MESSAGE_INDENT "[${ra_core_target}] ") set(RA_VERSION_CPP "${CMAKE_CURRENT_BINARY_DIR}/Version.cpp") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Utils/Version.cpp.in" "${RA_VERSION_CPP}") @@ -76,3 +77,5 @@ set(RADIUM_COMPONENTS ${RADIUM_COMPONENTS} ${ra_core_target} PARENT_SCOPE) if(RADIUM_ENABLE_PCH) target_precompile_headers(${ra_core_target} PRIVATE pch.hpp) endif() + +message_prefix_pop() diff --git a/src/Core/Geometry/RayCast.cpp b/src/Core/Geometry/RayCast.cpp index 263205df7fc..38a393188c4 100644 --- a/src/Core/Geometry/RayCast.cpp +++ b/src/Core/Geometry/RayCast.cpp @@ -266,7 +266,7 @@ bool RayCastCylinder( const Ray& r, return true; } } // End if (distance between ray and cyl axis < radius) - } // End of else (ray not parallel to the cylinder. + } // End of else (ray not parallel to the cylinder. return false; } diff --git a/src/Engine/CMakeLists.txt b/src/Engine/CMakeLists.txt index 3838baf388a..2eaff1e5600 100644 --- a/src/Engine/CMakeLists.txt +++ b/src/Engine/CMakeLists.txt @@ -1,5 +1,6 @@ set(ra_engine_target Engine) -list(APPEND CMAKE_MESSAGE_INDENT "[${ra_engine_target}] ") + +message_prefix_push("${ra_engine_target}") project(${ra_engine_target} LANGUAGES CXX VERSION ${Radium_VERSION}) @@ -67,3 +68,5 @@ target_compile_options(${ra_engine_target} PRIVATE PUBLIC ${DEFAULT_COMPILE_OPTI if(RADIUM_ENABLE_PCH) target_precompile_headers(${ra_engine_target} PRIVATE pch.hpp) endif() + +message_prefix_pop() diff --git a/src/Engine/Data/Mesh.hpp b/src/Engine/Data/Mesh.hpp index 06df02d4768..2e4e631d656 100644 --- a/src/Engine/Data/Mesh.hpp +++ b/src/Engine/Data/Mesh.hpp @@ -373,22 +373,19 @@ class MultiIndexedGeometry : public CoreGeometryDisplayable using LayerKeyType = std::pair; using EntryType = std::pair; - struct RA_CORE_API KeyHash { - std::size_t operator()( const LayerKeyType& k ) const { - // Mix semantic collection into a single identifier string - std::ostringstream stream; - std::copy( - k.first.begin(), k.first.end(), std::ostream_iterator( stream, "" ) ); - std::string result = stream.str(); - std::sort( result.begin(), result.end() ); - - // Combine with layer name hash - return std::hash {}( result ) ^ - ( std::hash {}( k.second ) << 1 ); - } - }; - std::unordered_map m_indices; -}; + struct RA_CORE_API KeyHash { std::size_t operator()( const LayerKeyType& k ) const { + // Mix semantic collection into a single identifier string + std::ostringstream stream; + std::copy( k.first.begin(), k.first.end(), std::ostream_iterator( stream, "" ) ); + std::string result = stream.str(); + std::sort( result.begin(), result.end() ); + + // Combine with layer name hash + return std::hash {}( result ) ^ ( std::hash {}( k.second ) << 1 ); +} +}; // namespace Data +std::unordered_map m_indices; +}; // namespace Engine /// LineMesh, own a Core::Geometry::LineMesh class RA_ENGINE_API LineMesh : public IndexedGeometry @@ -587,8 +584,8 @@ template void IndexedAttribArrayDisplayable::updateGL() { if ( m_isDirty ) { // Check that our dirty bits are consistent. - ON_ASSERT( bool dirtyTest = false; for ( const auto& d - : m_dataDirty ) { dirtyTest = dirtyTest || d; } ); + ON_ASSERT( bool dirtyTest = false; + for ( const auto& d : m_dataDirty ) { dirtyTest = dirtyTest || d; } ); CORE_ASSERT( dirtyTest == m_isDirty, "Dirty flags inconsistency" ); if ( !m_indices ) { @@ -841,8 +838,8 @@ template void CoreGeometryDisplayable::updateGL() { if ( m_isDirty ) { // Check that our dirty bits are consistent. - ON_ASSERT( bool dirtyTest = false; for ( auto d - : m_dataDirty ) { dirtyTest = dirtyTest || d; } ); + ON_ASSERT( bool dirtyTest = false; + for ( auto d : m_dataDirty ) { dirtyTest = dirtyTest || d; } ); CORE_ASSERT( dirtyTest == m_isDirty, "Dirty flags inconsistency" ); CORE_ASSERT( !( m_mesh.vertices().empty() ), "No vertex." ); @@ -1133,6 +1130,6 @@ inline void GeneralMesh::triangulate() { } } -} // namespace Data +} // namespace Ra } // namespace Engine } // namespace Ra diff --git a/src/Engine/Data/RenderParameters.hpp b/src/Engine/Data/RenderParameters.hpp index 049b8a56c64..77a4a255799 100644 --- a/src/Engine/Data/RenderParameters.hpp +++ b/src/Engine/Data/RenderParameters.hpp @@ -340,7 +340,7 @@ class RA_ENGINE_API RenderParameters final }; /** - * Interface to define metadata (constraints, description, ...) for the edition of parameter set + * Interface to define metadata (constraints, description, ...) for the editing of parameter set */ class RA_ENGINE_API ParameterSetEditingInterface { diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 467e75ad947..30fecf9ec1c 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -1,5 +1,6 @@ set(ra_gui_target Gui) -list(APPEND CMAKE_MESSAGE_INDENT "[${ra_gui_target}] ") + +message_prefix_push("${ra_gui_target}") project(${ra_gui_target} LANGUAGES CXX VERSION ${Radium_VERSION}) @@ -76,3 +77,5 @@ install_target_resources( if(RADIUM_ENABLE_PCH) target_precompile_headers(${ra_gui_target} PRIVATE pch.hpp) endif() + +message_prefix_pop() diff --git a/src/Gui/ParameterSetEditor/MaterialParameterEditor.hpp b/src/Gui/ParameterSetEditor/MaterialParameterEditor.hpp index 1068659964b..591784c30e2 100644 --- a/src/Gui/ParameterSetEditor/MaterialParameterEditor.hpp +++ b/src/Gui/ParameterSetEditor/MaterialParameterEditor.hpp @@ -22,7 +22,7 @@ class RenderParameters; namespace Gui { /** - * \brief Simple Widget for Material/RenderParameter edition + * \brief Simple Widget for Material/RenderParameter editing * A material editor will show information about the selected material and expose a control panel * containing all of its editable parameters to allow the user to edit them. */ diff --git a/src/Gui/ParameterSetEditor/ParameterSetEditor.cpp b/src/Gui/ParameterSetEditor/ParameterSetEditor.cpp index 4e3dcf10442..dc5ac4a47ab 100644 --- a/src/Gui/ParameterSetEditor/ParameterSetEditor.cpp +++ b/src/Gui/ParameterSetEditor/ParameterSetEditor.cpp @@ -98,7 +98,7 @@ class RenderParameterUiBuilder void operator()( const std::string& /*name*/, std::reference_wrapper& /*p*/, Data::RenderParameters&& /*params*/ ) { - // wrapped reference (e.g. embedded render parameter) edition not yet available + // wrapped reference (e.g. embedded render parameter) editing not yet available } private: diff --git a/src/Gui/ParameterSetEditor/ParameterSetEditor.hpp b/src/Gui/ParameterSetEditor/ParameterSetEditor.hpp index 12687646c55..d41e9db2be8 100644 --- a/src/Gui/ParameterSetEditor/ParameterSetEditor.hpp +++ b/src/Gui/ParameterSetEditor/ParameterSetEditor.hpp @@ -27,7 +27,7 @@ namespace internal { class RenderParameterUiBuilder; } // namespace internal /** - * \brief Simple Widget for RenderParameter edition + * \brief Simple Widget for RenderParameter editing * The editor will expose a control panel * containing all of the editable parameters from a RenderParameter set. */ diff --git a/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.hpp b/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.hpp index 67d78e77bc0..c7f081d14ee 100644 --- a/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.hpp +++ b/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.hpp @@ -73,7 +73,7 @@ class RA_GUI_API SkeletonBasedAnimationUI : public QFrame void on_m_autoRepeat_toggled( bool checked ); /// \} - /// \name Animation Edition GUI + /// \name Animation Editing GUI /// \{ /// Slot for the user changing the skeleton animation. diff --git a/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.ui b/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.ui index ec71caa7c94..57ac868ebce 100644 --- a/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.ui +++ b/src/Gui/SkeletonBasedAnimation/SkeletonBasedAnimationUI.ui @@ -89,7 +89,7 @@ - Edition + Editing diff --git a/src/Gui/Timeline/Timeline.hpp b/src/Gui/Timeline/Timeline.hpp index 0c6a45711ac..8245484c19b 100644 --- a/src/Gui/Timeline/Timeline.hpp +++ b/src/Gui/Timeline/Timeline.hpp @@ -26,7 +26,7 @@ namespace Ra::Gui { * such as play, pause and reset animations or simulations, but also going to * a given point in time. * - * Regarding KeyFramedValues, the Timeline provides their edition / manipulation. + * Regarding KeyFramedValues, the Timeline provides their editing / manipulation. * To do so, KeyFramedValues must be registered into the Timeline, which can be * done using the registerKeyFramedValue methods (see the related Documentation page ). * diff --git a/src/Gui/Viewer/Gizmo/RotateGizmo.hpp b/src/Gui/Viewer/Gizmo/RotateGizmo.hpp index 9a1f54b9fc1..ec5721ce92b 100644 --- a/src/Gui/Viewer/Gizmo/RotateGizmo.hpp +++ b/src/Gui/Viewer/Gizmo/RotateGizmo.hpp @@ -30,12 +30,12 @@ class RotateGizmo : public Gizmo bool whole ) override; private: - Core::Vector2 m_initialPix; ///< The pixel location when edition starts. + Core::Vector2 m_initialPix; ///< The pixel location when editing starts. int m_selectedAxis; ///< The axis to rotate around. bool m_start; ///< Has the manipulation started. bool m_stepped; ///< Is the manipulation stepped. - Scalar m_totalAngle; ///< The total edition angle. - Core::Matrix3 m_initialRot; ///< The rotation matrix at edition start. + Scalar m_totalAngle; ///< The total editing angle. + Core::Matrix3 m_initialRot; ///< The rotation matrix at editing start. }; } // namespace Gui diff --git a/src/Gui/Viewer/Gizmo/ScaleGizmo.hpp b/src/Gui/Viewer/Gizmo/ScaleGizmo.hpp index a0565455307..fc89036557b 100644 --- a/src/Gui/Viewer/Gizmo/ScaleGizmo.hpp +++ b/src/Gui/Viewer/Gizmo/ScaleGizmo.hpp @@ -35,12 +35,12 @@ class ScaleGizmo : public Gizmo private: Ra::Core::Vector3 m_prevScale; ///< The previously applied scale. - Ra::Core::Vector3 m_startPos; ///< The position of the gizmo when edition starts. + Ra::Core::Vector3 m_startPos; ///< The position of the gizmo when editing starts. Ra::Core::Vector3 m_startPoint; ///< The picked 3D point on the gizmo. - Core::Vector2 m_initialPix; ///< The pixel position when edition starts. + Core::Vector2 m_initialPix; ///< The pixel position when editing starts. int m_selectedAxis; ///< The axis to scale in. int m_selectedPlane; ///< The plane to scale in. - bool m_start { false }; ///< Did the edition start. + bool m_start { false }; ///< Did the editing start. }; } // namespace Gui diff --git a/src/Gui/Viewer/Gizmo/TranslateGizmo.hpp b/src/Gui/Viewer/Gizmo/TranslateGizmo.hpp index 46595de76f1..971a5f7c7d6 100644 --- a/src/Gui/Viewer/Gizmo/TranslateGizmo.hpp +++ b/src/Gui/Viewer/Gizmo/TranslateGizmo.hpp @@ -30,11 +30,11 @@ class TranslateGizmo : public Gizmo private: Ra::Core::Vector3 m_startPoint; ///< The picked 3D point on the gizmo. - Ra::Core::Vector3 m_initialTrans; ///< The translation matrix at edition start. - Core::Vector2 m_initialPix; ///< The pixel position when edition starts. + Ra::Core::Vector3 m_initialTrans; ///< The translation matrix at editing start. + Core::Vector2 m_initialPix; ///< The pixel position when editing starts. int m_selectedAxis; ///< The axis to translate on. int m_selectedPlane; ///< The plane to translate on. - bool m_start; ///< Did the edition start. + bool m_start; ///< Did the editing start. }; } // namespace Gui diff --git a/src/Headless/CMakeLists.txt b/src/Headless/CMakeLists.txt index 369e5320568..9155b8ab8a2 100644 --- a/src/Headless/CMakeLists.txt +++ b/src/Headless/CMakeLists.txt @@ -1,10 +1,13 @@ cmake_minimum_required(VERSION 3.18) + if(APPLE) cmake_policy(SET CMP0042 NEW) endif(APPLE) set(ra_headless_target Headless) -list(APPEND CMAKE_MESSAGE_INDENT "[${ra_headless_target}] ") + +message_prefix_push("${ra_headless_target}") + project(${ra_headless_target} LANGUAGES CXX VERSION ${Radium_VERSION}) # ----------------------------------------------------------------------------------- # lib headless configuration @@ -68,3 +71,5 @@ endif() if(RADIUM_ENABLE_PCH) target_precompile_headers(${ra_headless_target} PRIVATE pch.hpp) endif() + +message_prefix_pop() diff --git a/src/Headless/OpenGLContext/OpenGLContext.hpp b/src/Headless/OpenGLContext/OpenGLContext.hpp index 767b2247f7b..87d539de69f 100644 --- a/src/Headless/OpenGLContext/OpenGLContext.hpp +++ b/src/Headless/OpenGLContext/OpenGLContext.hpp @@ -22,12 +22,12 @@ namespace Headless { class HEADLESS_API OpenGLContext { public: - /** \defgroup context OpenGL context management + /** \name OpenGL context management * These methods allow to create and manipulate an openGLContext. * Using this function, the openGL context created is an offscreen context with no exposed * window. - * \{ */ + /**\{ */ /** * Create an offscreen openGl context. * The created context has the following properties @@ -59,14 +59,12 @@ class HEADLESS_API OpenGLContext [[nodiscard]] virtual std::string getInfo() const; /** \} */ - /** \defgroup window Window management from an openGL context + /** \name Window management from an openGL context * These methods allow to display and interact with a simple window associated with the created * OpenGL Context, if any. - * \{ - */ - /** Identify the event processing method when the window is exposed. - * */ + /** \{ */ + /// Identify the event processing method when the window is exposed. enum class EventMode : int { POLL = 0, WAIT, TIMEOUT, NUM_MODES }; /// Show the window virtual void show( EventMode /*mode*/, float /*delay*/ ) {}; @@ -129,9 +127,6 @@ class HEADLESS_API OpenGLContext /** \} */ protected: - /** \addtogroup window - * \{ - */ /// Process the pending events according to the window show mode virtual bool processEvents() { return true; }; @@ -164,7 +159,6 @@ class HEADLESS_API OpenGLContext EventMode m_mode { EventMode::POLL }; /// Timeout delay for event processing float m_delay { 1.f / 60.f }; - /** \} */ }; inline std::string OpenGLContext::getInfo() const { diff --git a/src/IO/CMakeLists.txt b/src/IO/CMakeLists.txt index 100f29c98c9..6d280fbd608 100644 --- a/src/IO/CMakeLists.txt +++ b/src/IO/CMakeLists.txt @@ -1,5 +1,6 @@ set(ra_io_target IO) -list(APPEND CMAKE_MESSAGE_INDENT "[${ra_io_target}] ") + +message_prefix_push("${ra_io_target}") project(${ra_io_target} LANGUAGES CXX VERSION ${Radium_VERSION}) @@ -64,3 +65,5 @@ set(RADIUM_COMPONENTS ${RADIUM_COMPONENTS} ${ra_io_target} PARENT_SCOPE) if(RADIUM_ENABLE_PCH) target_precompile_headers(${ra_io_target} PRIVATE pch.hpp) endif() + +message_prefix_pop() diff --git a/src/PluginBase/CMakeLists.txt b/src/PluginBase/CMakeLists.txt index 2bf0b5c70f7..28d55a463a1 100644 --- a/src/PluginBase/CMakeLists.txt +++ b/src/PluginBase/CMakeLists.txt @@ -1,5 +1,6 @@ set(ra_pluginbase_target PluginBase) -list(APPEND CMAKE_MESSAGE_INDENT "[${ra_pluginbase_target}] ") + +message_prefix_push("${ra_pluginbase_target}") project(${ra_pluginbase_target} LANGUAGES CXX VERSION ${Radium_VERSION}) @@ -39,3 +40,5 @@ set(RADIUM_COMPONENTS ${RADIUM_COMPONENTS} ${ra_pluginbase_target} PARENT_SCOPE) # install json configuration files install(FILES ${pluginbase_json} DESTINATION ${CONFIG_PACKAGE_LOCATION}/${ra_pluginbase_target}) file(COPY ${pluginbase_json} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +message_prefix_pop() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 83518cee5fe..90548aaaa73 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ # https://cmake.org/cmake/help/latest/manual/ctest.1.html # https://cmake.org/Wiki/CMake/Testing_With_CTest # https://cmake.org/cmake/help/latest/command/add_test.html -list(APPEND CMAKE_MESSAGE_INDENT "[Tests] ") +message_prefix_push("Tests") # Adds convenience methods, see cmake/CleanCppExtensions.cmake include(CleanCppExtensions) @@ -52,4 +52,4 @@ add_custom_target( DEPENDS unittests integration ) -list(REMOVE_AT CMAKE_MESSAGE_INDENT -1) +message_prefix_pop()