diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 545b79db..8f00f2b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -259,21 +259,6 @@ VS2015-32-bit-static-no-apps: - build-release/*.exe - -VS2013-64-bit-shared-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2013" - ARCHITECTURE: "x64" - SHARED: "TRUE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2013 - artifacts: - paths: - - build-release/*.exe - VS2013-64-bit-shared-no-apps: stage: build variables: @@ -288,20 +273,6 @@ VS2013-64-bit-shared-no-apps: paths: - build-release/*.exe -VS2013-32-bit-shared-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2013" - ARCHITECTURE: "x32" - SHARED: "TRUE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2013 - artifacts: - paths: - - build-release/*.exe - VS2013-32-bit-shared-no-apps: stage: build variables: @@ -316,20 +287,6 @@ VS2013-32-bit-shared-no-apps: paths: - build-release/*.exe -VS2013-64-bit-static-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2013" - ARCHITECTURE: "x64" - SHARED: "FALSE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2013 - artifacts: - paths: - - build-release/*.exe - VS2013-64-bit-static-no-apps: stage: build variables: @@ -344,20 +301,6 @@ VS2013-64-bit-static-no-apps: paths: - build-release/*.exe -VS2013-32-bit-static-apps: - stage: build - variables: - BUILD_PLATFORM: "VS2013" - ARCHITECTURE: "x32" - SHARED: "FALSE" - APPS: "ON" - script: "CI\\Windows.bat" - tags: - - VS2013 - artifacts: - paths: - - build-release/*.exe - VS2013-32-bit-static-no-apps: stage: build variables: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bd7a588..c82c7864 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -Please look into the doxygen configuration (Generated from Doc/history.docu) +The changelog can be found in the html Documentation. The latest changelog for the master can be found here: -http://openmesh.org/Daily-Builds/Doc/a00002.html +http://openmesh.org/Daily-Builds/Doc/ diff --git a/CI/Windows.bat b/CI/Windows.bat index c96a9e6c..b2a0c2f4 100644 --- a/CI/Windows.bat +++ b/CI/Windows.bat @@ -16,22 +16,6 @@ IF "%SHARED%" == "TRUE" ( set STRING_DLL= ) -IF "%BUILD_PLATFORM%" == "VS2012" ( - set LIBPATH=E:\libs\VS2012 - set GTESTVERSION=gtest-1.6.0 - set GENERATOR=Visual Studio 11%ARCH_VS% - set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com" - IF "%ARCHITECTURE%" == "x64" ( - set QT_INSTALL_PATH=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\ - set QT_BASE_CONFIG=-DQT_QMAKE_EXECUTABLE=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\bin\qmake.exe - ) - - IF "%ARCHITECTURE%" == "x32" ( - set QT_INSTALL_PATH=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\ - set QT_BASE_CONFIG=-DQT_QMAKE_EXECUTABLE=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\bin\qmake.exe - ) -) - IF "%BUILD_PLATFORM%" == "VS2013" ( set LIBPATH=E:\libs\VS2013 set GTESTVERSION=gtest-1.6.0 @@ -83,10 +67,15 @@ IF "%BUILD_PLATFORM%" == "VS2017" ( IF "%APPS%" == "ON" ( set STRING_APPS= + ECHO "Copying Platform plugins from %QT_INSTALL_PATH%\plugins\platforms to Build\plugins\platforms" + + + REM Create the platform plugins subdirectory for the qt plugins required to run the gui apps + mkdir Build mkdir Build\plugins mkdir Build\plugins\platforms - + REM Copy the platform plugins subdirectory for the qt plugins required to run the gui apps xcopy /Y %QT_INSTALL_PATH%\plugins\platforms Build\plugins\platforms set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% @@ -95,6 +84,9 @@ IF "%APPS%" == "ON" ( set CMAKE_CONFIGURATION= ) + + + ECHO "=============================================================" ECHO "=============================================================" ECHO "Building with :" @@ -111,10 +103,26 @@ ECHO "QT_INSTALL_PATH : %QT_INSTALL_PATH%" ECHO "CMAKE_CONFIGURATION : %CMAKE_CONFIGURATION%" ECHO "=============================================================" ECHO "=============================================================" +ECHO "" +ECHO "Running Build environment checks" + +IF EXIST %LIBPATH%\ ( + ECHO "LIBPATH ... Ok" +) ELSE ( + ECHO "LIBPATH not found!" + exit 10; +) +IF EXIST %QT_INSTALL_PATH%\ ( + ECHO "QT_INSTALL_PATH ... Ok" +) ELSE ( + ECHO "QT_INSTALL_PATH: %QT_INSTALL_PATH%\ not found!" + exit 10; +) -"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DBUILD_APPS=%APPS% -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DCMAKE_WINDOWS_LIBS_DIR="e:\libs" -DOPENMESH_BUILD_SHARED=%SHARED% %CMAKE_CONFIGURATION% .. + +"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DBUILD_APPS=%APPS% -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DCMAKE_WINDOWS_LIBS_DIR="e:\libs" -DOPENMESH_BUILD_SHARED=%SHARED% %CMAKE_CONFIGURATION% .. %VS_PATH% /Build "Release" OpenMesh.sln /Project "ALL_BUILD" @@ -134,7 +142,7 @@ mkdir build-debug cd build-debug -"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_SHARED=%SHARED% -DBUILD_APPS=%APPS% %CMAKE_CONFIGURATION% .. +"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_SHARED=%SHARED% -DBUILD_APPS=%APPS% %CMAKE_CONFIGURATION% .. %VS_PATH% /Build "Debug" OpenMesh.sln /Project "ALL_BUILD" @@ -164,13 +172,13 @@ cd build-release del *.exe -"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DBUILD_APPS=%APPS% -DCMAKE_BUILD_TYPE=Release %CMAKE_CONFIGURATION% .. +"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DBUILD_APPS=%APPS% -DCMAKE_BUILD_TYPE=Release %CMAKE_CONFIGURATION% .. %VS_PATH% /Build "Release" OpenMesh.sln /Project "PACKAGE" IF %errorlevel% NEQ 0 exit /b %errorlevel% -move OpenMesh-*.exe "OpenMesh-7.1-Git-Master-%CI_BUILD_REF%-%BUILD_PLATFORM%-%STRING_ARCH%%STRING_DLL%%STRING_APPS%.exe" +move OpenMesh-*.exe "OpenMesh-8.0-Git-Master-%CI_BUILD_REF%-%BUILD_PLATFORM%-%STRING_ARCH%%STRING_DLL%%STRING_APPS%.exe" diff --git a/CI/ci-linux.sh b/CI/ci-linux.sh index b3d28017..fe75b847 100755 --- a/CI/ci-linux.sh +++ b/CI/ci-linux.sh @@ -10,12 +10,15 @@ OPTIONS="" MAKE_OPTIONS="" BUILDPATH="" +# set GTEST path +OPTIONS="-DGTEST_ROOT=~/sw/gtest-1.8.0/" + if [ "$COMPILER" == "gcc" ]; then echo "Building with GCC"; BUILDPATH="gcc" # without icecc: no options required - OPTIONS="-DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc" + OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc" MAKE_OPTIONS="-j16" export ICECC_CXX=/usr/bin/g++ ; export ICECC_CC=/usr/bin/gcc diff --git a/CI/ci-mac.sh b/CI/ci-mac.sh index 5b7ecd94..c3d454cd 100755 --- a/CI/ci-mac.sh +++ b/CI/ci-mac.sh @@ -11,6 +11,9 @@ export PATH OPTIONS="" +# set GTEST path +OPTIONS="$OPTIONS -DGTEST_ROOT=~/sw/gtest-1.7.0/" + if [ "$LANGUAGE" == "C++98" ]; then echo "Building with C++98"; BUILDPATH="cpp98" diff --git a/Doc/Concepts/MeshItems.hh b/Doc/Concepts/MeshItems.hh index 1e1524ad..db4b8627 100644 --- a/Doc/Concepts/MeshItems.hh +++ b/Doc/Concepts/MeshItems.hh @@ -40,12 +40,7 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/Doc/Concepts/MeshKernel.hh b/Doc/Concepts/MeshKernel.hh index 253a5cd3..e81175c1 100644 --- a/Doc/Concepts/MeshKernel.hh +++ b/Doc/Concepts/MeshKernel.hh @@ -40,14 +40,6 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - - //============================================================================= // // Kernel Concept diff --git a/Doc/Tutorial/01-build_cube/build_cube.cc b/Doc/Tutorial/01-build_cube/build_cube.cc index 5c8d17e6..9bbd93a6 100644 --- a/Doc/Tutorial/01-build_cube/build_cube.cc +++ b/Doc/Tutorial/01-build_cube/build_cube.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - #include // -------------------- OpenMesh diff --git a/Doc/Tutorial/03-properties/smooth.cc b/Doc/Tutorial/03-properties/smooth.cc index 8756c492..37833017 100644 --- a/Doc/Tutorial/03-properties/smooth.cc +++ b/Doc/Tutorial/03-properties/smooth.cc @@ -1,74 +1,57 @@ -#include -#include -// -------------------- #include #include +#include -typedef OpenMesh::TriMesh_ArrayKernelT<> MyMesh; +#include +#include +using MyMesh = OpenMesh::TriMesh_ArrayKernelT<>; -int main(int argc, char **argv) +int main(int argc, char** argv) { - MyMesh mesh; - - - // check command line options - if (argc != 4) - { - std::cerr << "Usage: " << argv[0] << " #iterations infile outfile\n"; - return 1; - } - - - - // read mesh from stdin - if ( ! OpenMesh::IO::read_mesh(mesh, argv[2]) ) - { - std::cerr << "Error: Cannot read mesh from " << argv[2] << std::endl; - return 1; - } - - - - // this vertex property stores the computed centers of gravity - OpenMesh::VPropHandleT cogs; - mesh.add_property(cogs); - - // smoothing mesh argv[1] times - MyMesh::VertexIter v_it, v_end(mesh.vertices_end()); - MyMesh::VertexVertexIter vv_it; - MyMesh::Point cog; - MyMesh::Scalar valence; - unsigned int i, N(atoi(argv[1])); - - - for (i=0; i < N; ++i) - { - for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it) - { - mesh.property(cogs,*v_it).vectorize(0.0f); - valence = 0.0; - - for (vv_it=mesh.vv_iter( *v_it ); vv_it; ++vv_it) - { - mesh.property(cogs,*v_it) += mesh.point( *vv_it ); - ++valence; - } - mesh.property(cogs,*v_it) /= valence; + // Read command line options + MyMesh mesh; + if (argc != 4) { + std::cerr << "Usage: " << argv[0] << " #iterations infile outfile" << std::endl; + return 1; } + const int iterations = argv[1]; + const std::string infile = argv[2]; + const std::string outfile = argv[3]; - for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it) - if ( !mesh.is_boundary( *v_it ) ) - mesh.set_point( *v_it, mesh.property(cogs,*v_it) ); - } + // Read mesh file + if (!OpenMesh::IO::read_mesh(mesh, infile)) { + std::cerr << "Error: Cannot read mesh from " << infile << std::endl; + return 1; + } + { + // Add a vertex property storing the computed centers of gravity + auto cog = OpenMesh::makeTemporaryProperty(mesh); - // write mesh to stdout - if ( ! OpenMesh::IO::write_mesh(mesh, argv[3]) ) - { - std::cerr << "Error: cannot write mesh to " << argv[3] << std::endl; - return 1; - } - - return 0; + // Smooth the mesh several times + for (int i = 0; i < iterations; ++i) { + // Iterate over all vertices to compute centers of gravity + for (const auto& vh : mesh.vertices()) { + cog[vh] = {0,0,0}; + int valence = 0; + // Iterate over all 1-ring vertices around vh + for (const auto& vvh : mesh.vv_range(vh)) { + cog[vh] += mesh.point(vvh); + ++valence; + } + cog[vh] /= valence; + } + // Move all vertices to the previously computed positions + for (const auto& vh : mesh.vertices()) { + mesh.point(vh) = cog[vh]; + } + } + } // The cog vertex property is removed from the mesh at the end of this scope + + // Write mesh file + if (!OpenMesh::IO::read_mesh(mesh, outfile)) { + std::cerr << "Error: Cannot write mesh to " << outfile << std::endl; + return 1; + } } diff --git a/Doc/Tutorial/07b-delete_geometry/delete_geometry.cc b/Doc/Tutorial/07b-delete_geometry/delete_geometry.cc index f0c0ce46..caf303de 100644 --- a/Doc/Tutorial/07b-delete_geometry/delete_geometry.cc +++ b/Doc/Tutorial/07b-delete_geometry/delete_geometry.cc @@ -39,14 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 736 $ * - * $Date: 2012-10-08 09:30:49 +0200 (Mo, 08. Okt 2012) $ * - * * -\*===========================================================================*/ - - #include // -------------------- OpenMesh #include diff --git a/Doc/changelog.docu b/Doc/changelog.docu index c38bd385..c6ed2916 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -7,17 +7,28 @@ -7.2 (?/?/?) +8.0 (?/?/?) + +Breaking changes: +
    +
  • Don't run and test on VS2013 anymore. As VS2013 still lacks some C++11 features, we remove it from our list of supported platforms
  • +
Core
  • TriConnectivity: Added two functions split_edge and split_edge_copy to mask the PolyConnectivity functions of the same name (Prevents creation of valence 2 vertices on trimeshes)
  • +
  • PolyConnectivity: Fixed PolyConnectivity is_collapse_ok, missing some configurations (Thanks to Simon Flöry for the patch)
IO
  • PLY Reader: Allowing the PLY reader to read custom face ( Thanks to morgan Leborgne for the patch)
  • PLY Reader: Fixed endless loop on unknown property list type
  • +
  • PLY Reader: Fix hang when reading directly from istream (Thanks to Paul Loré for the patch)
  • +
  • OM Writer/Reader: Update file format version to 2.0. Older files can still be read, but older OpenMesh versions cannot read new format.
  • +
  • OM Writer/Reader: Fixed inconsistent writing/reading of edge properties
  • +
  • OM Writer/Reader: Add option to store status
  • +
  • OBJ Writer: Use Fixed as stream option in OBJ writer to avoid problems with other programs reading scientific notation
Tools @@ -25,6 +36,11 @@
  • SmartTagger: Added the SmartTagger class to tag primitives (O(1) reset )
  • +Apps +
      +
    • Fixed several warnings with gcc 8
    • +
    + Build System
    • Rename the DEPRECATED macro into OM_DEPRECATED to prevent a macro clash with Intel MKL (Thanks to Morgan Leborgne for the patch)
    • diff --git a/Doc/compiling.docu b/Doc/compiling.docu index 338b2b12..19c09b19 100644 --- a/Doc/compiling.docu +++ b/Doc/compiling.docu @@ -12,12 +12,11 @@ supports at least C++11 diff --git a/Doc/doxy.config.in b/Doc/doxy.config.in index 0fc26bc6..ccfecd2c 100644 --- a/Doc/doxy.config.in +++ b/Doc/doxy.config.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.13 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = 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 a logo or an 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 = @CMAKE_CURRENT_SOURCE_DIR@/images/rwth_vci_rgb.jpg @@ -60,7 +60,7 @@ PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/images/rwth_vci_rgb.jpg OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/Build/@ACG_PROJECT_DATADIR@/Doc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# 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 @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# 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 doxygen will prepend the brief +# 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 @@ -135,7 +135,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# 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. @@ -207,9 +207,9 @@ MULTILINE_CPP_IS_BRIEF = NO 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 @@ -278,7 +278,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # 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: 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. @@ -295,10 +295,19 @@ EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + # When enabled doxygen tries to link words that correspond to documented # 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. +# be prevented in individual cases 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 @@ -338,13 +347,20 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# 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 = YES +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + # 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 @@ -403,7 +419,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# 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. @@ -413,35 +429,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# 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 +# 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 +# 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 +# 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 = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If 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 in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -466,21 +482,21 @@ 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 these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# 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 these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # 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 +# 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. @@ -494,7 +510,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = YES # 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 +# 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. @@ -503,12 +519,19 @@ INTERNAL_DOCS = YES CASE_SENSE_NAMES = YES # 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 +# 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 HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # 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. @@ -536,14 +559,14 @@ INLINE_INFO = YES # 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. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # 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 +# 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. @@ -588,27 +611,25 @@ SORT_BY_SCOPE_NAME = 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 +# 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 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. @@ -633,8 +654,8 @@ ENABLED_SECTIONS = OPENMESH_INTERNAL_DOC 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. +# 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 = YES @@ -698,7 +719,7 @@ CITE_BIB_FILES = QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# 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. @@ -706,7 +727,7 @@ QUIET = YES WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# 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. @@ -723,12 +744,18 @@ WARN_IF_DOC_ERROR = YES # 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. +# 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 +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = 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 @@ -752,7 +779,7 @@ WARN_LOGFILE = # 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. +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = @CMAKE_CURRENT_SOURCE_DIR@/.. @@ -768,12 +795,17 @@ 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 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. +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# 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, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = *.cc \ *.hh \ @@ -871,6 +903,10 @@ IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images # 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. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. INPUT_FILTER = @@ -880,11 +916,15 @@ INPUT_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. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# 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. @@ -944,7 +984,7 @@ REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO # 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 +# 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. @@ -991,13 +1031,13 @@ USE_HTAGS = NO VERBATIM_HEADERS = YES -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. +# generated with the -Duse-libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO @@ -1040,7 +1080,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES 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 @@ -1106,10 +1146,10 @@ HTML_STYLESHEET = # cascading style sheets that are 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. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1126,7 +1166,7 @@ HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/html/logo_align.css HTML_EXTRA_FILES = # 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 +# 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 @@ -1157,8 +1197,9 @@ 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. -# The default value is: YES. +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES @@ -1254,28 +1295,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # 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 +# 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 = -# 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 -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# 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 = -# 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 +# 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. @@ -1389,7 +1430,7 @@ DISABLE_INDEX = NO # 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 +# HTML help feature. Via custom style sheets (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 @@ -1417,7 +1458,7 @@ ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 300 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If 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. @@ -1446,7 +1487,7 @@ 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 +# instead of using pre-rendered 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. @@ -1532,7 +1573,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1545,7 +1586,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1583,7 +1624,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1614,7 +1655,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1632,9 +1673,12 @@ COMPACT_LATEX = NO PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names -# that should be included in the LaTeX output. To get the times font for -# instance you can specify -# EXTRA_PACKAGES=times +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1649,9 +1693,9 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1667,6 +1711,17 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1685,7 +1740,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1726,11 +1781,19 @@ LATEX_SOURCE_CODE = NO LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# 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: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1745,7 +1808,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1782,11 +1845,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1830,7 +1903,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1844,7 +1917,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1857,7 +1930,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1871,7 +1944,7 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1884,10 +1957,10 @@ DOCBOOK_PROGRAMLISTING = NO # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1896,7 +1969,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1904,7 +1977,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1912,9 +1985,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1934,14 +2007,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1957,7 +2030,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2036,20 +2109,21 @@ TAGFILES = GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2066,7 +2140,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2091,7 +2165,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2164,7 +2238,7 @@ COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2216,7 +2290,8 @@ INCLUDED_BY_GRAPH = YES # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2227,7 +2302,8 @@ CALL_GRAPH = NO # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2250,13 +2326,17 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). # Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, -# gif:cairo:gd, gif:gd, gif:gd:gd and svg. +# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2304,10 +2384,19 @@ DIAFILE_DIRS = # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2344,7 +2433,7 @@ MAX_DOT_GRAPH_DEPTH = 0 DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2361,7 +2450,7 @@ DOT_MULTI_TARGETS = YES GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/Doc/mainpage.docu b/Doc/mainpage.docu index 75d4663c..9ce3e3dd 100644 --- a/Doc/mainpage.docu +++ b/Doc/mainpage.docu @@ -24,6 +24,10 @@ Here you can find information on how to build projects using the %OpenMesh libra as well as further information on mesh handling in %OpenMesh. The tutorials explain how to use %OpenMesh by demonstrating real code examples. +\section openmesh-python OpenMesh Python Bindings +We also provide python bindings for %OpenMesh. You can find them here:
      +https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python + \section iov Building OpenMesh In this section all necessary information on how to build projects using %OpenMesh is given. diff --git a/Doc/tutorial_03.docu b/Doc/tutorial_03.docu index 7d8fb228..3e0cf797 100644 --- a/Doc/tutorial_03.docu +++ b/Doc/tutorial_03.docu @@ -1,7 +1,7 @@ /** \page tutorial_03 Using (custom) properties This examples shows: -- How to add and remove custom properties, +- How to add and remove custom properties - How to get and set the value of a custom property In the last example we computed the barycenter of each vertex' @@ -11,44 +11,69 @@ let %OpenMesh manage the data. It would be even more helpful if we could attach such properties dynamically to the mesh. -%OpenMesh provides dynamic properties, which can be attached to each -mesh entity (vertex, face, edge, halfedge, and the mesh itself). We -distinguish between custom and standard properties. A custom property -is any user-defined property and is accessed via the member function -\c property(..) via a handle and an entity handle -(e.g. VertexHandle). Whereas the standard properties are accessed via -special member functions, e.g. the vertex position is accessed with \c -point(..) and a vertex handle. +Custom properties can be conveniently created and attached to meshes with the following functions: +- makeTemporaryProperty() creates a property that is temporary to the current scope. +- getOrMakeProperty() is used for creating and accessing permanent named properties on a mesh. +- getProperty() is used for accessing an existing permanent named property on a mesh. -In this example we will store the \c cog-value (see previous example) -in an additional vertex property instead of keeping it in a separate -array. To do so we define first a so-called property handle with the desired -type (\c MyMesh::Point) and register the handle at the mesh: +All three functions take two template arguments: +- First, the type of the mesh element that the property is attached to (i.e. OpenMesh::VertexHandle, OpenMesh::HalfedgeHandle, OpenMesh::EdgeHandle, or OpenMesh::FaceHandle). +- Second, the type of the property value that is attached to each element (e.g., \p int, \p double, etc.). + +All three functions return a handle object (of type OpenMesh::PropertyManager) that manages the lifetime of the property and provides read / write access to its values. + +In this example, we will store the \c cog value (see previous example) in a vertex property instead of keeping it in a separate array. +To do so, we first add a (temporary) property of the desired element type (OpenMesh::VertexHandle) and value type (\c %MyMesh::Point) to the mesh: \dontinclude 03-properties/smooth.cc -\skipline vertex property stores -\until mesh.add +\skipline makeTemporaryProperty -
      The \c mesh allocates enough memory to hold as many elements of type -\c MyMesh::Point as number of vertices exist, and of course the mesh -synchronizes all insert and delete operations on the vertices with the -vertex properties. +Enough memory is allocated to hold as many values of \c %MyMesh::Point as there are vertices. +All insert and delete operations on the mesh are synchronized with the attached properties. -Once the wanted property is registered we can use the property to -calculate the barycenter of the neighborhood of each vertex \c v_it +Once the property is created, we can use it to compute the centers of the neighborhood of each vertex: -\dontinclude 03-properties/smooth.cc -\skipline vv_it= +\skipline mesh.vertices +\until cog[vh] /= valence \until } -\until mesh.prop -
      and finally set the new position for each vertex \c v_it +Finally, we set the new position for each vertex: -\dontinclude 03-properties/smooth.cc -\skipline mesh.set_point +\skipline mesh.vertices +\until mesh.point +\until } -
      Below is the complete source code: +--- + +Since we chose to use makeTemporaryProperty(), the created property is automatically removed from the mesh as soon as we leave the scope of the associated handle variable \c cog. + +If, instead, a property is desired to survive its local scope, it should be created with using getOrMakeProperty(). In that case, the property must be given a name that can later be used to retrieve the property. For example: + +\code + auto face_area = OpenMesh::makeTemporaryProperty(mesh, 'face_area'); +\endcode + +At a later time, we can use the getProperty() function to obtain a handle to a property that was previously created by refering to its name: +\code + try { + auto face_area = OpenMesh::getProperty(mesh, 'face_area'); + // Use the face_area property. + } + catch (const std::runtime_error& e) { + // Property not found. Handle the error here. + } +\endcode + +--- + +The functions makeTemporaryProperty(), getOrMakeProperty(), and getProperty() are the convenient high-level interface for creating and accessing mesh properties. + +Beneath these convenience functions, there is also a low-level property interface where handle and property lifetime must be managed manually. This interface is accessed through a mesh's add_property(), remove_property(), and property() functions and several property handle classes (OpenMesh::VPropHandleT, OpenMesh::HPropHandleT, OpenMesh::EPropHandleT, OpenMesh::FPropHandleT, OpenMesh::MPropHandleT). + +--- + +Below is the complete source code: \include 03-properties/smooth.cc -*/ \ No newline at end of file +*/ diff --git a/README.md b/README.md index f3a4d17f..062f4a41 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# OpenMesh, 7.2 +# OpenMesh, 8.0 [![](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/badges/master/pipeline.svg)](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/commits/master) @@ -21,10 +21,10 @@ https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python | Visual Studio Version: | 2017 | 2015 | 2013 | | -------- | -------- |-------- |-------- | -| 64-Bit shared, with apps | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-shared-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-shared-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2013-64-bit-shared-apps) | -| 32-Bit shared, with apps | - | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-shared-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2013-32-bit-shared-apps) | -| 64-Bit static, with apps | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-static-apps) | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-static-apps) | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2013-64-bit-static-apps) | -| 32-Bit static, with apps | - | [ Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-static-apps) | [ Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2013-32-bit-static-apps) | +| 64-Bit shared, with apps | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-shared-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-shared-apps) | - | +| 32-Bit shared, with apps | - | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-shared-apps) | - | +| 64-Bit static, with apps | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-static-apps) | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-static-apps) | - | +| 32-Bit static, with apps | - | [ Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-static-apps) | - | | 64-Bit shared, no apps | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-shared-no-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-shared-no-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2013-64-bit-shared-no-apps) | | 32-Bit shared, no apps | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-32-bit-shared-no-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-shared-no-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2013-32-bit-shared-no-apps) | | 64-Bit static, no apps | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-static-no-apps) | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-static-no-apps) | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2013-64-bit-static-no-apps) | diff --git a/VERSION b/VERSION index c975e25f..47e41527 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ -VERSION=7.2 -MAJOR=7 -MINOR=2 +VERSION=8.0 +MAJOR=8 +MINOR=0 PATCH=0 ID=OPENMESH diff --git a/cmake/ACGCommon.cmake b/cmake/ACGCommon.cmake index 2f0ecd2a..dcab028f 100644 --- a/cmake/ACGCommon.cmake +++ b/cmake/ACGCommon.cmake @@ -87,15 +87,6 @@ else () set (ACG_PROJECT_BINDIR "bin") endif () -if( NOT APPLE ) - # check 64 bit - if( CMAKE_SIZEOF_VOID_P MATCHES 4 ) - set( HAVE_64_BIT 0 ) - else( CMAKE_SIZEOF_VOID_P MATCHES 4 ) - set( HAVE_64_BIT 1 ) - endif( CMAKE_SIZEOF_VOID_P MATCHES 4 ) -endif ( NOT APPLE ) - # allow a project to modify the directories if (COMMAND acg_modify_project_dirs) acg_modify_project_dirs () @@ -115,24 +106,14 @@ macro (acg_set_target_props target) SKIP_BUILD_RPATH 0 ) elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE) - if (NOT (CMAKE_MAJOR_VERSION LESS 3) ) - # save rpath - set_target_properties ( - ${target} PROPERTIES - INSTALL_RPATH "@executable_path/../${ACG_PROJECT_LIBDIR}" - MACOSX_RPATH 1 - #BUILD_WITH_INSTALL_RPATH 1 - SKIP_BUILD_RPATH 0 - ) - else() - # save rpath via install name dir - set_target_properties ( - ${target} PROPERTIES - INSTALL_NAME_DIR "@executable_path/../${ACG_PROJECT_LIBDIR}" - #BUILD_WITH_INSTALL_RPATH 1 - SKIP_BUILD_RPATH 0 - ) - endif(NOT (CMAKE_MAJOR_VERSION LESS 3) ) + # save rpath + set_target_properties ( + ${target} PROPERTIES + INSTALL_RPATH "@executable_path/../${ACG_PROJECT_LIBDIR}" + MACOSX_RPATH 1 + #BUILD_WITH_INSTALL_RPATH 1 + SKIP_BUILD_RPATH 0 + ) elseif (NOT APPLE) set_target_properties ( @@ -162,35 +143,6 @@ macro (acg_set var value) set (${var} ${value} CACHE INTERNAL "") endmacro () -# test for OpenMP -macro (acg_openmp) - if (NOT OPENMP_NOTFOUND) - find_package(OpenMP) - if (OPENMP_FOUND) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - add_definitions(-DUSE_OPENMP) - else () - set (OPENMP_NOTFOUND 1) - endif() - endif () -endmacro () - -# test for FTGL -macro (acg_ftgl) - find_package (Freetype) - - if (FREETYPE_FOUND) - find_package (FTGL) - - if (FTGL_FOUND) - add_definitions (-DUSE_FTGL) - include_directories (${FTGL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIR_freetype2}) - set (FTGL_LIBS ${FREETYPE_LIBRARIES} ${FTGL_LIBRARIES}) - endif () - endif () -endmacro () - # append all files with extension "ext" in the "dirs" directories to "ret" # excludes all files starting with a '.' (dot) macro (acg_append_files ret ext) @@ -206,22 +158,6 @@ macro (acg_append_files ret ext) endforeach () endmacro () -# append all files with extension "ext" in the "dirs" directories and its subdirectories to "ret" -# excludes all files starting with a '.' (dot) -macro (acg_append_files_recursive ret ext) - foreach (_dir ${ARGN}) - file (GLOB_RECURSE _files "${_dir}/${ext}") - foreach (_file ${_files}) - get_filename_component (_filename ${_file} NAME) - if (_filename MATCHES "^[.]") - list (REMOVE_ITEM _files ${_file}) - endif () - endforeach () - list (APPEND ${ret} ${_files}) - endforeach () -endmacro () - - # drop all "*T.cc" files from list macro (acg_drop_templates list) foreach (_file ${${list}}) @@ -252,18 +188,6 @@ function (acg_copy_after_build target src dst) endforeach () endfunction () -# install the whole directory without svn files -function (acg_install_dir src dst) - acg_unset (_files) - acg_get_files_in_dir (_files ${src}) - foreach (_file ${_files}) - get_filename_component (_file_PATH ${_file} PATH) - install(FILES "${src}/${_file}" - DESTINATION "${dst}/${_file_PATH}" - ) - endforeach () -endfunction () - # extended version of add_executable that also copies output to out Build directory function (acg_add_executable _target) add_executable (${_target} ${ARGN}) diff --git a/cmake/ACGCompiler.cmake b/cmake/ACGCompiler.cmake index 328157fe..140803f6 100644 --- a/cmake/ACGCompiler.cmake +++ b/cmake/ACGCompiler.cmake @@ -67,15 +67,6 @@ if (UNIX) list(APPEND ADDITIONAL_C_RELEASE_FLAGS "-DINCLUDE_TEMPLATES" ) list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-DINCLUDE_TEMPLATES" ) -# Deprecated setting. Remove in future release, as the default template depth -# should be enough with state of the art compilers -# # Increase the template depth as this might be exceeded from time to time -# IF( NOT CMAKE_SYSTEM MATCHES "SunOS*") -# list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-ftemplate-depth-100" ) -# list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-ftemplate-depth-100" ) -# list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-ftemplate-depth-100" ) -# ENDIF() - ################################################################################ # OS Defines ################################################################################ @@ -197,10 +188,4 @@ if (UNIX) endif() endforeach() - #TODO : Test and remove it?! - IF( CMAKE_SYSTEM MATCHES "SunOS*") - set (CMAKE_CFLAGS_RELEASE "-xO3") - set (CMAKE_CXX_FLAGS_RELEASE "-xO3") - endif ( CMAKE_SYSTEM MATCHES "SunOS*" ) - endif () diff --git a/cmake/ACGDoxygen.cmake b/cmake/ACGDoxygen.cmake index e67b8fc6..bd6cc5f5 100644 --- a/cmake/ACGDoxygen.cmake +++ b/cmake/ACGDoxygen.cmake @@ -18,8 +18,9 @@ # author Jan Woetzel 2004-2006 # www.mip.informatik.uni-kiel.de/~jw - -FIND_PACKAGE(Doxygen) +if ( NOT DOXYGEN_FOUND) + FIND_PACKAGE(Doxygen) +endif() IF (DOXYGEN_FOUND) @@ -119,4 +120,4 @@ IF (DOXYGEN_FOUND) ENDIF(HTML_HELP_COMPILER) # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}") ENDIF (WIN32) -ENDIF(DOXYGEN_FOUND) \ No newline at end of file +ENDIF(DOXYGEN_FOUND) diff --git a/cmake/ACGQt.cmake b/cmake/ACGQt.cmake index 60949353..c3e6ed67 100644 --- a/cmake/ACGQt.cmake +++ b/cmake/ACGQt.cmake @@ -1,25 +1,5 @@ -#unset cached qt variables which are set by all qt versions. version is the major number of the qt version (e.g. 4 or 5, not 4.8) -macro (acg_unset_qt_shared_variables version) - if (ACG_INTERNAL_QT_LAST_VERSION) - if (NOT ${ACG_INTERNAL_QT_LAST_VERSION} EQUAL ${version}) - unset(QT_BINARY_DIR) - unset(QT_PLUGINS_DIR) - unset(ACG_INTERNAL_QT_LAST_VERSION) - endif() - endif() - set (ACG_INTERNAL_QT_LAST_VERSION "${version}" CACHE INTERNAL "Qt Version, which was used on the last time") -endmacro() - macro (acg_qt5) - if(POLICY CMP0020) - # Automatically link Qt executables to qtmain target on Windows - cmake_policy(SET CMP0020 NEW) - endif(POLICY CMP0020) - #if (NOT QT5_FOUND) - - #set (QT_MIN_VERSION ${ARGN}) - #try to find qt5 automatically #for custom installation of qt5, dont use any of these variables set (QT5_INSTALL_PATH "" CACHE PATH "Path to Qt5 directory which contains lib and include folder") @@ -32,7 +12,7 @@ macro (acg_qt5) set(QT5_FINDER_FLAGS "" CACHE STRING "Flags for the Qt finder e.g. NO_DEFAULT_PATH if no system installed Qt shall be found") # compute default search paths - set(SUPPORTED_QT_VERSIONS 5.9 5.8 5.7 5.6) + set(SUPPORTED_QT_VERSIONS 5.11 5.10 5.9 5.8 5.7 5.6) foreach (suffix gcc_64 clang_64) foreach(version ${SUPPORTED_QT_VERSIONS}) list(APPEND QT_DEFAULT_PATH "~/sw/Qt/${version}/${suffix}") @@ -53,52 +33,19 @@ macro (acg_qt5) find_package (Qt5Widgets QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) find_package (Qt5Gui QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) find_package (Qt5OpenGL QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Network QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Sql QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Script QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5ScriptTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Xml QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5XmlPatterns QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Help QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5UiTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Svg QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5PrintSupport QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Concurrent QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - - #do noot look for Webkit and qt declarative on qt version 5.6 or newer - if(${QT_VERSION_MINOR} LESS 6) - find_package (Qt5Declarative QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5WebKit QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - endif(${QT_VERSION_MINOR} LESS 6) if (NOT WIN32 AND NOT APPLE) find_package (Qt5X11Extras QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) endif () - if(${QT_VERSION_MINOR} GREATER 5) - if (Qt5Core_FOUND AND Qt5Widgets_FOUND - AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND AND Qt5Network_FOUND - AND Qt5Script_FOUND AND Qt5ScriptTools_FOUND AND Qt5Sql_FOUND - AND Qt5Xml_FOUND AND Qt5XmlPatterns_FOUND AND Qt5Help_FOUND - AND Qt5UiTools_FOUND AND Qt5Concurrent_FOUND - AND Qt5PrintSupport_FOUND) + if (Qt5Core_FOUND AND Qt5Widgets_FOUND AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND ) set (QT5_FOUND TRUE) - endif() - else(${QT_VERSION_MINOR} GREATER 5) - if (Qt5Core_FOUND AND Qt5Declarative_FOUND AND Qt5Widgets_FOUND - AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND AND Qt5Network_FOUND - AND Qt5Script_FOUND AND Qt5ScriptTools_FOUND AND Qt5Sql_FOUND - AND Qt5Xml_FOUND AND Qt5XmlPatterns_FOUND AND Qt5Help_FOUND - AND Qt5WebKit_FOUND AND Qt5UiTools_FOUND AND Qt5Concurrent_FOUND - AND Qt5PrintSupport_FOUND) - set (QT5_FOUND TRUE) - endif() - endif(${QT_VERSION_MINOR} GREATER 5) + endif() + endif(Qt5Core_FOUND) if (QT5_FOUND) - acg_unset_qt_shared_variables(5) - + #set plugin dir list(GET Qt5Gui_PLUGINS 0 _plugin) if (_plugin) @@ -124,38 +71,6 @@ macro (acg_qt5) set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - include_directories(${Qt5Core_INCLUDE_DIRS}) - include_directories(${Qt5Declarative_INCLUDE_DIRS}) - include_directories(${Qt5Widgets_INCLUDE_DIRS}) - include_directories(${Qt5Gui_INCLUDE_DIRS}) - include_directories(${Qt5OpenGL_INCLUDE_DIRS}) - include_directories(${Qt5Network_INCLUDE_DIRS}) - include_directories(${Qt5Script_INCLUDE_DIRS}) - include_directories(${Qt5ScriptTools_INCLUDE_DIRS}) - include_directories(${Qt5Sql_INCLUDE_DIRS}) - include_directories(${Qt5Xml_INCLUDE_DIRS}) - include_directories(${Qt5XmlPatterns_INCLUDE_DIRS}) - include_directories(${Qt5Help_INCLUDE_DIRS}) - include_directories(${Qt5WebKit_INCLUDE_DIRS}) - include_directories(${Qt5UiTools_INCLUDE_DIRS}) - include_directories(${Qt5Concurrent_INCLUDE_DIRS}) - include_directories(${Qt5PrintSupport_INCLUDE_DIRS}) - add_definitions(${Qt5Core_DEFINITIONS}) - add_definitions(${Qt5Widgets_DEFINITIONS}) - add_definitions(${Qt5Gui_DEFINITIONS}) - add_definitions(${Qt5OpenGL_DEFINITIONS}) - add_definitions(${Qt5Network_DEFINITIONS}) - add_definitions(${Qt5Script_DEFINITIONS}) - add_definitions(${Qt5ScriptTools_DEFINITIONS}) - add_definitions(${Qt5Sql_DEFINITIONS}) - add_definitions(${Qt5Xml_DEFINITIONS}) - add_definitions(${Qt5XmlPatterns_DEFINITIONS}) - add_definitions(${Qt5Help_DEFINITIONS}) - add_definitions(${Qt5WebKit_DEFINITIONS}) - add_definitions(${Qt5UiTools_DEFINITIONS}) - add_definitions(${Qt5Concurrent_DEFINITIONS}) - add_definitions(${Qt5PrintSupport_DEFINITIONS}) - if (Qt5X11Extras_FOUND) include_directories(${Qt5X11Extras_INCLUDE_DIRS}) add_definitions(${Qt5X11Extras_DEFINITIONS}) @@ -165,232 +80,26 @@ macro (acg_qt5) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") endif() - set (QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Declarative_LIBRARIES} ${Qt5Widgets_LIBRARIES} - ${Qt5Gui_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${Qt5Network_LIBRARIES} - ${Qt5Script_LIBRARIES} ${Qt5ScriptTools_LIBRARIES} ${Qt5Sql_LIBRARIES} - ${Qt5Xml_LIBRARIES} ${Qt5XmlPatterns_LIBRARIES} ${Qt5Help_LIBRARIES} - ${Qt5WebKit_LIBRARIES} ${Qt5UiTools_LIBRARIES} ${Qt5Concurrent_LIBARIES} - ${Qt5PrintSupport_LIBRARIES}) - - if (Qt5X11Extras_FOUND) - list (APPEND QT_LIBRARIES ${Qt5X11Extras_LIBRARIES}) - endif () - - if (MSVC) - set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5Core_QTMAIN_LIBRARIES}) - endif() - - #add_definitions(-DQT_NO_OPENGL) - - #adding QT_NO_DEBUG to all release modes. - # Note: for multi generators like msvc you cannot set this definition depending of - # the current build type, because it may change in the future inside the ide and not via cmake - if (MSVC_IDE) - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - - set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - set(CMAKE_CXX_FLAGS_MINSITEREL "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - - set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - else(MSVC_IDE) - if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-DQT_NO_DEBUG) - endif() - endif(MSVC_IDE) - - endif () -endmacro () - -# generate moc targets for sources in list -macro (acg_qt5_automoc moc_SRCS) - qt5_get_moc_flags (_moc_INCS) - - list(REMOVE_DUPLICATES _moc_INCS) - - set (_matching_FILES ) - foreach (_current_FILE ${ARGN}) - - get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE) - # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. - # here. this is required to make bouic work correctly: - # we need to add generated .cpp files to the sources (to compile them), - # but we cannot let automoc handle them, as the .cpp files don't exist yet when - # cmake is run for the very first time on them -> however the .cpp files might - # exist at a later run. at that time we need to skip them, so that we don't add two - # different rules for the same moc file - get_source_file_property (_skip ${_abs_FILE} SKIP_AUTOMOC) - - if ( NOT _skip AND EXISTS ${_abs_FILE} ) - - file (READ ${_abs_FILE} _contents) - - get_filename_component (_abs_PATH ${_abs_FILE} PATH) - - string (REGEX MATCHALL "Q_OBJECT" _match "${_contents}") - if (_match) - get_filename_component (_basename ${_current_FILE} NAME_WE) - set (_header ${_abs_FILE}) - set (_moc ${CMAKE_CURRENT_BINARY_DIR}/moc_${_basename}.cpp) - - add_custom_command (OUTPUT ${_moc} - COMMAND ${QT_MOC_EXECUTABLE} - ARGS ${_moc_INCS} ${_header} -o ${_moc} - DEPENDS ${_header} - ) - - add_file_dependencies (${_abs_FILE} ${_moc}) - set (${moc_SRCS} ${${moc_SRCS}} ${_moc}) - - endif () - endif () - endforeach () -endmacro () - -# generate uic targets for sources in list -macro (acg_qt5_autouic uic_SRCS) - - set (_matching_FILES ) - foreach (_current_FILE ${ARGN}) - - get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE) - - if ( EXISTS ${_abs_FILE} ) - - file (READ ${_abs_FILE} _contents) - - get_filename_component (_abs_PATH ${_abs_FILE} PATH) - - get_filename_component (_basename ${_current_FILE} NAME_WE) - string (REGEX REPLACE "Ui$" "" _cbasename ${_basename}) - set (_outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.hh) - set (_header ${_basename}.hh) - set (_source ${_abs_PATH}/${_cbasename}.cc) - - add_custom_command (OUTPUT ${_outfile} - COMMAND ${Qt5Widgets_UIC_EXECUTABLE} - ARGS -o ${_outfile} ${_abs_FILE} - MAIN_DEPENDENCY ${_abs_FILE} VERBATIM) - - add_file_dependencies (${_source} ${_outfile}) - set (${uic_SRCS} ${${uic_SRCS}} ${_outfile}) - - endif () - endforeach () -endmacro () - -# generate qrc targets for sources in list -macro (acg_qt5_autoqrc qrc_SRCS) - - set (_matching_FILES ) - foreach (_current_FILE ${ARGN}) - - get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE) - - if ( EXISTS ${_abs_FILE} ) - - file (READ ${_abs_FILE} _contents) - - get_filename_component (_abs_PATH ${_abs_FILE} PATH) - - get_filename_component (_basename ${_current_FILE} NAME_WE) - set (_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${_basename}.cpp) - - qt5_add_resources( ${_outfile} ${_abs_FILE} ) - - add_file_dependencies (${_source} ${_outfile}) - set (${qrc_SRCS} ${${qrc_SRCS}} ${_outfile}) - - endif () - endforeach () -endmacro () - - -#generates qt translations -function (acg_add_translations _target _languages _sources) - - string (TOUPPER ${_target} _TARGET) - # generate/use translation files - # run with UPDATE_TRANSLATIONS set to on to build qm files - option (UPDATE_TRANSLATIONS_${_TARGET} "Update source translation *.ts files (WARNING: make clean will delete the source .ts files! Danger!)") - - set (_new_ts_files) - set (_ts_files) - - foreach (lang ${_languages}) - if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/translations/${_target}_${lang}.ts" OR UPDATE_TRANSLATIONS_${_TARGET}) - list (APPEND _new_ts_files "translations/${_target}_${lang}.ts") - else () - list (APPEND _ts_files "translations/${_target}_${lang}.ts") - endif () - endforeach () - - - set (_qm_files) - if ( _new_ts_files ) - if (QT5_FOUND) - #qt5_create_translation(_qm_files ${_sources} ${_new_ts_files}) - endif () - endif () - - if ( _ts_files ) - if (QT5_FOUND) - #qt5_add_translation(_qm_files2 ${_ts_files}) - endif() - list (APPEND _qm_files ${_qm_files2}) - endif () - - # create a target for the translation files ( and object files ) - # Use this target, to update only the translations - add_custom_target (tr_${_target} DEPENDS ${_qm_files}) - GROUP_PROJECT( tr_${_target} "Translations") - - # Build translations with the application - add_dependencies(${_target} tr_${_target} ) - - if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Translations) - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Translations ) - endif () - - foreach (_qm ${_qm_files}) - get_filename_component (_qm_name "${_qm}" NAME) - add_custom_command (TARGET tr_${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - ${_qm} - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Translations/${_qm_name}) - endforeach () - - if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE) - install (FILES ${_qm_files} DESTINATION "${ACG_PROJECT_DATADIR}/Translations") - endif () -endfunction () - -# Function that writes all generated qch files into one Help.qhcp project file -function (generate_qhp_file files_loc plugin_name) - - set(qhp_file "${files_loc}/${plugin_name}.qhp") - # Read in template file - file(STRINGS "${CMAKE_SOURCE_DIR}/OpenFlipper/Documentation/QtHelpResources/QtHelpProject.qhp" qhp_template) - - # Initialize new project file - file(WRITE ${qhp_file} "") - foreach (_line ${qhp_template}) - string(STRIP ${_line} stripped) - if("${stripped}" STREQUAL "files") - acg_get_files_in_dir (_files ${files_loc}) - foreach (_file ${_files}) - string(REGEX MATCH ".+[.]+((html)|(htm)|(xml))$" fileresult ${_file}) - string(LENGTH "${fileresult}" len) - if(${len} GREATER 0) - file(APPEND ${qhp_file} "${_file}\n") - endif() - endforeach() - else() - string(REGEX REPLACE "plugin" ${plugin} newline ${_line}) - file(APPEND ${qhp_file} "${newline}\n") + #adding QT_NO_DEBUG to all release modes. + # Note: for multi generators like msvc you cannot set this definition depending of + # the current build type, because it may change in the future inside the ide and not via cmake + if (MSVC_IDE) + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") + + set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") + set(CMAKE_CXX_FLAGS_MINSITEREL "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") + + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") + else(MSVC_IDE) + if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DQT_NO_DEBUG) endif() - endforeach() -endfunction() + endif(MSVC_IDE) + # Enable automoc + set(CMAKE_AUTOMOC ON) + + endif (QT5_FOUND) +endmacro () diff --git a/cmake/FindGLEW.cmake b/cmake/FindGLEW.cmake deleted file mode 100644 index c7151187..00000000 --- a/cmake/FindGLEW.cmake +++ /dev/null @@ -1,83 +0,0 @@ -# - Try to find GLEW -# Once done this will define -# -# GLEW_FOUND - system has GLEW -# GLEW_INCLUDE_DIR - the GLEW include directory -# GLEW_LIBRARY_DIR - where the libraries are -# GLEW_LIBRARY - Link these to use GLEW -# - -IF (GLEW_INCLUDE_DIR) - # Already in cache, be silent - SET(GLEW_FIND_QUIETLY TRUE) -ENDIF (GLEW_INCLUDE_DIR) - -if( WIN32 ) - - # Check if the base path is set - if ( NOT CMAKE_WINDOWS_LIBS_DIR ) - # This is the base directory for windows library search used in the finders we shipp. - set(CMAKE_WINDOWS_LIBS_DIR "c:\libs" CACHE STRING "Default Library search dir on windows." ) - endif() - - if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x64/") - elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x32/") - elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x64/") - elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x32/") - elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/") - elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/") - elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/") - elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/") - endif() - - if( MSVC80 ) - set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC" ) - endif( MSVC80 ) - if( MSVC71 ) - set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Vc7" ) - endif( MSVC71 ) - - FIND_PATH( GLEW_INCLUDE_DIR gl/glew.h gl/wglew.h - PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/include" - "${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/include" - ${COMPILER_PATH}/PlatformSDK/Include - "${VS_SEARCH_PATH}glew-2.0.0/include" - "${VS_SEARCH_PATH}glew-1.10.0/include" - "${VS_SEARCH_PATH}glew-1.13.0/include") - - SET( GLEW_NAMES glew32 ) - FIND_LIBRARY( GLEW_LIBRARY - NAMES ${GLEW_NAMES} - PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/lib" - "${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/lib" - ${COMPILER_PATH}/PlatformSDK/Lib - "${VS_SEARCH_PATH}glew-2.0.0/lib" - "${VS_SEARCH_PATH}glew-1.10.0/lib" - "${VS_SEARCH_PATH}glew-1.13.0/lib" ) - -else( WIN32 ) - FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h GL/wglew.h - PATHS /usr/local/include /usr/include ) - SET( GLEW_NAMES glew GLEW ) - FIND_LIBRARY( GLEW_LIBRARY - NAMES ${GLEW_NAMES} - PATHS /usr/lib /usr/local/lib ) -endif( WIN32 ) - -GET_FILENAME_COMPONENT( GLEW_LIBRARY_DIR ${GLEW_LIBRARY} PATH ) - -IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) - SET(GLEW_FOUND TRUE) -ELSE (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) - SET( GLEW_FOUND FALSE ) - SET( GLEW_LIBRARY_DIR ) -ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) - diff --git a/cmake/FindGoogleTest.cmake b/cmake/FindGoogleTest.cmake deleted file mode 100644 index 15c22cd6..00000000 --- a/cmake/FindGoogleTest.cmake +++ /dev/null @@ -1,121 +0,0 @@ -# Locate and configure the Google Test libraries. -# -# Defines the following variable: -# -# GTEST_FOUND - Found the Google Test libraries -# GTEST_INCLUDE_DIRS - The directories needed on the include paths -# GTEST_LIBRARIES - The libraries to link to test executables -# GTEST_MAIN_LIBRARIES - The libraries to link for automatic main() provision -# -# Copyright 2008 Chandler Carruth -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -if(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES) - set(GTEST_FOUND true) -else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES) - set(GTEST_PREFIX "" CACHE PATH "Installation prefix for Google Test") - if(GTEST_PREFIX) - find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h" - PATHS "${GTEST_PREFIX}/include" - NO_DEFAULT_PATH) - find_library(_GTEST_LIBRARY gtest - PATHS "${GTEST_PREFIX}/lib" - NO_DEFAULT_PATH) - find_library(_GTEST_MAIN_LIBRARY gtest_main - PATHS "${GTEST_PREFIX}/lib" - NO_DEFAULT_PATH) - - if ( _GTEST_LIBRARY ) - get_filename_component(_GTEST_LIBRARY_DIR ${_GTEST_LIBRARY} PATH CACHE ) - endif() - else(GTEST_PREFIX) - find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h" - PATHS - ~/sw/gtest-1.8.0/include - ~/sw/gtest-1.7.0/include - ~/sw/gtest/include - /ACG/acgdev/gcc-x86_64/gtest/include - /opt/local/include - /usr/local/include - /usr/include - "C:/libs/win32/gtest/include" - NO_DEFAULT_PATH ) - find_library(_GTEST_LIBRARY gtest - PATHS - ~/sw/gtest-1.8.0/lib - ~/sw/gtest-1.7.0/lib - ~/sw/gtest/lib - /ACG/acgdev/gcc-x86_64/gtest/lib - /opt/local/lib - /usr/local/lib - /usr/include - "C:/libs/win32/gtest/lib" - NO_DEFAULT_PATH ) - find_library(_GTEST_MAIN_LIBRARY gtest_main - PATHS - ~/sw/gtest-1.8.0/lib - ~/sw/gtest-1.7.0/lib - ~/sw/gtest/lib - /ACG/acgdev/gcc-x86_64/gtest/lib - /opt/local/lib - /usr/local/lib - /usr/include - "C:/libs/win32/gtest/lib" - NO_DEFAULT_PATH ) - - if ( _GTEST_LIBRARY ) - get_filename_component(_GTEST_LIBRARY_DIR ${_GTEST_LIBRARY} PATH CACHE ) - endif() - - endif(GTEST_PREFIX) - if(_GTEST_INCLUDE_DIR AND _GTEST_LIBRARY AND _GTEST_MAIN_LIBRARY) - set(GTEST_FOUND true) - set(GTEST_INCLUDE_DIRS ${_GTEST_INCLUDE_DIR} CACHE PATH - "Include directories for Google Test framework") - - if ( NOT WIN32 ) - set(GTEST_LIBRARIES ${_GTEST_LIBRARY} CACHE FILEPATH - "Libraries to link for Google Test framework") - set(GTEST_MAIN_LIBRARIES ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH - "Libraries to link for Google Test automatic main() definition") - set(GTEST_MAIN_LIBRARY ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH - "Libraries to link for Google Test automatic main() definition") - else() - set(GTEST_LIBRARIES "optimized;gtest;debug;gtestd" CACHE FILEPATH - "Libraries to link for Google Test framework") - set(GTEST_MAIN_LIBRARIES "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH - "Libraries to link for Google Test automatic main() definition") - set(GTEST_MAIN_LIBRARY "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH - "Libraries to link for Google Test automatic main() definition") - endif() - - # Macro required to use google test with vs2012 - if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" ) - add_definitions(-D_VARIADIC_MAX=10) - endif() - - set(GTEST_LIBRARY ${_GTEST_LIBRARY} CACHE FILEPATH - "GTest Libraries") - set(GTEST_LIBRARY_DIR ${_GTEST_LIBRARY_DIR} CACHE FILEPATH - "Library dir containing Google Test libraries") - mark_as_advanced(GTEST_INCLUDE_DIRS GTEST_LIBRARIES GTEST_MAIN_LIBRARIES GTEST_LIBRARY_DIR ) - if(NOT GoogleTest_FIND_QUIETLY) - message(STATUS "Found Google Test: ${GTEST_LIBRARIES}") - endif(NOT GoogleTest_FIND_QUIETLY) - else(_GTEST_INCLUDE_DIR AND _GTEST_LIBRARY AND _GTEST_MAIN_LIBRARY) - if(GoogleTest_FIND_REQUIRED) - message(FATAL_ERROR "Could not find the Google Test framework") - endif(GoogleTest_FIND_REQUIRED) - endif(_GTEST_INCLUDE_DIR AND _GTEST_LIBRARY AND _GTEST_MAIN_LIBRARY) -endif(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES) diff --git a/cmake/FindOpenMP.cmake b/cmake/FindOpenMP.cmake deleted file mode 100644 index 5e8980de..00000000 --- a/cmake/FindOpenMP.cmake +++ /dev/null @@ -1,108 +0,0 @@ -# - Finds OpenMP support -# This module can be used to detect OpenMP support in a compiler. -# If the compiler supports OpenMP, the flags required to compile with -# openmp support are set. -# -# The following variables are set: -# OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support -# OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support -# OPENMP_FOUND - true if openmp is detected -# -# Supported compilers can be found at http://openmp.org/wp/openmp-compilers/ - - -# Copyright 2008, 2009 Andre.Brodtkorb@ifi.uio.no -# -# Redistribution AND use is allowed according to the terms of the New -# BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -include(CheckCSourceCompiles) -include(CheckCXXSourceCompiles) -include(FindPackageHandleStandardArgs) - -set(OpenMP_C_FLAG_CANDIDATES - #Gnu - "-fopenmp" - #Microsoft Visual Studio - "/openmp" - #Intel windows - "-Qopenmp" - #Intel - "-openmp" - #Empty, if compiler automatically accepts openmp - " " - #Sun - "-xopenmp" - #HP - "+Oopenmp" - #IBM XL C/c++ - "-qsmp" - #Portland Group - "-mp" -) -set(OpenMP_CXX_FLAG_CANDIDATES ${OpenMP_C_FLAG_CANDIDATES}) - -# sample openmp source code to test -set(OpenMP_C_TEST_SOURCE -" -#include -int main() { -#ifdef _OPENMP - return 0; -#else - breaks_on_purpose -#endif -} -") -# use the same source for CXX as C for now -set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE}) -# if these are set then do not try to find them again, -# by avoiding any try_compiles for the flags -if(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS) - set(OpenMP_C_FLAG_CANDIDATES) - set(OpenMP_CXX_FLAG_CANDIDATES) -endif(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS) - -# check c compiler -foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES}) - set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") - set(CMAKE_REQUIRED_FLAGS "${FLAG}") - set(OpenMP_C_FLAG_DETECTED) - message(STATUS "Try OpenMP C flag = [${FLAG}]") - check_c_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_C_FLAG_DETECTED) - set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}") - if(OpenMP_C_FLAG_DETECTED) - set(OpenMP_C_FLAGS_INTERNAL "${FLAG}") - break() - endif(OpenMP_C_FLAG_DETECTED) -endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES}) - -# check cxx compiler -foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES}) - set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") - set(CMAKE_REQUIRED_FLAGS "${FLAG}") - set(OpenMP_CXX_FLAG_DETECTED) - message(STATUS "Try OpenMP CXX flag = [${FLAG}]") - check_cxx_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_CXX_FLAG_DETECTED) - set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}") - if(OpenMP_CXX_FLAG_DETECTED) - set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}") - break() - endif(OpenMP_CXX_FLAG_DETECTED) -endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES}) - -set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}" - CACHE STRING "C compiler flags for OpenMP parallization") - -set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS_INTERNAL}" - CACHE STRING "C++ compiler flags for OpenMP parallization") -# handle the standard arguments for find_package -find_package_handle_standard_args(OpenMP DEFAULT_MSG - OpenMP_C_FLAGS OpenMP_CXX_FLAGS ) - -mark_as_advanced( - OpenMP_C_FLAGS - OpenMP_CXX_FLAGS -) diff --git a/cmake/FindOpenMesh.cmake b/cmake/FindOpenMesh.cmake index 19509deb..13213ad9 100644 --- a/cmake/FindOpenMesh.cmake +++ b/cmake/FindOpenMesh.cmake @@ -63,6 +63,7 @@ IF (NOT OPENMESH_FOUND) "${CMAKE_SOURCE_DIR}/OpenMesh/src/OpenMesh" "${CMAKE_SOURCE_DIR}/libs_required/OpenMesh/src/OpenMesh" "${CMAKE_SOURCE_DIR}/../OpenMesh/src/OpenMesh" + "C:/Program Files/OpenMesh 8.0" "C:/Program Files/OpenMesh 7.2" "C:/Program Files/OpenMesh 7.1" "C:/Program Files/OpenMesh 7.0" @@ -84,6 +85,7 @@ IF (NOT OPENMESH_FOUND) "C:/Program Files/OpenMesh 2.4.1" "C:/Program Files/OpenMesh 2.4" "C:/Program Files/OpenMesh 2.0/include" + "C:/libs/OpenMesh 8.0" "C:/libs/OpenMesh 7.1" "C:/libs/OpenMesh 7.0" "C:/libs/OpenMesh 6.3" diff --git a/src/OpenMesh/Apps/CMakeLists.txt b/src/OpenMesh/Apps/CMakeLists.txt index b182806f..0b52af08 100644 --- a/src/OpenMesh/Apps/CMakeLists.txt +++ b/src/OpenMesh/Apps/CMakeLists.txt @@ -41,27 +41,17 @@ if ( BUILD_APPS ) find_package (OpenGL) find_package (GLUT) - # try to use QT5 if possible otherwise stick to QT4 - set (FORCE_QT4 OFF CACHE BOOL "Use Qt4 even if Qt5 was found") - # For the apps, we need qt and opengl to build them - if (NOT QT5_FOUND AND NOT FORCE_QT4) + if (NOT QT5_FOUND) acg_qt5 () endif() - if (NOT QT5_FOUND AND NOT QT4_FOUND) - find_package (Qt4 COMPONENTS QtCore QtGui ) - - set (QT_USE_QTOPENGL 1) - - include (${QT_USE_FILE}) - endif () if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles") message(WARNING "GUI Apps are not build with mingw. (TODO)") endif() # check for OpenGL and GLUT as our required dependencies - if ((QT5_FOUND OR QT4_FOUND) AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" ) + if (( QT5_FOUND ) AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" ) add_subdirectory (Decimating/DecimaterGui) add_subdirectory (QtViewer) @@ -99,8 +89,8 @@ if ( BUILD_APPS ) else () # QT ,Opengl or glut not found - if (NOT QT4_FOUND AND NOT QT5_FOUND) - message ("QT 4 and 5 not found! Skipping some apps.") + if (NOT QT5_FOUND) + message ("QT5 not found! Skipping some apps.") endif () if (NOT OPENGL_FOUND) diff --git a/src/OpenMesh/Apps/Decimating/CmdOption.hh b/src/OpenMesh/Apps/Decimating/CmdOption.hh index bbab79f4..978d32df 100644 --- a/src/OpenMesh/Apps/Decimating/CmdOption.hh +++ b/src/OpenMesh/Apps/Decimating/CmdOption.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef CMDOPTION #define CMDOPTION diff --git a/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt b/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt index 89d0596a..fa9f6f14 100644 --- a/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt +++ b/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt @@ -1,54 +1,41 @@ -include (ACGCommon) - -include_directories ( - ../../../.. - ${CMAKE_CURRENT_SOURCE_DIR} - ${GLUT_INCLUDE_DIR} - ${QT_INCLUDE_DIR} -) - - -set (targetName DecimaterGui) - -# source code directories -set (directories - ../../QtViewer - ../ -) - -# collect all header and source files -acg_append_files (headers "*.hh" ${directories}) - -set (sources - ../../QtViewer/QGLViewerWidget.cc - ../../QtViewer/MeshViewerWidgetT.cc - ../DecimaterViewerWidget.cc - ../decimaterviewer.cc -) - -# remove template cc files from source file list -acg_drop_templates (sources) - -# genereate uic and moc targets -if(QT5_FOUND) - acg_qt5_automoc (moc_targets ${headers}) -else() - acg_qt4_automoc (moc_targets ${headers}) -endif() - -if (WIN32) - acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets}) - # link to qtmain library to get WinMain function for a non terminal app - target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY}) -else () - acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets}) -endif () - -target_link_libraries (${targetName} - OpenMeshCore - OpenMeshTools - ${QT_LIBRARIES} - ${OPENGL_LIBRARIES} - ${GLUT_LIBRARIES} -) - +include (ACGCommon) + +include_directories ( + ../../../.. + ${CMAKE_CURRENT_SOURCE_DIR} + ${GLUT_INCLUDE_DIR} +) + +# source code directories +set (directories + ../../QtViewer + ../ +) + +# collect all header and source files +acg_append_files (headers "*.hh" ${directories}) + +set (sources + ../../QtViewer/QGLViewerWidget.cc + ../../QtViewer/MeshViewerWidgetT.cc + ../DecimaterViewerWidget.cc + ../decimaterviewer.cc +) + +# remove template cc files from source file list +acg_drop_templates (sources) + +if (WIN32) + acg_add_executable (DecimaterGui WIN32 ${sources} ${headers}) +else () + acg_add_executable (DecimaterGui ${sources} ${headers} ) +endif () + +target_link_libraries (DecimaterGui + OpenMeshCore + OpenMeshTools + Qt5::OpenGL + ${OPENGL_LIBRARIES} + ${GLUT_LIBRARIES} +) + diff --git a/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.cc b/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.cc index 5ec3e623..a6508249 100644 --- a/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.cc +++ b/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh b/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh index bb908a61..3da9a6c9 100644 --- a/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh +++ b/src/OpenMesh/Apps/Decimating/DecimaterViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_DECIMATERVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt b/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt index 67642927..daa3ec11 100644 --- a/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt +++ b/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt @@ -5,16 +5,14 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName commandlineDecimater) - # collect all header and source files set (sources ../decimater.cc ) -acg_add_executable (${targetName} ${sources}) +acg_add_executable (commandlineDecimater ${sources}) -target_link_libraries (${targetName} +target_link_libraries (commandlineDecimater OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/Decimating/decimater.cc b/src/OpenMesh/Apps/Decimating/decimater.cc index eca0b3e4..0e1818be 100644 --- a/src/OpenMesh/Apps/Decimating/decimater.cc +++ b/src/OpenMesh/Apps/Decimating/decimater.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #if !defined(OM_USE_OSG) # define OM_USE_OSG 0 @@ -464,7 +459,7 @@ int main(int argc, char* argv[]) { case 'D': opt.decorate_name = true; break; case 'd': gdebug = true; break; - case 'h': usage_and_exit(0); + case 'h': usage_and_exit(0); break; case 'i': ifname = optarg; break; case 'M': opt.parse_argument( optarg ); break; case 'n': opt.n_collapses = float(atof(optarg)); break; diff --git a/src/OpenMesh/Apps/Decimating/decimaterviewer.cc b/src/OpenMesh/Apps/Decimating/decimaterviewer.cc index 4a901c29..4c421d6e 100644 --- a/src/OpenMesh/Apps/Decimating/decimaterviewer.cc +++ b/src/OpenMesh/Apps/Decimating/decimaterviewer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifdef _MSC_VER # pragma warning(disable: 4267 4311) @@ -98,6 +93,7 @@ int main(int argc, char **argv) case 's': opt += OpenMesh::IO::Options::Swap; break; case 'h': usage_and_exit(0); + break; default: usage_and_exit(1); } diff --git a/src/OpenMesh/Apps/Dualizer/CMakeLists.txt b/src/OpenMesh/Apps/Dualizer/CMakeLists.txt index 861f5fed..65a36fc2 100644 --- a/src/OpenMesh/Apps/Dualizer/CMakeLists.txt +++ b/src/OpenMesh/Apps/Dualizer/CMakeLists.txt @@ -5,15 +5,13 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName Dualizer) - # collect all header and source files acg_append_files (headers "*.hh" .) acg_append_files (sources "*.cc" .) -acg_add_executable (${targetName} ${headers} ${sources}) +acg_add_executable (Dualizer ${headers} ${sources}) -target_link_libraries (${targetName} +target_link_libraries (Dualizer OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/Dualizer/dualizer.cc b/src/OpenMesh/Apps/Dualizer/dualizer.cc index 57d87c38..e5fcd642 100644 --- a/src/OpenMesh/Apps/Dualizer/dualizer.cc +++ b/src/OpenMesh/Apps/Dualizer/dualizer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include diff --git a/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt b/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt index 092d46cc..e0cc7053 100644 --- a/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt +++ b/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt @@ -4,11 +4,8 @@ include_directories ( ../../.. ${CMAKE_CURRENT_SOURCE_DIR} ${GLUT_INCLUDE_DIR} - ${QT_INCLUDE_DIR} ) -set (targetName ProgViewer) - # collect all header and source files acg_append_files (headers "*.hh" .) @@ -20,44 +17,19 @@ list (APPEND sources "../QtViewer/MeshViewerWidgetT.cc") list (APPEND headers "../QtViewer/QGLViewerWidget.hh") list (APPEND headers "../QtViewer/MeshViewerWidgetT.hh") - -# # source code directories -# set (directories -# . -# ../QtViewer -# ) - -# # collect all header and source files -# acg_append_files (headers "*.hh" ${directories}) - -# set (sources -# ../../QtViewer/QGLViewerWidget.cc -# ../../QtViewer/MeshViewerWidgetT.cc -# ./ProgViewerWidget.cc -# ) - # remove template cc files from source file list acg_drop_templates (sources) -# genereate uic and moc targets -if(QT5_FOUND) - acg_qt5_automoc (moc_targets ${headers}) -else() - acg_qt4_automoc (moc_targets ${headers}) -endif() - if (WIN32) - acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets}) - # link to qtmain library to get WinMain function for a non terminal app - target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY}) + acg_add_executable( ProgViewer WIN32 ${sources} ${headers}) else () - acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets}) + acg_add_executable( ProgViewer ${sources} ${headers}) endif () -target_link_libraries (${targetName} +target_link_libraries ( ProgViewer OpenMeshCore OpenMeshTools - ${QT_LIBRARIES} + Qt5::OpenGL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ) diff --git a/src/OpenMesh/Apps/ProgViewer/OpenMesh_Apps_ProgViewer.vcproj b/src/OpenMesh/Apps/ProgViewer/OpenMesh_Apps_ProgViewer.vcproj deleted file mode 100644 index 0ae89add..00000000 --- a/src/OpenMesh/Apps/ProgViewer/OpenMesh_Apps_ProgViewer.vcproj +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.cc b/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.cc index 998bf0b3..7bd4b288 100644 --- a/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.cc +++ b/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.hh b/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.hh index dbb619b1..bc644622 100644 --- a/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.hh +++ b/src/OpenMesh/Apps/ProgViewer/ProgViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_PROGVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/ProgViewer/progviewer.cc b/src/OpenMesh/Apps/ProgViewer/progviewer.cc index fbe31557..558665aa 100644 --- a/src/OpenMesh/Apps/ProgViewer/progviewer.cc +++ b/src/OpenMesh/Apps/ProgViewer/progviewer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifdef _MSC_VER # pragma warning(disable: 4267 4311) diff --git a/src/OpenMesh/Apps/QtViewer/CMakeLists.txt b/src/OpenMesh/Apps/QtViewer/CMakeLists.txt index c3ac4846..0409d308 100644 --- a/src/OpenMesh/Apps/QtViewer/CMakeLists.txt +++ b/src/OpenMesh/Apps/QtViewer/CMakeLists.txt @@ -4,11 +4,8 @@ include_directories ( ../../.. ${CMAKE_CURRENT_SOURCE_DIR} ${GLUT_INCLUDE_DIR} - ${QT_INCLUDE_DIR} ) -set (targetName QtViewer) - # source code directories set (directories . @@ -17,33 +14,20 @@ set (directories # collect all header and source files acg_append_files (headers "*.hh" ${directories}) acg_append_files (sources "*.cc" ${directories}) -acg_append_files (ui "*.ui" ${directories}) # remove template cc files from source file list acg_drop_templates (sources) -# genereate uic and moc targets -if(QT5_FOUND) - acg_qt5_autouic (uic_targets ${ui}) - acg_qt5_automoc (moc_targets ${headers}) -else() - acg_qt4_autouic (uic_targets ${ui}) - acg_qt4_automoc (moc_targets ${headers}) -endif() - - if (WIN32) - acg_add_executable (${targetName} WIN32 ${uic_targets} ${sources} ${headers} ${moc_targets}) - # link to qtmain library to get WinMain function for a non terminal app - target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY}) + acg_add_executable (QtViewer WIN32 ${sources} ${headers}) else () - acg_add_executable (${targetName} ${uic_targets} ${sources} ${headers} ${moc_targets}) + acg_add_executable (QtViewer ${sources} ${headers}) endif () -target_link_libraries (${targetName} +target_link_libraries (QtViewer OpenMeshCore OpenMeshTools - ${QT_LIBRARIES} + Qt5::OpenGL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ) diff --git a/src/OpenMesh/Apps/QtViewer/MeshViewerWidget.cc b/src/OpenMesh/Apps/QtViewer/MeshViewerWidget.cc new file mode 100644 index 00000000..d85b9426 --- /dev/null +++ b/src/OpenMesh/Apps/QtViewer/MeshViewerWidget.cc @@ -0,0 +1,114 @@ +/* ========================================================================= * + * * + * OpenMesh * + * Copyright (c) 2001-2015, RWTH-Aachen University * + * Department of Computer Graphics and Multimedia * + * All rights reserved. * + * www.openmesh.org * + * * + *---------------------------------------------------------------------------* + * This file is part of OpenMesh. * + *---------------------------------------------------------------------------* + * * + * Redistribution and use in source and binary forms, with or without * + * modification, are permitted provided that the following conditions * + * are met: * + * * + * 1. Redistributions of source code must retain the above copyright notice, * + * this list of conditions and the following disclaimer. * + * * + * 2. Redistributions in binary form must reproduce the above copyright * + * notice, this list of conditions and the following disclaimer in the * + * documentation and/or other materials provided with the distribution. * + * * + * 3. Neither the name of the copyright holder nor the names of its * + * contributors may be used to endorse or promote products derived from * + * this software without specific prior written permission. * + * * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER * + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * + * * + * ========================================================================= */ + + + +#define OPENMESHAPPS_MESHVIEWERWIDGET_CC + +//== INCLUDES ================================================================= + +#include + + +//== IMPLEMENTATION ========================================================== + +/// default constructor +MeshViewerWidget::MeshViewerWidget(QWidget* parent) : MeshViewerWidgetT(parent) +{} + + void MeshViewerWidget::open_mesh_gui(QString fname) +{ + OpenMesh::Utils::Timer t; + t.start(); + if ( fname.isEmpty() || !open_mesh(fname.toLocal8Bit(), _options) ) + { + QString msg = "Cannot read mesh from file:\n '"; + msg += fname; + msg += "'"; + QMessageBox::critical( NULL, windowTitle(), msg); + } + t.stop(); + std::cout << "Loaded mesh in ~" << t.as_string() << std::endl; + +} + +void MeshViewerWidget::open_texture_gui(QString fname) +{ + if ( fname.isEmpty() || !open_texture( fname.toLocal8Bit() ) ) + { + QString msg = "Cannot load texture image from file:\n '"; + msg += fname; + msg += "'\n\nPossible reasons:\n"; + msg += "- Mesh file didn't provide texture coordinates\n"; + msg += "- Texture file does not exist\n"; + msg += "- Texture file is not accessible.\n"; + QMessageBox::warning( NULL, windowTitle(), msg ); + } +} + +void MeshViewerWidget::query_open_mesh_file() { + QString fileName = QFileDialog::getOpenFileName(this, + tr("Open mesh file"), + tr(""), + tr("OBJ Files (*.obj);;" + "OFF Files (*.off);;" + "STL Files (*.stl);;" + "All Files (*)")); + if (!fileName.isEmpty()) + open_mesh_gui(fileName); +} + +void MeshViewerWidget::query_open_texture_file() { + QString fileName = QFileDialog::getOpenFileName(this, + tr("Open texture file"), + tr(""), + tr("PNG Files (*.png);;" + "BMP Files (*.bmp);;" + "GIF Files (*.gif);;" + "JPEG Files (*.jpg);;" + "TIFF Files (*.tif);;" + "All Files (*)")); + if (!fileName.isEmpty()) + open_texture_gui(fileName); +} + +//============================================================================= + diff --git a/src/OpenMesh/Apps/QtViewer/MeshViewerWidget.hh b/src/OpenMesh/Apps/QtViewer/MeshViewerWidget.hh index 7c8c1cd4..bace4cce 100644 --- a/src/OpenMesh/Apps/QtViewer/MeshViewerWidget.hh +++ b/src/OpenMesh/Apps/QtViewer/MeshViewerWidget.hh @@ -39,15 +39,9 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ -#ifndef OPENMESHAPPS_VIEWERWIDGET_HH -#define OPENMESHAPPS_VIEWERWIDGET_HH + +#pragma once //== INCLUDES ================================================================= @@ -55,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -80,70 +75,24 @@ typedef OpenMesh::TriMesh_ArrayKernelT MyMesh; class MeshViewerWidget : public MeshViewerWidgetT { Q_OBJECT + public: /// default constructor - explicit MeshViewerWidget(QWidget* parent=0) : MeshViewerWidgetT(parent) - {} + explicit MeshViewerWidget(QWidget* parent=0); + OpenMesh::IO::Options& options() { return _options; } const OpenMesh::IO::Options& options() const { return _options; } void setOptions(const OpenMesh::IO::Options& opts) { _options = opts; } - void open_mesh_gui(QString fname) - { - OpenMesh::Utils::Timer t; - t.start(); - if ( fname.isEmpty() || !open_mesh(fname.toLocal8Bit(), _options) ) - { - QString msg = "Cannot read mesh from file:\n '"; - msg += fname; - msg += "'"; - QMessageBox::critical( NULL, windowTitle(), msg); - } - t.stop(); - std::cout << "Loaded mesh in ~" << t.as_string() << std::endl; - } - void open_texture_gui(QString fname) - { - if ( fname.isEmpty() || !open_texture( fname.toLocal8Bit() ) ) - { - QString msg = "Cannot load texture image from file:\n '"; - msg += fname; - msg += "'\n\nPossible reasons:\n"; - msg += "- Mesh file didn't provide texture coordinates\n"; - msg += "- Texture file does not exist\n"; - msg += "- Texture file is not accessible.\n"; - QMessageBox::warning( NULL, windowTitle(), msg ); - } - } + void open_mesh_gui(QString fname); + + void open_texture_gui(QString fname); public slots: - void query_open_mesh_file() { - QString fileName = QFileDialog::getOpenFileName(this, - tr("Open mesh file"), - tr(""), - tr("OBJ Files (*.obj);;" - "OFF Files (*.off);;" - "STL Files (*.stl);;" - "All Files (*)")); - if (!fileName.isEmpty()) - open_mesh_gui(fileName); - } - void query_open_texture_file() { - QString fileName = QFileDialog::getOpenFileName(this, - tr("Open texture file"), - tr(""), - tr("PNG Files (*.png);;" - "BMP Files (*.bmp);;" - "GIF Files (*.gif);;" - "JPEG Files (*.jpg);;" - "TIFF Files (*.tif);;" - "All Files (*)")); - if (!fileName.isEmpty()) - open_texture_gui(fileName); - } + void query_open_mesh_file(); + + void query_open_texture_file(); private: OpenMesh::IO::Options _options; }; - -#endif diff --git a/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc b/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc index bd814226..dc10a9a7 100644 --- a/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc +++ b/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #define OPENMESHAPPS_MESHVIEWERWIDGET_CC diff --git a/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.hh b/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.hh index ce076d62..22cd4e3d 100644 --- a/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.hh +++ b/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.hh @@ -39,16 +39,10 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ -#ifndef OPENMESHAPPS_MESHVIEWERWIDGETT_HH -#define OPENMESHAPPS_MESHVIEWERWIDGETT_HH + +#pragma once //== INCLUDES ================================================================= @@ -75,6 +69,7 @@ class QImage; template class MeshViewerWidgetT : public QGLViewerWidget { + public: typedef M Mesh; @@ -200,6 +195,4 @@ protected: # include "MeshViewerWidgetT.cc" #endif //============================================================================= -#endif // OPENMESHAPPS_MESHVIEWERWIDGETT_HH defined -//============================================================================= diff --git a/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.cc b/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.cc index 5a589852..4e9c65e7 100644 --- a/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.cc +++ b/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh b/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh index 0f9b06e6..cd4cf8eb 100644 --- a/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh +++ b/src/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_QGLVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/QtViewer/meshviewer.cc b/src/OpenMesh/Apps/QtViewer/meshviewer.cc index a16d2a03..691f87bc 100644 --- a/src/OpenMesh/Apps/QtViewer/meshviewer.cc +++ b/src/OpenMesh/Apps/QtViewer/meshviewer.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - #ifdef _MSC_VER # pragma warning(disable: 4267 4311) #endif @@ -95,6 +88,7 @@ int main(int argc, char **argv) case 'b': opt += OpenMesh::IO::Options::Binary; break; case 'h': usage_and_exit(0); + break; case 's': opt += OpenMesh::IO::Options::Swap; break; default: usage_and_exit(1); diff --git a/src/OpenMesh/Apps/Smoothing/CMakeLists.txt b/src/OpenMesh/Apps/Smoothing/CMakeLists.txt index 82eac480..e330787f 100644 --- a/src/OpenMesh/Apps/Smoothing/CMakeLists.txt +++ b/src/OpenMesh/Apps/Smoothing/CMakeLists.txt @@ -5,15 +5,13 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName Smoothing) - # collect all header and source files acg_append_files (headers "*.hh" .) acg_append_files (sources "*.cc" .) -acg_add_executable (${targetName} ${headers} ${sources}) +acg_add_executable (Smoothing ${headers} ${sources}) -target_link_libraries (${targetName} +target_link_libraries (Smoothing OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/Smoothing/smooth.cc b/src/OpenMesh/Apps/Smoothing/smooth.cc index 24c5ef54..76a0e273 100644 --- a/src/OpenMesh/Apps/Smoothing/smooth.cc +++ b/src/OpenMesh/Apps/Smoothing/smooth.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include @@ -136,7 +131,7 @@ int main(int argc, char **argv) : SmootherT::Normal; break; - case 'h': usage_and_exit(0); + case 'h': usage_and_exit(0); break; case '?': default: usage_and_exit(1); } diff --git a/src/OpenMesh/Apps/Subdivider/MeshViewerWidget.hh b/src/OpenMesh/Apps/Subdivider/MeshViewerWidget.hh index e6a48062..073a08f9 100644 --- a/src/OpenMesh/Apps/Subdivider/MeshViewerWidget.hh +++ b/src/OpenMesh/Apps/Subdivider/MeshViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_MESHVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/Subdivider/SubdivideWidget.cc b/src/OpenMesh/Apps/Subdivider/SubdivideWidget.cc index 59d25a12..40220942 100644 --- a/src/OpenMesh/Apps/Subdivider/SubdivideWidget.cc +++ b/src/OpenMesh/Apps/Subdivider/SubdivideWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Apps/Subdivider/SubdivideWidget.hh b/src/OpenMesh/Apps/Subdivider/SubdivideWidget.hh index 76d6f5fb..c87b2210 100644 --- a/src/OpenMesh/Apps/Subdivider/SubdivideWidget.hh +++ b/src/OpenMesh/Apps/Subdivider/SubdivideWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt index abc8f9f1..62d61541 100644 --- a/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt @@ -4,11 +4,8 @@ include_directories ( ../../../.. ${CMAKE_CURRENT_SOURCE_DIR} ${GLUT_INCLUDE_DIR} - ${QT_INCLUDE_DIR} ) -set (targetName SubdividerGui) - # source code directories set (directories ../../QtViewer @@ -28,25 +25,16 @@ set (sources # remove template cc files from source file list acg_drop_templates (sources) -# genereate uic and moc targets -if(QT5_FOUND) - acg_qt5_automoc (moc_targets ${headers}) -else() - acg_qt4_automoc (moc_targets ${headers}) -endif() - if (WIN32) - acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets}) - # link to qtmain library to get WinMain function for a non terminal app - target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY}) + acg_add_executable (SubdividerGui WIN32 ${sources} ${headers}) else () - acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets}) + acg_add_executable (SubdividerGui ${sources} ${headers}) endif () -target_link_libraries (${targetName} +target_link_libraries (SubdividerGui OpenMeshCore OpenMeshTools - ${QT_LIBRARIES} + Qt5::OpenGL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ) diff --git a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc index dd155af1..809d5dac 100644 --- a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc +++ b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // -------------------------------------------------------------- includes ---- @@ -170,7 +165,7 @@ int main(int argc, char **argv) case 'm': { std::stringstream s; s << optarg; s >> max_nv; } break; case 'r': rule_sequence = optarg; break; case 'U': uniform = true; break; - case 'h': usage_and_exit(argv[0],0); + case 'h': usage_and_exit(argv[0],0); break; case '?': default: usage_and_exit(argv[0],1); } diff --git a/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt index 0cd93599..35800704 100644 --- a/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt @@ -5,16 +5,14 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName commandlineAdaptiveSubdivider) - # collect all header and source files set (sources ../adaptive_subdivider.cc ) -acg_add_executable (${targetName} ${sources}) +acg_add_executable (commandlineAdaptiveSubdivider ${sources}) -target_link_libraries (${targetName} +target_link_libraries (commandlineAdaptiveSubdivider OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt index bcc48469..0ef2b3bb 100644 --- a/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt @@ -5,16 +5,14 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName commandlineSubdivider) - # collect all header and source files set (sources ../subdivider.cc ) -acg_add_executable (${targetName} ${sources}) +acg_add_executable (commandlineSubdivider ${sources}) -target_link_libraries (${targetName} +target_link_libraries (commandlineSubdivider OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc b/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc index 85f2a726..f34cf407 100644 --- a/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc +++ b/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifdef _MSC_VER # pragma warning(disable: 4267 4311) diff --git a/src/OpenMesh/Apps/Subdivider/subdivider.cc b/src/OpenMesh/Apps/Subdivider/subdivider.cc index d2b7752e..a4016427 100644 --- a/src/OpenMesh/Apps/Subdivider/subdivider.cc +++ b/src/OpenMesh/Apps/Subdivider/subdivider.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include @@ -234,7 +229,7 @@ int main(int argc, char **argv) } break; } - case 'h': usage_and_exit(0); + case 'h': usage_and_exit(0); break; case '?': default: usage_and_exit(1); } diff --git a/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.cc b/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.cc index 348a4f82..e92097ad 100644 --- a/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.cc +++ b/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.hh b/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.hh index 0a88e561..46e533bb 100644 --- a/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.hh +++ b/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshNodeT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshSupport.hh b/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshSupport.hh index 30b7669a..c323e0af 100644 --- a/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshSupport.hh +++ b/src/OpenMesh/Apps/Unsupported/IvViewer/SoOpenMeshSupport.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef SOOPENMESHSUPPORT_H #define SOOPENMESHSUPPORT_H diff --git a/src/OpenMesh/Apps/Unsupported/IvViewer/ivviewer.cc b/src/OpenMesh/Apps/Unsupported/IvViewer/ivviewer.cc index d5d80306..74607894 100644 --- a/src/OpenMesh/Apps/Unsupported/IvViewer/ivviewer.cc +++ b/src/OpenMesh/Apps/Unsupported/IvViewer/ivviewer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #if !defined(USE_SOQT) diff --git a/src/OpenMesh/Apps/Unsupported/OsgViewer/meshviewer.cc b/src/OpenMesh/Apps/Unsupported/OsgViewer/meshviewer.cc index 54aa8b79..c35867b9 100644 --- a/src/OpenMesh/Apps/Unsupported/OsgViewer/meshviewer.cc +++ b/src/OpenMesh/Apps/Unsupported/OsgViewer/meshviewer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifdef _MSC_VER # pragma warning(disable: 4267 4311) diff --git a/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc b/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc index 1d12bb9c..e7520abb 100644 --- a/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc +++ b/src/OpenMesh/Apps/Unsupported/OsgViewer/osgviewer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // -------------------- STL #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.cc index f5cf867f..625def94 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #define OPENMESHAPPS_MESHVIEWERWIDGET_CC diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.hh index 8d1cb246..56c16ac6 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MeshViewerWidgetT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_MESHVIEWERWIDGETT_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MyMesh.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MyMesh.hh index 24f5c1df..51cce17d 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MyMesh.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/MyMesh.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APPS_VDPMSTREAMING_CLIENT_MYMESH_HH #define OPENMESH_APPS_VDPMSTREAMING_CLIENT_MYMESH_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.cc index ed2e9644..fe4fe2f4 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.hh index f802c27f..1eb3d753 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/QGLViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_QGLVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.cc index c328a872..a712f95d 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.hh index 2d6ace46..b309110f 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMClientViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APPS_VDPMSTREAMING_CLIENT_VDPMCLIENTVIEWERWIDGET_HH #define OPENMESH_APPS_VDPMSTREAMING_CLIENT_VDPMCLIENTVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMStreamingClient.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMStreamingClient.cc index 9e1a6760..77d8c318 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMStreamingClient.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Client/VDPMStreamingClient.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // #ifdef _MSC_VER // # pragma warning(disable: 4267 4311) diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.cc index ef7b19b6..17c4c14c 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.hh index 68804485..a55025be 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/ServerSideVDPM.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_SERVERSIDEVDPM_HH #define OPENMESH_APP_SERVERSIDEVDPM_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.cc index bc093040..e4af2fdc 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.hh index b5f95906..bdf6fb51 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSESSION_HH #define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSESSION_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSocket.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSocket.hh index 66ea9495..27f1b4b6 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSocket.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSocket.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSOCKET_HH #define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSOCKET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.cc index c48a1702..cad28022 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.hh index 05db2243..25fe6ebe 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSTREAMINGSERVERWIDGET_HH #define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSTREAMINGSERVERWIDGET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.cc b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.cc index 70fc51cc..4d245487 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.hh b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.hh index dd673509..49e7b4a8 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMStreamingServer.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMINGSERVER_HH #define OPENMESH_APP_VDPMSTREAMINGSERVER_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.cc index 6a49cecd..e9aca7d9 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #define OPENMESHAPPS_MESHVIEWERWIDGET_CC diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.hh index 8d1cb246..56c16ac6 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/MeshViewerWidgetT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_MESHVIEWERWIDGETT_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/MyMesh.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Client/MyMesh.hh index 24f5c1df..51cce17d 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/MyMesh.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/MyMesh.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APPS_VDPMSTREAMING_CLIENT_MYMESH_HH #define OPENMESH_APPS_VDPMSTREAMING_CLIENT_MYMESH_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.cc index e1f4cc1a..5f06d982 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.hh index d0e95150..ecfd95ea 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/QGLViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESHAPPS_QGLVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.cc index 0503f456..0a4c4fec 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.hh index a2b3a193..128e634b 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMClientViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APPS_VDPMSTREAMING_CLIENT_VDPMCLIENTVIEWERWIDGET_HH #define OPENMESH_APPS_VDPMSTREAMING_CLIENT_VDPMCLIENTVIEWERWIDGET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMStreamingClient.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMStreamingClient.cc index 1165dc77..5227a1a8 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMStreamingClient.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Client/VDPMStreamingClient.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // #ifdef _MSC_VER // # pragma warning(disable: 4267 4311) diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.cc index ef7b19b6..17c4c14c 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.hh index f20bda74..1d44aed2 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/ServerSideVDPM.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_SERVERSIDEVDPM_HH #define OPENMESH_APP_SERVERSIDEVDPM_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.cc index 4160d8ef..fa47a34a 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.hh index a29d98a4..43c7b57a 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSESSION_HH #define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSESSION_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSocket.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSocket.hh index 85267a1f..07643389 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSocket.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSocket.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSOCKET_HH #define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSOCKET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.cc index c07ac30b..84eb92eb 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.hh index 0a7b47c1..3fc4c165 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSTREAMINGSERVERWIDGET_HH #define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSTREAMINGSERVERWIDGET_HH diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.cc b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.cc index 06180f0a..3b99b228 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.cc +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include diff --git a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.hh b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.hh index dd673509..49e7b4a8 100644 --- a/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.hh +++ b/src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMStreamingServer.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_APP_VDPMSTREAMINGSERVER_HH #define OPENMESH_APP_VDPMSTREAMINGSERVER_HH diff --git a/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt index 16c92eb6..f1e00640 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt @@ -5,16 +5,14 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName Analyzer) - # collect all header and source files set (sources ./vdpmanalyzer.cc ) -acg_add_executable (${targetName} ${sources}) +acg_add_executable (Analyzer ${sources}) -target_link_libraries (${targetName} +target_link_libraries (Analyzer OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc b/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc index de55f84d..835cdddb 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc +++ b/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // -------------------------------------------------------------- includes ---- @@ -276,7 +271,7 @@ int main(int argc, char **argv) { case 'v': verbose = true; break; case 'o': ofname = optarg; break; - case 'h': usage_and_exit(0); + case 'h': usage_and_exit(0); break; default: usage_and_exit(1); } } diff --git a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt index ac1216ed..22b1ceec 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt @@ -4,11 +4,8 @@ include_directories ( ../../../.. ${CMAKE_CURRENT_SOURCE_DIR} ${GLUT_INCLUDE_DIR} - ${QT_INCLUDE_DIR} ) -set (targetName Synthesizer) - # collect all header and source files acg_append_files (headers "*.hh" .) acg_append_files (sources "*.cc" .) @@ -22,25 +19,16 @@ list (APPEND headers "../../QtViewer/MeshViewerWidgetT.hh") # remove template cc files from source file list acg_drop_templates (sources) -# genereate uic and moc targets -if(QT5_FOUND) - acg_qt5_automoc (moc_targets ${headers}) -else() - acg_qt4_automoc (moc_targets ${headers}) -endif() - if (WIN32) - acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets}) - # link to qtmain library to get WinMain function for a non terminal app - target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY}) + acg_add_executable (Synthesizer WIN32 ${sources} ${headers}) else () - acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets}) + acg_add_executable (Synthesizer ${sources} ${headers}) endif () -target_link_libraries (${targetName} +target_link_libraries (Synthesizer OpenMeshCore OpenMeshTools - ${QT_LIBRARIES} + Qt5::OpenGL ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ) diff --git a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.cc b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.cc index 0bc7ead6..55f3b256 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.cc +++ b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.hh b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.hh index dee20a84..3b465e1c 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.hh +++ b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/VDPMSynthesizerViewerWidget.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc index 84c8f965..3e077eac 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc +++ b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifdef _MSC_VER # pragma warning(disable: 4267 4311) diff --git a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt index c0e311e4..f4662079 100644 --- a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt @@ -5,16 +5,14 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName mkbalancedpm) - # collect all header and source files set (sources ./mkbalancedpm.cc ) -acg_add_executable (${targetName} ${sources}) +acg_add_executable (mkbalancedpm ${sources}) -target_link_libraries (${targetName} +target_link_libraries (mkbalancedpm OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/mkbalancedpm.cc b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/mkbalancedpm.cc index a73a672b..699da8a3 100644 --- a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/mkbalancedpm.cc +++ b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/mkbalancedpm.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // -------------------- STL #include @@ -259,6 +254,7 @@ int main(int argc, char **argv) case 'I': enable_modIS = true; break; case 'h': usage_and_exit(0); + break; default: usage_and_exit(1); } diff --git a/src/OpenMesh/Apps/mconvert/CMakeLists.txt b/src/OpenMesh/Apps/mconvert/CMakeLists.txt index dc76a122..b4c29800 100644 --- a/src/OpenMesh/Apps/mconvert/CMakeLists.txt +++ b/src/OpenMesh/Apps/mconvert/CMakeLists.txt @@ -5,15 +5,13 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ) -set (targetName mconvert) - # collect all header and source files acg_append_files (headers "*.hh" .) acg_append_files (sources "*.cc" .) -acg_add_executable (${targetName} ${headers} ${sources}) +acg_add_executable (mconvert ${headers} ${sources}) -target_link_libraries (${targetName} +target_link_libraries (mconvert OpenMeshCore OpenMeshTools ) diff --git a/src/OpenMesh/Apps/mconvert/VS2008mconvert.vcproj b/src/OpenMesh/Apps/mconvert/VS2008mconvert.vcproj deleted file mode 100644 index 6e1cc762..00000000 --- a/src/OpenMesh/Apps/mconvert/VS2008mconvert.vcproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/OpenMesh/Apps/mconvert/mconvert.cc b/src/OpenMesh/Apps/mconvert/mconvert.cc index 953e70b1..5cedd6ce 100644 --- a/src/OpenMesh/Apps/mconvert/mconvert.cc +++ b/src/OpenMesh/Apps/mconvert/mconvert.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include @@ -183,6 +178,7 @@ int main(int argc, char *argv[] ) case 'o': ofname = optarg; break; case 'h': usage_and_exit(0); + break; case '?': default: usage_and_exit(1); diff --git a/src/OpenMesh/Core/Geometry/Config.hh b/src/OpenMesh/Core/Geometry/Config.hh index b1f1b082..334bd406 100644 --- a/src/OpenMesh/Core/Geometry/Config.hh +++ b/src/OpenMesh/Core/Geometry/Config.hh @@ -40,12 +40,7 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Geometry/LoopSchemeMaskT.hh b/src/OpenMesh/Core/Geometry/LoopSchemeMaskT.hh index feca7711..adf5c5f5 100644 --- a/src/OpenMesh/Core/Geometry/LoopSchemeMaskT.hh +++ b/src/OpenMesh/Core/Geometry/LoopSchemeMaskT.hh @@ -40,12 +40,7 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef LOOPSCHEMEMASKT_HH #define LOOPSCHEMEMASKT_HH diff --git a/src/OpenMesh/Core/Geometry/MathDefs.hh b/src/OpenMesh/Core/Geometry/MathDefs.hh index c61bb7d4..82c16eb4 100644 --- a/src/OpenMesh/Core/Geometry/MathDefs.hh +++ b/src/OpenMesh/Core/Geometry/MathDefs.hh @@ -40,12 +40,7 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef MATHDEFS_HH #define MATHDEFS_HH diff --git a/src/OpenMesh/Core/Geometry/NormalConeT.cc b/src/OpenMesh/Core/Geometry/NormalConeT.cc index d5281bf1..487e2490 100644 --- a/src/OpenMesh/Core/Geometry/NormalConeT.cc +++ b/src/OpenMesh/Core/Geometry/NormalConeT.cc @@ -40,16 +40,6 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - - - - //============================================================================= // // CLASS NormalConeT - IMPLEMENTATION diff --git a/src/OpenMesh/Core/Geometry/NormalConeT.hh b/src/OpenMesh/Core/Geometry/NormalConeT.hh index 796bbdd8..a8e426ce 100644 --- a/src/OpenMesh/Core/Geometry/NormalConeT.hh +++ b/src/OpenMesh/Core/Geometry/NormalConeT.hh @@ -40,12 +40,7 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + diff --git a/src/OpenMesh/Core/Geometry/Plane3d.hh b/src/OpenMesh/Core/Geometry/Plane3d.hh index 50e9ced5..32e68d00 100644 --- a/src/OpenMesh/Core/Geometry/Plane3d.hh +++ b/src/OpenMesh/Core/Geometry/Plane3d.hh @@ -41,12 +41,7 @@ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/Geometry/QuadricT.hh b/src/OpenMesh/Core/Geometry/QuadricT.hh index 8d2943ae..3376f32f 100644 --- a/src/OpenMesh/Core/Geometry/QuadricT.hh +++ b/src/OpenMesh/Core/Geometry/QuadricT.hh @@ -41,12 +41,7 @@ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Core/Geometry/QuadricT.hh diff --git a/src/OpenMesh/Core/Geometry/VectorT.hh b/src/OpenMesh/Core/Geometry/VectorT.hh index 3384332a..ef407a2a 100644 --- a/src/OpenMesh/Core/Geometry/VectorT.hh +++ b/src/OpenMesh/Core/Geometry/VectorT.hh @@ -40,12 +40,7 @@ * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Geometry/VectorT_inc.hh b/src/OpenMesh/Core/Geometry/VectorT_inc.hh index 96b6c100..8f5f30ff 100644 --- a/src/OpenMesh/Core/Geometry/VectorT_inc.hh +++ b/src/OpenMesh/Core/Geometry/VectorT_inc.hh @@ -41,12 +41,7 @@ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // Set template keywords and class names properly when // parsing with doxygen. This only seems to work this way since diff --git a/src/OpenMesh/Core/IO/BinaryHelper.cc b/src/OpenMesh/Core/IO/BinaryHelper.cc index d349e7f5..9bd30939 100644 --- a/src/OpenMesh/Core/IO/BinaryHelper.cc +++ b/src/OpenMesh/Core/IO/BinaryHelper.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/BinaryHelper.hh b/src/OpenMesh/Core/IO/BinaryHelper.hh index 3e36e952..da3bb881 100644 --- a/src/OpenMesh/Core/IO/BinaryHelper.hh +++ b/src/OpenMesh/Core/IO/BinaryHelper.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/IOInstances.hh b/src/OpenMesh/Core/IO/IOInstances.hh index 96793a67..c40de6d4 100644 --- a/src/OpenMesh/Core/IO/IOInstances.hh +++ b/src/OpenMesh/Core/IO/IOInstances.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/IOManager.cc b/src/OpenMesh/Core/IO/IOManager.cc index 40f6ec69..454edb2a 100644 --- a/src/OpenMesh/Core/IO/IOManager.cc +++ b/src/OpenMesh/Core/IO/IOManager.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/IOManager.hh b/src/OpenMesh/Core/IO/IOManager.hh index 58c157f4..fea9e46e 100644 --- a/src/OpenMesh/Core/IO/IOManager.hh +++ b/src/OpenMesh/Core/IO/IOManager.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/IO/MeshIO.hh b/src/OpenMesh/Core/IO/MeshIO.hh index 49b6f640..0ffd9567 100644 --- a/src/OpenMesh/Core/IO/MeshIO.hh +++ b/src/OpenMesh/Core/IO/MeshIO.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OM_MESHIO_HH diff --git a/src/OpenMesh/Core/IO/OFFFormat.hh b/src/OpenMesh/Core/IO/OFFFormat.hh index bd87f56b..31f4388c 100644 --- a/src/OpenMesh/Core/IO/OFFFormat.hh +++ b/src/OpenMesh/Core/IO/OFFFormat.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_IO_OFFFORMAT_HH diff --git a/src/OpenMesh/Core/IO/OMFormat.cc b/src/OpenMesh/Core/IO/OMFormat.cc index 231dfacd..6511e3e2 100644 --- a/src/OpenMesh/Core/IO/OMFormat.cc +++ b/src/OpenMesh/Core/IO/OMFormat.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= @@ -113,6 +108,19 @@ namespace OMFormat { return hdr; } +//----------------------------------------------------------------------------- + + + std::string as_string(uint8 version) + { + std::stringstream ss; + ss << major_version(version); + ss << "."; + ss << minor_version(version); + return ss.str(); + } + + //----------------------------------------------------------------------------- const char *as_string(Chunk::Entity e) diff --git a/src/OpenMesh/Core/IO/OMFormat.hh b/src/OpenMesh/Core/IO/OMFormat.hh index 9bbcd860..207c1645 100644 --- a/src/OpenMesh/Core/IO/OMFormat.hh +++ b/src/OpenMesh/Core/IO/OMFormat.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_IO_OMFORMAT_HH @@ -469,6 +464,8 @@ namespace OMFormat { // ---------------------------------------- convenience functions + std::string as_string(uint8 version); + const char *as_string(Chunk::Type t); const char *as_string(Chunk::Entity e); const char *as_string(Chunk::Dim d); diff --git a/src/OpenMesh/Core/IO/OMFormatT.cc b/src/OpenMesh/Core/IO/OMFormatT.cc index fa332b12..b79333bf 100644 --- a/src/OpenMesh/Core/IO/OMFormatT.cc +++ b/src/OpenMesh/Core/IO/OMFormatT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/Options.hh b/src/OpenMesh/Core/IO/Options.hh index f2667258..2e642180 100644 --- a/src/OpenMesh/Core/IO/Options.hh +++ b/src/OpenMesh/Core/IO/Options.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_IO_OPTIONS_HH @@ -115,7 +110,8 @@ public: FaceTexCoord = 0x0400, ///< Has (r) / store (w) face texture coordinates ColorAlpha = 0x0800, ///< Has (r) / store (w) alpha values for colors ColorFloat = 0x1000, ///< Has (r) / store (w) float values for colors (currently only implemented for PLY and OFF files) - Custom = 0x2000 ///< Has (r) custom properties (currently only implemented in PLY Reader ASCII version) + Custom = 0x2000, ///< Has (r) custom properties (currently only implemented in PLY Reader ASCII version) + Status = 0x4000 ///< Has (r) / store (w) status properties }; public: @@ -206,10 +202,14 @@ public: bool vertex_has_normal() const { return check(VertexNormal); } bool vertex_has_color() const { return check(VertexColor); } bool vertex_has_texcoord() const { return check(VertexTexCoord); } + bool vertex_has_status() const { return check(Status); } bool edge_has_color() const { return check(EdgeColor); } + bool edge_has_status() const { return check(Status); } + bool halfedge_has_status() const { return check(Status); } bool face_has_normal() const { return check(FaceNormal); } bool face_has_color() const { return check(FaceColor); } bool face_has_texcoord() const { return check(FaceTexCoord); } + bool face_has_status() const { return check(Status); } bool color_has_alpha() const { return check(ColorAlpha); } bool color_is_float() const { return check(ColorFloat); } diff --git a/src/OpenMesh/Core/IO/SR_binary.hh b/src/OpenMesh/Core/IO/SR_binary.hh index 05c9de8f..dd4f4218 100644 --- a/src/OpenMesh/Core/IO/SR_binary.hh +++ b/src/OpenMesh/Core/IO/SR_binary.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/SR_binary_spec.hh b/src/OpenMesh/Core/IO/SR_binary_spec.hh index 956b6e8f..c9f37b72 100644 --- a/src/OpenMesh/Core/IO/SR_binary_spec.hh +++ b/src/OpenMesh/Core/IO/SR_binary_spec.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/SR_rbo.hh b/src/OpenMesh/Core/IO/SR_rbo.hh index 64275c46..876307ed 100644 --- a/src/OpenMesh/Core/IO/SR_rbo.hh +++ b/src/OpenMesh/Core/IO/SR_rbo.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/SR_store.hh b/src/OpenMesh/Core/IO/SR_store.hh index e1b99a06..07df4782 100644 --- a/src/OpenMesh/Core/IO/SR_store.hh +++ b/src/OpenMesh/Core/IO/SR_store.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/SR_types.hh b/src/OpenMesh/Core/IO/SR_types.hh index 9628f59e..65107674 100644 --- a/src/OpenMesh/Core/IO/SR_types.hh +++ b/src/OpenMesh/Core/IO/SR_types.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/StoreRestore.hh b/src/OpenMesh/Core/IO/StoreRestore.hh index fff6708f..e3966c88 100644 --- a/src/OpenMesh/Core/IO/StoreRestore.hh +++ b/src/OpenMesh/Core/IO/StoreRestore.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/exporter/BaseExporter.hh b/src/OpenMesh/Core/IO/exporter/BaseExporter.hh index 477d95a1..9903a851 100644 --- a/src/OpenMesh/Core/IO/exporter/BaseExporter.hh +++ b/src/OpenMesh/Core/IO/exporter/BaseExporter.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= @@ -104,12 +99,14 @@ public: virtual Vec4f colorAf(VertexHandle _vh) const = 0; virtual Vec2f texcoord(VertexHandle _vh) const = 0; virtual Vec2f texcoord(HalfedgeHandle _heh) const = 0; + virtual OpenMesh::Attributes::StatusInfo status(VertexHandle _vh) const = 0; // get face data virtual unsigned int get_vhandles(FaceHandle _fh, std::vector& _vhandles) const=0; + /// /// \brief getHeh returns the HalfEdgeHandle that belongs to the face /// specified by _fh and has a toVertexHandle that corresponds to _vh. @@ -127,6 +124,7 @@ public: virtual Vec4ui colorAi(FaceHandle _fh) const = 0; virtual Vec3f colorf(FaceHandle _fh) const = 0; virtual Vec4f colorAf(FaceHandle _fh) const = 0; + virtual OpenMesh::Attributes::StatusInfo status(FaceHandle _fh) const = 0; // get edge data virtual Vec3uc color(EdgeHandle _eh) const = 0; @@ -135,6 +133,15 @@ public: virtual Vec4ui colorAi(EdgeHandle _eh) const = 0; virtual Vec3f colorf(EdgeHandle _eh) const = 0; virtual Vec4f colorAf(EdgeHandle _eh) const = 0; + virtual OpenMesh::Attributes::StatusInfo status(EdgeHandle _eh) const = 0; + + // get halfedge data + virtual int get_halfedge_id(VertexHandle _vh) = 0; + virtual int get_halfedge_id(FaceHandle _vh) = 0; + virtual int get_next_halfedge_id(HalfedgeHandle _heh) = 0; + virtual int get_to_vertex_id(HalfedgeHandle _heh) = 0; + virtual int get_face_id(HalfedgeHandle _heh) = 0; + virtual OpenMesh::Attributes::StatusInfo status(HalfedgeHandle _heh) const = 0; // get reference to base kernel virtual const BaseKernel* kernel() { return 0; } @@ -150,10 +157,14 @@ public: virtual bool is_triangle_mesh() const { return false; } virtual bool has_vertex_normals() const { return false; } virtual bool has_vertex_colors() const { return false; } + virtual bool has_vertex_status() const { return false; } virtual bool has_vertex_texcoords() const { return false; } virtual bool has_edge_colors() const { return false; } + virtual bool has_edge_status() const { return false; } + virtual bool has_halfedge_status() const { return false; } virtual bool has_face_normals() const { return false; } virtual bool has_face_colors() const { return false; } + virtual bool has_face_status() const { return false; } }; diff --git a/src/OpenMesh/Core/IO/exporter/ExporterT.hh b/src/OpenMesh/Core/IO/exporter/ExporterT.hh index 9a9d9b3f..cffe07e2 100644 --- a/src/OpenMesh/Core/IO/exporter/ExporterT.hh +++ b/src/OpenMesh/Core/IO/exporter/ExporterT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= @@ -94,61 +89,61 @@ public: // get vertex data - Vec3f point(VertexHandle _vh) const + Vec3f point(VertexHandle _vh) const override { return vector_cast(mesh_.point(_vh)); } - Vec3f normal(VertexHandle _vh) const + Vec3f normal(VertexHandle _vh) const override { return (mesh_.has_vertex_normals() ? vector_cast(mesh_.normal(_vh)) : Vec3f(0.0f, 0.0f, 0.0f)); } - Vec3uc color(VertexHandle _vh) const + Vec3uc color(VertexHandle _vh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_vh)) : Vec3uc(0, 0, 0)); } - Vec4uc colorA(VertexHandle _vh) const + Vec4uc colorA(VertexHandle _vh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_vh)) : Vec4uc(0, 0, 0, 0)); } - Vec3ui colori(VertexHandle _vh) const + Vec3ui colori(VertexHandle _vh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_vh)) : Vec3ui(0, 0, 0)); } - Vec4ui colorAi(VertexHandle _vh) const + Vec4ui colorAi(VertexHandle _vh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_vh)) : Vec4ui(0, 0, 0, 0)); } - Vec3f colorf(VertexHandle _vh) const + Vec3f colorf(VertexHandle _vh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_vh)) : Vec3f(0, 0, 0)); } - Vec4f colorAf(VertexHandle _vh) const + Vec4f colorAf(VertexHandle _vh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_vh)) : Vec4f(0, 0, 0, 0)); } - Vec2f texcoord(VertexHandle _vh) const + Vec2f texcoord(VertexHandle _vh) const override { #if defined(OM_CC_GCC) && (OM_CC_VERSION<30000) // Workaround! @@ -164,61 +159,109 @@ public: #endif } - Vec2f texcoord(HalfedgeHandle _heh) const + Vec2f texcoord(HalfedgeHandle _heh) const override { return (mesh_.has_halfedge_texcoords2D() ? vector_cast(mesh_.texcoord2D(_heh)) : Vec2f(0.0f, 0.0f)); } + OpenMesh::Attributes::StatusInfo status(VertexHandle _vh) const override + { + if (mesh_.has_vertex_status()) + return mesh_.status(_vh); + return OpenMesh::Attributes::StatusInfo(); + } + // get edge data - Vec3uc color(EdgeHandle _eh) const + Vec3uc color(EdgeHandle _eh) const override { return (mesh_.has_edge_colors() ? color_cast(mesh_.color(_eh)) : Vec3uc(0, 0, 0)); } - Vec4uc colorA(EdgeHandle _eh) const + Vec4uc colorA(EdgeHandle _eh) const override { return (mesh_.has_edge_colors() ? color_cast(mesh_.color(_eh)) : Vec4uc(0, 0, 0, 0)); } - Vec3ui colori(EdgeHandle _eh) const + Vec3ui colori(EdgeHandle _eh) const override { return (mesh_.has_edge_colors() ? color_cast(mesh_.color(_eh)) : Vec3ui(0, 0, 0)); } - Vec4ui colorAi(EdgeHandle _eh) const + Vec4ui colorAi(EdgeHandle _eh) const override { return (mesh_.has_edge_colors() ? color_cast(mesh_.color(_eh)) : Vec4ui(0, 0, 0, 0)); } - Vec3f colorf(EdgeHandle _eh) const + Vec3f colorf(EdgeHandle _eh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_eh)) : Vec3f(0, 0, 0)); } - Vec4f colorAf(EdgeHandle _eh) const + Vec4f colorAf(EdgeHandle _eh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_eh)) : Vec4f(0, 0, 0, 0)); } + OpenMesh::Attributes::StatusInfo status(EdgeHandle _eh) const override + { + if (mesh_.has_edge_status()) + return mesh_.status(_eh); + return OpenMesh::Attributes::StatusInfo(); + } + + // get halfedge data + + int get_halfedge_id(VertexHandle _vh) override + { + return mesh_.halfedge_handle(_vh).idx(); + } + + int get_halfedge_id(FaceHandle _fh) override + { + return mesh_.halfedge_handle(_fh).idx(); + } + + int get_next_halfedge_id(HalfedgeHandle _heh) override + { + return mesh_.next_halfedge_handle(_heh).idx(); + } + + int get_to_vertex_id(HalfedgeHandle _heh) override + { + return mesh_.to_vertex_handle(_heh).idx(); + } + + int get_face_id(HalfedgeHandle _heh) override + { + return mesh_.face_handle(_heh).idx(); + } + + OpenMesh::Attributes::StatusInfo status(HalfedgeHandle _heh) const override + { + if (mesh_.has_halfedge_status()) + return mesh_.status(_heh); + return OpenMesh::Attributes::StatusInfo(); + } + // get face data unsigned int get_vhandles(FaceHandle _fh, - std::vector& _vhandles) const + std::vector& _vhandles) const override { unsigned int count(0); _vhandles.clear(); @@ -230,7 +273,7 @@ public: return count; } - unsigned int get_face_texcoords(std::vector& _hehandles) const + unsigned int get_face_texcoords(std::vector& _hehandles) const override { unsigned int count(0); _hehandles.clear(); @@ -244,7 +287,7 @@ public: return count; } - HalfedgeHandle getHeh(FaceHandle _fh, VertexHandle _vh) const + HalfedgeHandle getHeh(FaceHandle _fh, VertexHandle _vh) const override { typename Mesh::ConstFaceHalfedgeIter fh_it; for(fh_it = mesh_.cfh_iter(_fh); fh_it.is_valid();++fh_it) @@ -255,74 +298,85 @@ public: return *fh_it; } - Vec3f normal(FaceHandle _fh) const + Vec3f normal(FaceHandle _fh) const override { return (mesh_.has_face_normals() ? vector_cast(mesh_.normal(_fh)) : Vec3f(0.0f, 0.0f, 0.0f)); } - Vec3uc color(FaceHandle _fh) const + Vec3uc color(FaceHandle _fh) const override { return (mesh_.has_face_colors() ? color_cast(mesh_.color(_fh)) : Vec3uc(0, 0, 0)); } - Vec4uc colorA(FaceHandle _fh) const + Vec4uc colorA(FaceHandle _fh) const override { return (mesh_.has_face_colors() ? color_cast(mesh_.color(_fh)) : Vec4uc(0, 0, 0, 0)); } - Vec3ui colori(FaceHandle _fh) const + Vec3ui colori(FaceHandle _fh) const override { return (mesh_.has_face_colors() ? color_cast(mesh_.color(_fh)) : Vec3ui(0, 0, 0)); } - Vec4ui colorAi(FaceHandle _fh) const + Vec4ui colorAi(FaceHandle _fh) const override { return (mesh_.has_face_colors() ? color_cast(mesh_.color(_fh)) : Vec4ui(0, 0, 0, 0)); } - Vec3f colorf(FaceHandle _fh) const + Vec3f colorf(FaceHandle _fh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_fh)) : Vec3f(0, 0, 0)); } - Vec4f colorAf(FaceHandle _fh) const + Vec4f colorAf(FaceHandle _fh) const override { return (mesh_.has_vertex_colors() ? color_cast(mesh_.color(_fh)) : Vec4f(0, 0, 0, 0)); } - virtual const BaseKernel* kernel() { return &mesh_; } + OpenMesh::Attributes::StatusInfo status(FaceHandle _fh) const override + { + if (mesh_.has_face_status()) + return mesh_.status(_fh); + return OpenMesh::Attributes::StatusInfo(); + } + + virtual const BaseKernel* kernel() override { return &mesh_; } // query number of faces, vertices, normals, texcoords - size_t n_vertices() const { return mesh_.n_vertices(); } - size_t n_faces() const { return mesh_.n_faces(); } - size_t n_edges() const { return mesh_.n_edges(); } + size_t n_vertices() const override { return mesh_.n_vertices(); } + size_t n_faces() const override { return mesh_.n_faces(); } + size_t n_edges() const override { return mesh_.n_edges(); } // property information - bool is_triangle_mesh() const + bool is_triangle_mesh() const override { return Mesh::is_triangles(); } - bool has_vertex_normals() const { return mesh_.has_vertex_normals(); } - bool has_vertex_colors() const { return mesh_.has_vertex_colors(); } - bool has_vertex_texcoords() const { return mesh_.has_vertex_texcoords2D(); } - bool has_edge_colors() const { return mesh_.has_edge_colors(); } - bool has_face_normals() const { return mesh_.has_face_normals(); } - bool has_face_colors() const { return mesh_.has_face_colors(); } + bool has_vertex_normals() const override { return mesh_.has_vertex_normals(); } + bool has_vertex_colors() const override { return mesh_.has_vertex_colors(); } + bool has_vertex_texcoords() const override { return mesh_.has_vertex_texcoords2D(); } + bool has_vertex_status() const override { return mesh_.has_vertex_status(); } + bool has_edge_colors() const override { return mesh_.has_edge_colors(); } + bool has_edge_status() const override { return mesh_.has_edge_status(); } + bool has_halfedge_status() const override { return mesh_.has_halfedge_status(); } + bool has_face_normals() const override { return mesh_.has_face_normals(); } + bool has_face_colors() const override { return mesh_.has_face_colors(); } + bool has_face_status() const override { return mesh_.has_face_status(); } private: diff --git a/src/OpenMesh/Core/IO/importer/BaseImporter.hh b/src/OpenMesh/Core/IO/importer/BaseImporter.hh index afcfd6ca..3513e279 100644 --- a/src/OpenMesh/Core/IO/importer/BaseImporter.hh +++ b/src/OpenMesh/Core/IO/importer/BaseImporter.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= @@ -99,10 +94,16 @@ public: // add a vertex without coordinate. Use set_point to set the position deferred virtual VertexHandle add_vertex() = 0; + // add an edge. Use set_next, set_vertex and set_face to set corresponding entities for halfedges + virtual HalfedgeHandle add_edge(VertexHandle _vh0, VertexHandle _vh1) = 0; + // add a face with indices _indices refering to vertices typedef std::vector VHandles; virtual FaceHandle add_face(const VHandles& _indices) = 0; + // add a face with incident halfedge + virtual FaceHandle add_face(HalfedgeHandle _heh) = 0; + // add texture coordinates per face, _vh references the first texcoord virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector& _face_texcoords) = 0; @@ -115,6 +116,9 @@ public: // Set coordinate of the given vertex. Use this function, if you created a vertex without coordinate virtual void set_point(VertexHandle _vh, const Vec3f& _point) = 0; + // Set outgoing halfedge for the given vertex. + virtual void set_halfedge(VertexHandle _vh, HalfedgeHandle _heh) = 0; + // set vertex normal virtual void set_normal(VertexHandle _vh, const Vec3f& _normal) = 0; @@ -133,6 +137,15 @@ public: // set vertex texture coordinate virtual void set_texcoord(VertexHandle _vh, const Vec2f& _texcoord) = 0; + // set vertex status + virtual void set_status(VertexHandle _vh, const OpenMesh::Attributes::StatusInfo& _status) = 0; + + // set next halfedge handle + virtual void set_next(HalfedgeHandle _heh, HalfedgeHandle _next) = 0; + + // set incident face handle for given halfedge + virtual void set_face(HalfedgeHandle _heh, FaceHandle _fh) = 0; + // set vertex texture coordinate virtual void set_texcoord(HalfedgeHandle _heh, const Vec2f& _texcoord) = 0; @@ -142,6 +155,9 @@ public: // set 3d vertex texture coordinate virtual void set_texcoord(HalfedgeHandle _heh, const Vec3f& _texcoord) = 0; + // set halfedge status + virtual void set_status(HalfedgeHandle _heh, const OpenMesh::Attributes::StatusInfo& _status) = 0; + // set edge color virtual void set_color(EdgeHandle _eh, const Vec3uc& _color) = 0; @@ -154,6 +170,9 @@ public: // set edge color virtual void set_color(EdgeHandle _eh, const Vec4f& _color) = 0; + // set edge status + virtual void set_status(EdgeHandle _eh, const OpenMesh::Attributes::StatusInfo& _status) = 0; + // set face normal virtual void set_normal(FaceHandle _fh, const Vec3f& _normal) = 0; @@ -169,6 +188,9 @@ public: // set face color virtual void set_color(FaceHandle _fh, const Vec4f& _color) = 0; + // set face status + virtual void set_status(FaceHandle _fh, const OpenMesh::Attributes::StatusInfo& _status) = 0; + // Store a property in the mesh mapping from an int to a texture file // Use set_face_texindex to set the index for each face virtual void add_texture_information( int _id , std::string _name ) = 0; diff --git a/src/OpenMesh/Core/IO/importer/ImporterT.hh b/src/OpenMesh/Core/IO/importer/ImporterT.hh index fb6b6690..f1ffdf68 100644 --- a/src/OpenMesh/Core/IO/importer/ImporterT.hh +++ b/src/OpenMesh/Core/IO/importer/ImporterT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= @@ -97,17 +92,22 @@ public: ImporterT(Mesh& _mesh) : mesh_(_mesh), halfedgeNormals_() {} - virtual VertexHandle add_vertex(const Vec3f& _point) + virtual VertexHandle add_vertex(const Vec3f& _point) override { return mesh_.add_vertex(vector_cast(_point)); } - virtual VertexHandle add_vertex() + virtual VertexHandle add_vertex() override { return mesh_.new_vertex(); } - virtual FaceHandle add_face(const VHandles& _indices) + virtual HalfedgeHandle add_edge(VertexHandle _vh0, VertexHandle _vh1) override + { + return mesh_.new_edge(_vh0, _vh1); + } + + virtual FaceHandle add_face(const VHandles& _indices) override { FaceHandle fh; @@ -192,14 +192,26 @@ public: return fh; } + virtual FaceHandle add_face(HalfedgeHandle _heh) override + { + auto fh = mesh_.new_face(); + mesh_.set_halfedge_handle(fh, _heh); + return fh; + } + // vertex attributes - virtual void set_point(VertexHandle _vh, const Vec3f& _point) + virtual void set_point(VertexHandle _vh, const Vec3f& _point) override { mesh_.set_point(_vh,vector_cast(_point)); } - virtual void set_normal(VertexHandle _vh, const Vec3f& _normal) + virtual void set_halfedge(VertexHandle _vh, HalfedgeHandle _heh) override + { + mesh_.set_halfedge_handle(_vh, _heh); + } + + virtual void set_normal(VertexHandle _vh, const Vec3f& _normal) override { if (mesh_.has_vertex_normals()) mesh_.set_normal(_vh, vector_cast(_normal)); @@ -210,114 +222,152 @@ public: halfedgeNormals_[_vh] = vector_cast(_normal); } - virtual void set_color(VertexHandle _vh, const Vec4uc& _color) + virtual void set_color(VertexHandle _vh, const Vec4uc& _color) override { if (mesh_.has_vertex_colors()) mesh_.set_color(_vh, color_cast(_color)); } - virtual void set_color(VertexHandle _vh, const Vec3uc& _color) + virtual void set_color(VertexHandle _vh, const Vec3uc& _color) override { if (mesh_.has_vertex_colors()) mesh_.set_color(_vh, color_cast(_color)); } - virtual void set_color(VertexHandle _vh, const Vec4f& _color) + virtual void set_color(VertexHandle _vh, const Vec4f& _color) override { if (mesh_.has_vertex_colors()) mesh_.set_color(_vh, color_cast(_color)); } - virtual void set_color(VertexHandle _vh, const Vec3f& _color) + virtual void set_color(VertexHandle _vh, const Vec3f& _color) override { if (mesh_.has_vertex_colors()) mesh_.set_color(_vh, color_cast(_color)); } - virtual void set_texcoord(VertexHandle _vh, const Vec2f& _texcoord) + virtual void set_texcoord(VertexHandle _vh, const Vec2f& _texcoord) override { if (mesh_.has_vertex_texcoords2D()) mesh_.set_texcoord2D(_vh, vector_cast(_texcoord)); } - virtual void set_texcoord(HalfedgeHandle _heh, const Vec2f& _texcoord) + virtual void set_status(VertexHandle _vh, const OpenMesh::Attributes::StatusInfo& _status) override + { + if (!mesh_.has_vertex_status()) + mesh_.request_vertex_status(); + mesh_.status(_vh) = _status; + } + + virtual void set_next(HalfedgeHandle _heh, HalfedgeHandle _next) override + { + mesh_.set_next_halfedge_handle(_heh, _next); + } + + virtual void set_face(HalfedgeHandle _heh, FaceHandle _fh) override + { + mesh_.set_face_handle(_heh, _fh); + } + + + virtual void set_texcoord(HalfedgeHandle _heh, const Vec2f& _texcoord) override { if (mesh_.has_halfedge_texcoords2D()) mesh_.set_texcoord2D(_heh, vector_cast(_texcoord)); } - virtual void set_texcoord(VertexHandle _vh, const Vec3f& _texcoord) + virtual void set_texcoord(VertexHandle _vh, const Vec3f& _texcoord) override { if (mesh_.has_vertex_texcoords3D()) mesh_.set_texcoord3D(_vh, vector_cast(_texcoord)); } - virtual void set_texcoord(HalfedgeHandle _heh, const Vec3f& _texcoord) + virtual void set_texcoord(HalfedgeHandle _heh, const Vec3f& _texcoord) override { if (mesh_.has_halfedge_texcoords3D()) mesh_.set_texcoord3D(_heh, vector_cast(_texcoord)); } + virtual void set_status(HalfedgeHandle _heh, const OpenMesh::Attributes::StatusInfo& _status) override + { + if (!mesh_.has_halfedge_status()) + mesh_.request_halfedge_status(); + mesh_.status(_heh) = _status; + } // edge attributes - virtual void set_color(EdgeHandle _eh, const Vec4uc& _color) + virtual void set_color(EdgeHandle _eh, const Vec4uc& _color) override { if (mesh_.has_edge_colors()) mesh_.set_color(_eh, color_cast(_color)); } - virtual void set_color(EdgeHandle _eh, const Vec3uc& _color) + virtual void set_color(EdgeHandle _eh, const Vec3uc& _color) override { if (mesh_.has_edge_colors()) mesh_.set_color(_eh, color_cast(_color)); } - virtual void set_color(EdgeHandle _eh, const Vec4f& _color) + virtual void set_color(EdgeHandle _eh, const Vec4f& _color) override { if (mesh_.has_edge_colors()) mesh_.set_color(_eh, color_cast(_color)); } - virtual void set_color(EdgeHandle _eh, const Vec3f& _color) + virtual void set_color(EdgeHandle _eh, const Vec3f& _color) override { if (mesh_.has_edge_colors()) mesh_.set_color(_eh, color_cast(_color)); } + virtual void set_status(EdgeHandle _eh, const OpenMesh::Attributes::StatusInfo& _status) override + { + if (!mesh_.has_edge_status()) + mesh_.request_edge_status(); + mesh_.status(_eh) = _status; + } + // face attributes - virtual void set_normal(FaceHandle _fh, const Vec3f& _normal) + virtual void set_normal(FaceHandle _fh, const Vec3f& _normal) override { if (mesh_.has_face_normals()) mesh_.set_normal(_fh, vector_cast(_normal)); } - virtual void set_color(FaceHandle _fh, const Vec3uc& _color) + virtual void set_color(FaceHandle _fh, const Vec3uc& _color) override { if (mesh_.has_face_colors()) mesh_.set_color(_fh, color_cast(_color)); } - virtual void set_color(FaceHandle _fh, const Vec4uc& _color) + virtual void set_color(FaceHandle _fh, const Vec4uc& _color) override { if (mesh_.has_face_colors()) mesh_.set_color(_fh, color_cast(_color)); } - virtual void set_color(FaceHandle _fh, const Vec3f& _color) + virtual void set_color(FaceHandle _fh, const Vec3f& _color) override { if (mesh_.has_face_colors()) mesh_.set_color(_fh, color_cast(_color)); } - virtual void set_color(FaceHandle _fh, const Vec4f& _color) + virtual void set_color(FaceHandle _fh, const Vec4f& _color) override { if (mesh_.has_face_colors()) mesh_.set_color(_fh, color_cast(_color)); } - virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector& _face_texcoords) + virtual void set_status(FaceHandle _fh, const OpenMesh::Attributes::StatusInfo& _status) override + { + if (!mesh_.has_face_status()) + mesh_.request_face_status(); + mesh_.status(_fh) = _status; + } + + virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector& _face_texcoords) override { // get first halfedge handle HalfedgeHandle cur_heh = mesh_.halfedge_handle(_fh); @@ -334,7 +384,7 @@ public: } } - virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector& _face_texcoords) + virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector& _face_texcoords) override { // get first halfedge handle HalfedgeHandle cur_heh = mesh_.halfedge_handle(_fh); @@ -351,13 +401,15 @@ public: } } - virtual void set_face_texindex( FaceHandle _fh, int _texId ) { + virtual void set_face_texindex( FaceHandle _fh, int _texId ) override + { if ( mesh_.has_face_texture_index() ) { mesh_.set_texture_index(_fh , _texId); } } - virtual void add_texture_information( int _id , std::string _name ) { + virtual void add_texture_information( int _id , std::string _name ) override + { OpenMesh::MPropHandleT< std::map< int, std::string > > property; if ( !mesh_.get_property_handle(property,"TextureMapping") ) { @@ -370,26 +422,26 @@ public: // low-level access to mesh - virtual BaseKernel* kernel() { return &mesh_; } + virtual BaseKernel* kernel() override { return &mesh_; } - bool is_triangle_mesh() const + bool is_triangle_mesh() const override { return Mesh::is_triangles(); } - void reserve(unsigned int nV, unsigned int nE, unsigned int nF) + void reserve(unsigned int nV, unsigned int nE, unsigned int nF) override { mesh_.reserve(nV, nE, nF); } // query number of faces, vertices, normals, texcoords - size_t n_vertices() const { return mesh_.n_vertices(); } - size_t n_faces() const { return mesh_.n_faces(); } - size_t n_edges() const { return mesh_.n_edges(); } + size_t n_vertices() const override { return mesh_.n_vertices(); } + size_t n_faces() const override { return mesh_.n_faces(); } + size_t n_edges() const override { return mesh_.n_edges(); } - void prepare() { } + void prepare() override{ } - void finish() { } + void finish() override { } private: diff --git a/src/OpenMesh/Core/IO/reader/BaseReader.cc b/src/OpenMesh/Core/IO/reader/BaseReader.cc index d1cc8d94..d7bc0946 100644 --- a/src/OpenMesh/Core/IO/reader/BaseReader.cc +++ b/src/OpenMesh/Core/IO/reader/BaseReader.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //=== INCLUDES ================================================================ diff --git a/src/OpenMesh/Core/IO/reader/BaseReader.hh b/src/OpenMesh/Core/IO/reader/BaseReader.hh index 463b9c72..6361bfd3 100644 --- a/src/OpenMesh/Core/IO/reader/BaseReader.hh +++ b/src/OpenMesh/Core/IO/reader/BaseReader.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/reader/OBJReader.cc b/src/OpenMesh/Core/IO/reader/OBJReader.cc index 6be24e0f..78df8a1b 100644 --- a/src/OpenMesh/Core/IO/reader/OBJReader.cc +++ b/src/OpenMesh/Core/IO/reader/OBJReader.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Core/IO/reader/OBJReader.hh b/src/OpenMesh/Core/IO/reader/OBJReader.hh index 70c3a2fe..3dc1fcc2 100644 --- a/src/OpenMesh/Core/IO/reader/OBJReader.hh +++ b/src/OpenMesh/Core/IO/reader/OBJReader.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/reader/OFFReader.cc b/src/OpenMesh/Core/IO/reader/OFFReader.cc index 896b9994..e4a239ff 100644 --- a/src/OpenMesh/Core/IO/reader/OFFReader.cc +++ b/src/OpenMesh/Core/IO/reader/OFFReader.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #define LINE_LEN 4096 diff --git a/src/OpenMesh/Core/IO/reader/OFFReader.hh b/src/OpenMesh/Core/IO/reader/OFFReader.hh index 755093a3..061b2d14 100644 --- a/src/OpenMesh/Core/IO/reader/OFFReader.hh +++ b/src/OpenMesh/Core/IO/reader/OFFReader.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/reader/OMReader.cc b/src/OpenMesh/Core/IO/reader/OMReader.cc index b66684eb..3098c4e7 100644 --- a/src/OpenMesh/Core/IO/reader/OMReader.cc +++ b/src/OpenMesh/Core/IO/reader/OMReader.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= @@ -61,6 +56,7 @@ #include #include #include +#include //=== NAMESPACES ============================================================== @@ -176,6 +172,15 @@ bool _OMReader_::read_binary(std::istream& _is, BaseImporter& _bi, Options& _opt bytes_ += restore(_is, header_, swap); + if (header_.version_ > _OMWriter_::get_version()) + { + omerr() << "File uses .om version " << OMFormat::as_string(header_.version_) << " but reader only " + << "supports up to version " << OMFormat::as_string(_OMWriter_::get_version()) << ".\n" + << "Please update your OpenMesh." << std::endl; + return false; + } + + while (!_is.eof()) { bytes_ += restore(_is, chunk_header_, swap); @@ -294,6 +299,7 @@ bool _OMReader_::read_binary_vertex_chunk(std::istream &_is, BaseImporter &_bi, OpenMesh::Vec3f v3f; OpenMesh::Vec2f v2f; OpenMesh::Vec3uc v3uc; // rgb + OpenMesh::Attributes::StatusInfo status; OMFormat::Chunk::PropertyName custom_prop; @@ -343,6 +349,20 @@ bool _OMReader_::read_binary_vertex_chunk(std::istream &_is, BaseImporter &_bi, } break; + case Chunk::Type_Status: + { + assert( OMFormat::dimensions(chunk_header_) == 1); + + fileOptions_ += Options::Status; + + for (; vidx < header_.n_vertices_ && !_is.eof(); ++vidx) { + bytes_ += restore(_is, status, _swap); + if (fileOptions_.vertex_has_status() && _opt.vertex_has_status()) + _bi.set_status(VertexHandle(int(vidx)), status); + } + break; + } + case Chunk::Type_Custom: bytes_ += restore_binary_custom_data(_is, _bi.kernel()->_get_vprop(property_name_), header_.n_vertices_, _swap); @@ -351,6 +371,19 @@ bool _OMReader_::read_binary_vertex_chunk(std::istream &_is, BaseImporter &_bi, break; + case Chunk::Type_Topology: + { + for (; vidx < header_.n_vertices_; ++vidx) + { + int halfedge_id = 0; + bytes_ += restore( _is, halfedge_id, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + + _bi.set_halfedge(VertexHandle(static_cast(vidx)), HalfedgeHandle(halfedge_id)); + } + } + + break; + default: // skip unknown chunks { omerr() << "Unknown chunk type ignored!\n"; @@ -376,34 +409,51 @@ bool _OMReader_::read_binary_face_chunk(std::istream &_is, BaseImporter &_bi, Op size_t fidx = 0; OpenMesh::Vec3f v3f; // normal OpenMesh::Vec3uc v3uc; // rgb + OpenMesh::Attributes::StatusInfo status; switch (chunk_header_.type_) { - case Chunk::Type_Topology: { - BaseImporter::VHandles vhandles; - size_t nV = 0; - size_t vidx = 0; + case Chunk::Type_Topology: + { + if (header_.version_ < OMFormat::mk_version(2,0)) + { + // add faces based on vertex indices + BaseImporter::VHandles vhandles; + size_t nV = 0; + size_t vidx = 0; - switch (header_.mesh_) { - case 'T': - nV = 3; - break; - case 'Q': - nV = 4; - break; - } - - for (; fidx < header_.n_faces_; ++fidx) { - if (header_.mesh_ == 'P') - bytes_ += restore(_is, nV, Chunk::Integer_16, _swap); - - vhandles.clear(); - for (size_t j = 0; j < nV; ++j) { - bytes_ += restore(_is, vidx, Chunk::Integer_Size(chunk_header_.bits_), _swap); - - vhandles.push_back(VertexHandle(int(vidx))); + switch (header_.mesh_) { + case 'T': + nV = 3; + break; + case 'Q': + nV = 4; + break; } - _bi.add_face(vhandles); + for (; fidx < header_.n_faces_; ++fidx) { + if (header_.mesh_ == 'P') + bytes_ += restore(_is, nV, Chunk::Integer_16, _swap); + + vhandles.clear(); + for (size_t j = 0; j < nV; ++j) { + bytes_ += restore(_is, vidx, Chunk::Integer_Size(chunk_header_.bits_), _swap); + + vhandles.push_back(VertexHandle(int(vidx))); + } + + _bi.add_face(vhandles); + } + } + else + { + // add faces by simply setting an incident halfedge + for (; fidx < header_.n_faces_; ++fidx) + { + int halfedge_id = 0; + bytes_ += restore( _is, halfedge_id, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + + _bi.add_face(HalfedgeHandle(halfedge_id)); + } } } break; @@ -430,6 +480,19 @@ bool _OMReader_::read_binary_face_chunk(std::istream &_is, BaseImporter &_bi, Op _bi.set_color(FaceHandle(int(fidx)), v3uc); } break; + case Chunk::Type_Status: + { + assert( OMFormat::dimensions(chunk_header_) == 1); + + fileOptions_ += Options::Status; + + for (; fidx < header_.n_faces_ && !_is.eof(); ++fidx) { + bytes_ += restore(_is, status, _swap); + if (fileOptions_.face_has_status() && _opt.face_has_status()) + _bi.set_status(FaceHandle(int(fidx)), status); + } + break; + } case Chunk::Type_Custom: @@ -453,7 +516,7 @@ bool _OMReader_::read_binary_face_chunk(std::istream &_is, BaseImporter &_bi, Op //----------------------------------------------------------------------------- -bool _OMReader_::read_binary_edge_chunk(std::istream &_is, BaseImporter &_bi, Options &/*_opt */, bool _swap) const +bool _OMReader_::read_binary_edge_chunk(std::istream &_is, BaseImporter &_bi, Options &_opt, bool _swap) const { using OMFormat::Chunk; @@ -461,6 +524,8 @@ bool _OMReader_::read_binary_edge_chunk(std::istream &_is, BaseImporter &_bi, Op size_t b = bytes_; + OpenMesh::Attributes::StatusInfo status; + switch (chunk_header_.type_) { case Chunk::Type_Custom: @@ -468,6 +533,20 @@ bool _OMReader_::read_binary_edge_chunk(std::istream &_is, BaseImporter &_bi, Op break; + case Chunk::Type_Status: + { + assert( OMFormat::dimensions(chunk_header_) == 1); + + fileOptions_ += Options::Status; + + for (size_t eidx = 0; eidx < header_.n_edges_ && !_is.eof(); ++eidx) { + bytes_ += restore(_is, status, _swap); + if (fileOptions_.edge_has_status() && _opt.edge_has_status()) + _bi.set_status(EdgeHandle(int(eidx)), status); + } + break; + } + default: // skip unknown type size_t size_of = OMFormat::chunk_data_size(header_, chunk_header_); @@ -481,13 +560,14 @@ bool _OMReader_::read_binary_edge_chunk(std::istream &_is, BaseImporter &_bi, Op //----------------------------------------------------------------------------- -bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi, Options &/* _opt */, bool _swap) const +bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi, Options & _opt, bool _swap) const { using OMFormat::Chunk; assert( chunk_header_.entity_ == Chunk::Entity_Halfedge); size_t b = bytes_; + OpenMesh::Attributes::StatusInfo status; switch (chunk_header_.type_) { case Chunk::Type_Custom: @@ -495,6 +575,55 @@ bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi bytes_ += restore_binary_custom_data(_is, _bi.kernel()->_get_hprop(property_name_), 2 * header_.n_edges_, _swap); break; + case Chunk::Type_Topology: + { + std::vector next_halfedges; + for (size_t e_idx = 0; e_idx < header_.n_edges_; ++e_idx) + { + int next_id_0 = -1; + int to_vertex_id_0 = -1; + int face_id_0 = -1; + bytes_ += restore( _is, next_id_0, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + bytes_ += restore( _is, to_vertex_id_0, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + bytes_ += restore( _is, face_id_0, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + + int next_id_1 = -1; + int to_vertex_id_1 = -1; + int face_id_1 = -1; + bytes_ += restore( _is, next_id_1, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + bytes_ += restore( _is, to_vertex_id_1, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + bytes_ += restore( _is, face_id_1, OMFormat::Chunk::Integer_Size(chunk_header_.bits_), _swap ); + + auto heh0 = _bi.add_edge(VertexHandle(to_vertex_id_1), VertexHandle(to_vertex_id_0)); + auto heh1 = HalfedgeHandle(heh0.idx() + 1); + + next_halfedges.push_back(HalfedgeHandle(next_id_0)); + next_halfedges.push_back(HalfedgeHandle(next_id_1)); + + _bi.set_face(heh0, FaceHandle(face_id_0)); + _bi.set_face(heh1, FaceHandle(face_id_1)); + } + + for (size_t i = 0; i < next_halfedges.size(); ++i) + _bi.set_next(HalfedgeHandle(static_cast(i)), next_halfedges[i]); + } + + break; + + case Chunk::Type_Status: + { + assert( OMFormat::dimensions(chunk_header_) == 1); + + fileOptions_ += Options::Status; + + for (size_t hidx = 0; hidx < header_.n_edges_ * 2 && !_is.eof(); ++hidx) { + bytes_ += restore(_is, status, _swap); + if (fileOptions_.halfedge_has_status() && _opt.halfedge_has_status()) + _bi.set_status(HalfedgeHandle(int(hidx)), status); + } + break; + } + default: // skip unknown chunk omerr() << "Unknown chunk type ignored!\n"; diff --git a/src/OpenMesh/Core/IO/reader/OMReader.hh b/src/OpenMesh/Core/IO/reader/OMReader.hh index 4b1f67db..9f6707ff 100644 --- a/src/OpenMesh/Core/IO/reader/OMReader.hh +++ b/src/OpenMesh/Core/IO/reader/OMReader.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/reader/PLYReader.cc b/src/OpenMesh/Core/IO/reader/PLYReader.cc index 37e605a7..1b35d53d 100644 --- a/src/OpenMesh/Core/IO/reader/PLYReader.cc +++ b/src/OpenMesh/Core/IO/reader/PLYReader.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ - #define LINE_LEN 4096 //== INCLUDES ================================================================= @@ -135,6 +128,14 @@ bool _PLYReader_::read(std::istream& _in, BaseImporter& _bi, Options& _opt) { return false; } + // Reparse the header + if (!can_u_read(_in)) { + omerr() << "[PLYReader] : Unable to parse header\n"; + return false; + } + + + // filter relevant options for reading bool swap = _opt.check(Options::Swap); @@ -281,12 +282,6 @@ void _PLYReader_::readCustomProperty(std::istream& _in, BaseImporter& _bi, Handl bool _PLYReader_::read_ascii(std::istream& _in, BaseImporter& _bi, const Options& _opt) const { - // Reparse the header - if (!can_u_read(_in)) { - omerr() << "[PLYReader] : Unable to parse header\n"; - return false; - } - unsigned int i, j, k, l, idx; unsigned int nV; OpenMesh::Vec3f v, n; @@ -507,12 +502,6 @@ bool _PLYReader_::read_ascii(std::istream& _in, BaseImporter& _bi, const Options bool _PLYReader_::read_binary(std::istream& _in, BaseImporter& _bi, bool /*_swap*/, const Options& _opt) const { - // Reparse the header - if (!can_u_read(_in)) { - omerr() << "[PLYReader] : Unable to parse header\n"; - return false; - } - OpenMesh::Vec3f v, n; // Vertex OpenMesh::Vec2f t; // TexCoords BaseImporter::VHandles vhandles; diff --git a/src/OpenMesh/Core/IO/reader/PLYReader.hh b/src/OpenMesh/Core/IO/reader/PLYReader.hh index c887a5bf..7b3abcf4 100644 --- a/src/OpenMesh/Core/IO/reader/PLYReader.hh +++ b/src/OpenMesh/Core/IO/reader/PLYReader.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/reader/STLReader.cc b/src/OpenMesh/Core/IO/reader/STLReader.cc index b3c5af0a..c5a12917 100644 --- a/src/OpenMesh/Core/IO/reader/STLReader.cc +++ b/src/OpenMesh/Core/IO/reader/STLReader.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Core/IO/reader/STLReader.hh b/src/OpenMesh/Core/IO/reader/STLReader.hh index b6426236..b8f21f0d 100644 --- a/src/OpenMesh/Core/IO/reader/STLReader.hh +++ b/src/OpenMesh/Core/IO/reader/STLReader.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/writer/BaseWriter.cc b/src/OpenMesh/Core/IO/writer/BaseWriter.cc index 7b7f29b6..5b959093 100644 --- a/src/OpenMesh/Core/IO/writer/BaseWriter.cc +++ b/src/OpenMesh/Core/IO/writer/BaseWriter.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //=== INCLUDES ================================================================ diff --git a/src/OpenMesh/Core/IO/writer/BaseWriter.hh b/src/OpenMesh/Core/IO/writer/BaseWriter.hh index 3e1688f0..49b97b7e 100644 --- a/src/OpenMesh/Core/IO/writer/BaseWriter.hh +++ b/src/OpenMesh/Core/IO/writer/BaseWriter.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.cc b/src/OpenMesh/Core/IO/writer/OBJWriter.cc index a592e0da..c949066b 100644 --- a/src/OpenMesh/Core/IO/writer/OBJWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OBJWriter.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= @@ -97,8 +92,12 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt, std::stream return false; } + // Set precision on output stream. The default is set via IOManager and passed through to all writers. out.precision(_precision); + // Set fixed output to avoid problems with programs not reading scientific notation correctly + out << std::fixed; + { #if defined(WIN32) std::string::size_type dot = _filename.find_last_of("\\/"); diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.hh b/src/OpenMesh/Core/IO/writer/OBJWriter.hh index 6adc7725..f6ad6812 100644 --- a/src/OpenMesh/Core/IO/writer/OBJWriter.hh +++ b/src/OpenMesh/Core/IO/writer/OBJWriter.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/writer/OFFWriter.cc b/src/OpenMesh/Core/IO/writer/OFFWriter.cc index c0d2b114..6b8c3364 100644 --- a/src/OpenMesh/Core/IO/writer/OFFWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OFFWriter.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Core/IO/writer/OFFWriter.hh b/src/OpenMesh/Core/IO/writer/OFFWriter.hh index b6f4e144..99f5b991 100644 --- a/src/OpenMesh/Core/IO/writer/OFFWriter.hh +++ b/src/OpenMesh/Core/IO/writer/OFFWriter.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/IO/writer/OMWriter.cc b/src/OpenMesh/Core/IO/writer/OMWriter.cc index 9c32282f..c7a601d6 100644 --- a/src/OpenMesh/Core/IO/writer/OMWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OMWriter.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== INCLUDES ================================================================= @@ -86,7 +81,7 @@ _OMWriter_& OMWriter() { return __OMWriterInstance; } const OMFormat::uchar _OMWriter_::magic_[3] = "OM"; -const OMFormat::uint8 _OMWriter_::version_ = OMFormat::mk_version(1,2); +const OMFormat::uint8 _OMWriter_::version_ = OMFormat::mk_version(2,0); _OMWriter_:: @@ -187,8 +182,6 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be, unsigned int i, nV, nF; Vec3f v; Vec2f t; - std::vector vhandles; - // -------------------- write header OMFormat::Header header; @@ -286,6 +279,50 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be, } + // ---------- wirte halfedge data + if (_be.n_edges()) + { + chunk_header.reserved_ = 0; + chunk_header.name_ = false; + chunk_header.entity_ = OMFormat::Chunk::Entity_Halfedge; + chunk_header.type_ = OMFormat::Chunk::Type_Topology; + chunk_header.signed_ = true; + chunk_header.float_ = true; // TODO: is this correct? This causes a scalar size of 1 in OMFormat.hh scalar_size which we need I think? + chunk_header.dim_ = OMFormat::Chunk::Dim_3D; + chunk_header.bits_ = OMFormat::needed_bits(_be.n_edges()*4); // *2 due to halfedge ids being stored, *2 due to signedness + + bytes += store( _os, chunk_header, swap ); + auto nE=header.n_edges_*2; + for (i=0; i(i))); + auto to_vertex_id = _be.get_to_vertex_id(HalfedgeHandle(static_cast(i))); + auto face_id = _be.get_face_id(HalfedgeHandle(static_cast(i))); + + bytes += store( _os, next_id, OMFormat::Chunk::Integer_Size(chunk_header.bits_), swap ); + bytes += store( _os, to_vertex_id, OMFormat::Chunk::Integer_Size(chunk_header.bits_), swap ); + bytes += store( _os, face_id, OMFormat::Chunk::Integer_Size(chunk_header.bits_), swap ); + } + } + + // ---------- write vertex topology (outgoing halfedge) + if (_be.n_vertices()) + { + chunk_header.reserved_ = 0; + chunk_header.name_ = false; + chunk_header.entity_ = OMFormat::Chunk::Entity_Vertex; + chunk_header.type_ = OMFormat::Chunk::Type_Topology; + chunk_header.signed_ = true; + chunk_header.float_ = true; // TODO: is this correct? This causes a scalar size of 1 in OMFormat.hh scalar_size which we need I think? + chunk_header.dim_ = OMFormat::Chunk::Dim_1D; + chunk_header.bits_ = OMFormat::needed_bits(_be.n_edges()*4); // *2 due to halfedge ids being stored, *2 due to signedness + + bytes += store( _os, chunk_header, swap ); + for (i=0, nV=header.n_vertices_; i diff --git a/src/OpenMesh/Core/Mesh/ArrayKernel.hh b/src/OpenMesh/Core/Mesh/ArrayKernel.hh index ccf2748c..5e0e9740 100644 --- a/src/OpenMesh/Core/Mesh/ArrayKernel.hh +++ b/src/OpenMesh/Core/Mesh/ArrayKernel.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/ArrayKernelT.cc b/src/OpenMesh/Core/Mesh/ArrayKernelT.cc index d38d093c..f62248ca 100644 --- a/src/OpenMesh/Core/Mesh/ArrayKernelT.cc +++ b/src/OpenMesh/Core/Mesh/ArrayKernelT.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 362 $ * - * $Date: 2011-01-26 10:21:12 +0100 (Mi, 26 Jan 2011) $ * - * * -\*===========================================================================*/ - #define OPENMESH_ARRAY_KERNEL_C //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Core/Mesh/AttribKernelT.hh b/src/OpenMesh/Core/Mesh/AttribKernelT.hh index c0d52a8f..90b10fe0 100644 --- a/src/OpenMesh/Core/Mesh/AttribKernelT.hh +++ b/src/OpenMesh/Core/Mesh/AttribKernelT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_ATTRIBKERNEL_HH #define OPENMESH_ATTRIBKERNEL_HH diff --git a/src/OpenMesh/Core/Mesh/Attributes.hh b/src/OpenMesh/Core/Mesh/Attributes.hh index e53f021a..e02066ce 100644 --- a/src/OpenMesh/Core/Mesh/Attributes.hh +++ b/src/OpenMesh/Core/Mesh/Attributes.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** diff --git a/src/OpenMesh/Core/Mesh/BaseKernel.cc b/src/OpenMesh/Core/Mesh/BaseKernel.cc index c0e174f3..1a375cec 100644 --- a/src/OpenMesh/Core/Mesh/BaseKernel.cc +++ b/src/OpenMesh/Core/Mesh/BaseKernel.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include #include diff --git a/src/OpenMesh/Core/Mesh/BaseKernel.hh b/src/OpenMesh/Core/Mesh/BaseKernel.hh index 6bca014d..0a0fee1a 100644 --- a/src/OpenMesh/Core/Mesh/BaseKernel.hh +++ b/src/OpenMesh/Core/Mesh/BaseKernel.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/BaseMesh.hh b/src/OpenMesh/Core/Mesh/BaseMesh.hh index bcf75ebf..359514dd 100644 --- a/src/OpenMesh/Core/Mesh/BaseMesh.hh +++ b/src/OpenMesh/Core/Mesh/BaseMesh.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/Casts.hh b/src/OpenMesh/Core/Mesh/Casts.hh index 136c16f7..4a913a7f 100644 --- a/src/OpenMesh/Core/Mesh/Casts.hh +++ b/src/OpenMesh/Core/Mesh/Casts.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_CASTS_HH #define OPENMESH_CASTS_HH diff --git a/src/OpenMesh/Core/Mesh/CirculatorsT.hh b/src/OpenMesh/Core/Mesh/CirculatorsT.hh index f3a0c6e2..395f6055 100644 --- a/src/OpenMesh/Core/Mesh/CirculatorsT.hh +++ b/src/OpenMesh/Core/Mesh/CirculatorsT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_CIRCULATORS_HH #define OPENMESH_CIRCULATORS_HH diff --git a/src/OpenMesh/Core/Mesh/FinalMeshItemsT.hh b/src/OpenMesh/Core/Mesh/FinalMeshItemsT.hh index cbed2e51..9952e4eb 100644 --- a/src/OpenMesh/Core/Mesh/FinalMeshItemsT.hh +++ b/src/OpenMesh/Core/Mesh/FinalMeshItemsT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_MESH_ITEMS_HH #define OPENMESH_MESH_ITEMS_HH diff --git a/src/OpenMesh/Core/Mesh/Handles.hh b/src/OpenMesh/Core/Mesh/Handles.hh index 68ac1d7e..0c8c21c4 100644 --- a/src/OpenMesh/Core/Mesh/Handles.hh +++ b/src/OpenMesh/Core/Mesh/Handles.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_HANDLES_HH #define OPENMESH_HANDLES_HH diff --git a/src/OpenMesh/Core/Mesh/IteratorsT.hh b/src/OpenMesh/Core/Mesh/IteratorsT.hh index 284004c9..3ce98609 100644 --- a/src/OpenMesh/Core/Mesh/IteratorsT.hh +++ b/src/OpenMesh/Core/Mesh/IteratorsT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_ITERATORS_HH #define OPENMESH_ITERATORS_HH diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc index e311f5cb..521f00e6 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //== IMPLEMENTATION ========================================================== #include @@ -364,14 +359,16 @@ bool PolyConnectivity::is_collapse_ok(HalfedgeHandle v0v1) //the edges v1-vl and vl-v0 must not be both boundary edges //this test makes only sense in a polymesh if the side face is a triangle + VertexHandle vl; if (!is_boundary(v0v1)) { if (v0v1_triangle) { - //VertexHandle vl = to_vertex_handle(next_halfedge_handle(v0v1)); - HalfedgeHandle h1 = next_halfedge_handle(v0v1); HalfedgeHandle h2 = next_halfedge_handle(h1); + + vl = to_vertex_handle(h1); + if (is_boundary(opposite_halfedge_handle(h1)) && is_boundary(opposite_halfedge_handle(h2))) return false; } @@ -379,19 +376,24 @@ bool PolyConnectivity::is_collapse_ok(HalfedgeHandle v0v1) //the edges v0-vr and vr-v1 must not be both boundary edges //this test makes only sense in a polymesh if the side face is a triangle + VertexHandle vr; if (!is_boundary(v1v0)) { if (v1v0_triangle) { - //VertexHandle vr = to_vertex_handle(next_halfedge_handle(v1v0)); - HalfedgeHandle h1 = next_halfedge_handle(v1v0); HalfedgeHandle h2 = next_halfedge_handle(h1); + + vr = to_vertex_handle(h1); + if (is_boundary(opposite_halfedge_handle(h1)) && is_boundary(opposite_halfedge_handle(h2))) return false; } } + // if vl and vr are equal and valid (e.g. triangle case) -> fail + if ( vl.is_valid() && (vl == vr)) return false; + // edge between two boundary vertices should be a boundary edge if ( is_boundary(v0) && is_boundary(v1) && !is_boundary(v0v1) && !is_boundary(v1v0)) return false; diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh index d2ce6672..650e2f93 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_POLYCONNECTIVITY_HH #define OPENMESH_POLYCONNECTIVITY_HH diff --git a/src/OpenMesh/Core/Mesh/PolyMeshT.cc b/src/OpenMesh/Core/Mesh/PolyMeshT.cc index 64fc9914..689a2c20 100644 --- a/src/OpenMesh/Core/Mesh/PolyMeshT.cc +++ b/src/OpenMesh/Core/Mesh/PolyMeshT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/PolyMeshT.hh b/src/OpenMesh/Core/Mesh/PolyMeshT.hh index 48ab8c41..e21fc5d7 100644 --- a/src/OpenMesh/Core/Mesh/PolyMeshT.hh +++ b/src/OpenMesh/Core/Mesh/PolyMeshT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh b/src/OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh index d884ae0b..3c825561 100644 --- a/src/OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh +++ b/src/OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/Status.hh b/src/OpenMesh/Core/Mesh/Status.hh index 19e474dc..22ef81d6 100644 --- a/src/OpenMesh/Core/Mesh/Status.hh +++ b/src/OpenMesh/Core/Mesh/Status.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/Traits.hh b/src/OpenMesh/Core/Mesh/Traits.hh index a0fbe01c..d6db2d3e 100644 --- a/src/OpenMesh/Core/Mesh/Traits.hh +++ b/src/OpenMesh/Core/Mesh/Traits.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Core/Mesh/Traits.hh diff --git a/src/OpenMesh/Core/Mesh/TriConnectivity.cc b/src/OpenMesh/Core/Mesh/TriConnectivity.cc index fb77f87e..5bb7c24b 100644 --- a/src/OpenMesh/Core/Mesh/TriConnectivity.cc +++ b/src/OpenMesh/Core/Mesh/TriConnectivity.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // CLASS TriMeshT - IMPLEMENTATION diff --git a/src/OpenMesh/Core/Mesh/TriConnectivity.hh b/src/OpenMesh/Core/Mesh/TriConnectivity.hh index baab7c60..f0c948d6 100644 --- a/src/OpenMesh/Core/Mesh/TriConnectivity.hh +++ b/src/OpenMesh/Core/Mesh/TriConnectivity.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_TRICONNECTIVITY_HH #define OPENMESH_TRICONNECTIVITY_HH diff --git a/src/OpenMesh/Core/Mesh/TriMeshT.cc b/src/OpenMesh/Core/Mesh/TriMeshT.cc index c225cd5a..43592ecc 100644 --- a/src/OpenMesh/Core/Mesh/TriMeshT.cc +++ b/src/OpenMesh/Core/Mesh/TriMeshT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/TriMeshT.hh b/src/OpenMesh/Core/Mesh/TriMeshT.hh index 4d8382c3..582f71f5 100644 --- a/src/OpenMesh/Core/Mesh/TriMeshT.hh +++ b/src/OpenMesh/Core/Mesh/TriMeshT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh b/src/OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh index 0c648bf2..2040be05 100644 --- a/src/OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh +++ b/src/OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Mesh/gen/circulators_header.hh b/src/OpenMesh/Core/Mesh/gen/circulators_header.hh index 72bab075..276a737b 100644 --- a/src/OpenMesh/Core/Mesh/gen/circulators_header.hh +++ b/src/OpenMesh/Core/Mesh/gen/circulators_header.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_CIRCULATORS_HH #define OPENMESH_CIRCULATORS_HH diff --git a/src/OpenMesh/Core/Mesh/gen/iterators_header.hh b/src/OpenMesh/Core/Mesh/gen/iterators_header.hh index 22f6d8b6..89205330 100644 --- a/src/OpenMesh/Core/Mesh/gen/iterators_header.hh +++ b/src/OpenMesh/Core/Mesh/gen/iterators_header.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_ITERATORS_HH #define OPENMESH_ITERATORS_HH diff --git a/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh b/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh index c4d6a292..d821df74 100644 --- a/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh +++ b/src/OpenMesh/Core/System/OpenMeshDLLMacros.hh @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 566 $ * - * $Date: 2012-03-23 18:00:57 +0100 (Fr, 23 Mär 2012) $ * - * * -\*===========================================================================*/ - // Disable the warnings about needs to have DLL interface as we have tons of vector templates #ifdef _MSC_VER #pragma warning( disable: 4251 ) diff --git a/src/OpenMesh/Core/System/compiler.hh b/src/OpenMesh/Core/System/compiler.hh index 412b090a..b74ed041 100644 --- a/src/OpenMesh/Core/System/compiler.hh +++ b/src/OpenMesh/Core/System/compiler.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_COMPILER_H diff --git a/src/OpenMesh/Core/System/config.h b/src/OpenMesh/Core/System/config.h index bb5a7893..4611fbfb 100644 --- a/src/OpenMesh/Core/System/config.h +++ b/src/OpenMesh/Core/System/config.h @@ -65,7 +65,8 @@ // ---------------------------------------------------------------------------- -#define OM_VERSION 0x70200 +#define OM_VERSION 0x80000 +//#define OM_VERSION 0x70200 #define OM_GET_VER ((OM_VERSION & 0xf0000) >> 16) #define OM_GET_MAJ ((OM_VERSION & 0x0ff00) >> 8) diff --git a/src/OpenMesh/Core/System/config.hh b/src/OpenMesh/Core/System/config.hh index 6c23e27e..ba504c55 100644 --- a/src/OpenMesh/Core/System/config.hh +++ b/src/OpenMesh/Core/System/config.hh @@ -39,11 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include diff --git a/src/OpenMesh/Core/System/mostream.hh b/src/OpenMesh/Core/System/mostream.hh index 4dabf51c..79956485 100644 --- a/src/OpenMesh/Core/System/mostream.hh +++ b/src/OpenMesh/Core/System/mostream.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/System/omstream.cc b/src/OpenMesh/Core/System/omstream.cc index 79554c15..810e3152 100644 --- a/src/OpenMesh/Core/System/omstream.cc +++ b/src/OpenMesh/Core/System/omstream.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/System/omstream.hh b/src/OpenMesh/Core/System/omstream.hh index 01fdfb00..b44c5507 100644 --- a/src/OpenMesh/Core/System/omstream.hh +++ b/src/OpenMesh/Core/System/omstream.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/Templates/newClass.cc b/src/OpenMesh/Core/Templates/newClass.cc index a0f5abab..e7ec51a2 100644 --- a/src/OpenMesh/Core/Templates/newClass.cc +++ b/src/OpenMesh/Core/Templates/newClass.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/Templates/newClass.hh b/src/OpenMesh/Core/Templates/newClass.hh index 31a2fd2f..f87025e1 100644 --- a/src/OpenMesh/Core/Templates/newClass.hh +++ b/src/OpenMesh/Core/Templates/newClass.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/Templates/newClassT.cc b/src/OpenMesh/Core/Templates/newClassT.cc index e89b6da1..a26978ec 100644 --- a/src/OpenMesh/Core/Templates/newClassT.cc +++ b/src/OpenMesh/Core/Templates/newClassT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/Templates/newClassT.hh b/src/OpenMesh/Core/Templates/newClassT.hh index 00b5f143..7a06ec51 100644 --- a/src/OpenMesh/Core/Templates/newClassT.hh +++ b/src/OpenMesh/Core/Templates/newClassT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Core/Utils/AutoPropertyHandleT.hh b/src/OpenMesh/Core/Utils/AutoPropertyHandleT.hh index fae37a94..f9b157af 100644 --- a/src/OpenMesh/Core/Utils/AutoPropertyHandleT.hh +++ b/src/OpenMesh/Core/Utils/AutoPropertyHandleT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_AutoPropertyHandleT_HH #define OPENMESH_AutoPropertyHandleT_HH diff --git a/src/OpenMesh/Core/Utils/BaseProperty.cc b/src/OpenMesh/Core/Utils/BaseProperty.cc index 92de7b6b..847b1882 100644 --- a/src/OpenMesh/Core/Utils/BaseProperty.cc +++ b/src/OpenMesh/Core/Utils/BaseProperty.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include diff --git a/src/OpenMesh/Core/Utils/BaseProperty.hh b/src/OpenMesh/Core/Utils/BaseProperty.hh index 3abcfe2e..9991b3ba 100644 --- a/src/OpenMesh/Core/Utils/BaseProperty.hh +++ b/src/OpenMesh/Core/Utils/BaseProperty.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_BASEPROPERTY_HH #define OPENMESH_BASEPROPERTY_HH diff --git a/src/OpenMesh/Core/Utils/Endian.cc b/src/OpenMesh/Core/Utils/Endian.cc index c4fb3146..1af0a81a 100644 --- a/src/OpenMesh/Core/Utils/Endian.cc +++ b/src/OpenMesh/Core/Utils/Endian.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/Endian.hh b/src/OpenMesh/Core/Utils/Endian.hh index e511c00a..a3b3ce89 100644 --- a/src/OpenMesh/Core/Utils/Endian.hh +++ b/src/OpenMesh/Core/Utils/Endian.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/GenProg.hh b/src/OpenMesh/Core/Utils/GenProg.hh index bf0b20a3..9d04af21 100644 --- a/src/OpenMesh/Core/Utils/GenProg.hh +++ b/src/OpenMesh/Core/Utils/GenProg.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/HandleToPropHandle.hh b/src/OpenMesh/Core/Utils/HandleToPropHandle.hh new file mode 100644 index 00000000..4332b537 --- /dev/null +++ b/src/OpenMesh/Core/Utils/HandleToPropHandle.hh @@ -0,0 +1,40 @@ +#ifndef HANDLETOPROPHANDLE_HH_ +#define HANDLETOPROPHANDLE_HH_ + +#include +#include + +namespace OpenMesh { + + template + struct HandleToPropHandle { + }; + + template + struct HandleToPropHandle { + using type = OpenMesh::VPropHandleT; + }; + + template + struct HandleToPropHandle { + using type = OpenMesh::HPropHandleT; + }; + + template + struct HandleToPropHandle { + using type = OpenMesh::EPropHandleT; + }; + + template + struct HandleToPropHandle { + using type = OpenMesh::FPropHandleT; + }; + + template + struct HandleToPropHandle { + using type = OpenMesh::MPropHandleT; + }; + +} // namespace OpenMesh + +#endif // HANDLETOPROPHANDLE_HH_ \ No newline at end of file diff --git a/src/OpenMesh/Core/Utils/Noncopyable.hh b/src/OpenMesh/Core/Utils/Noncopyable.hh index ddbfb3ed..87f64412 100644 --- a/src/OpenMesh/Core/Utils/Noncopyable.hh +++ b/src/OpenMesh/Core/Utils/Noncopyable.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/Property.hh b/src/OpenMesh/Core/Utils/Property.hh index ab26d9d3..fcea04d9 100644 --- a/src/OpenMesh/Core/Utils/Property.hh +++ b/src/OpenMesh/Core/Utils/Property.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_PROPERTY_HH #define OPENMESH_PROPERTY_HH diff --git a/src/OpenMesh/Core/Utils/PropertyContainer.hh b/src/OpenMesh/Core/Utils/PropertyContainer.hh index d8d7393d..2ce55e0e 100644 --- a/src/OpenMesh/Core/Utils/PropertyContainer.hh +++ b/src/OpenMesh/Core/Utils/PropertyContainer.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_PROPERTYCONTAINER #define OPENMESH_PROPERTYCONTAINER diff --git a/src/OpenMesh/Core/Utils/PropertyManager.hh b/src/OpenMesh/Core/Utils/PropertyManager.hh index ae8ad189..ea5f0e1c 100644 --- a/src/OpenMesh/Core/Utils/PropertyManager.hh +++ b/src/OpenMesh/Core/Utils/PropertyManager.hh @@ -39,16 +39,11 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - #ifndef PROPERTYMANAGER_HH_ #define PROPERTYMANAGER_HH_ +#include +#include #include #include #include @@ -60,35 +55,23 @@ namespace OpenMesh { * It also defines convenience operators to access the encapsulated * property's value. * - * For C++11, it is recommended to use the factory functions - * makePropertyManagerFromNew, makePropertyManagerFromExisting, - * makePropertyManagerFromExistingOrNew to construct a PropertyManager, e.g. + * It is recommended to use the factory functions + * makeTemporaryProperty(), getProperty(), and getOrMakeProperty() + * to construct a PropertyManager, e.g. * * \code - * TriMesh mesh; - * auto visited = makePropertyManagerFromNew>(mesh, "visited.plugin-example.i8.informatik.rwth-aachen.de"); + * { + * TriMesh mesh; + * auto visited = makeTemporaryProperty(mesh); * - * for (auto vh : mesh.vertices()) { - * if (!visited[vh]) { - * visitComponent(mesh, vh, visited); + * for (auto vh : mesh.vertices()) { + * if (!visited[vh]) { + * visitComponent(mesh, vh, visited); + * } * } + * // The property is automatically removed at the end of the scope * } * \endcode - * - * For C++98, it is usually more convenient to use the constructor explicitly, - * i.e. - * - * \code - * TriMesh mesh; - * PropertyManager, TriMesh> visited(mesh, "visited.plugin-example.i8.informatik.rwth-aachen.de"); - * - * for (TriMesh::VertexIter vh_it = mesh.begin(); ... ; ...) { - * if (!visited[*vh_it]) { - * visitComponent(mesh, *vh_it, visited); - * } - * } - * \endcode - * */ template class PropertyManager { @@ -493,19 +476,127 @@ class PropertyManager { std::string name_; }; -/** \relates PropertyManager +/** @relates PropertyManager + * + * Creates a new property whose lifetime is limited to the current scope. + * + * Used for temporary properties. Shadows any existing properties of + * matching name and type. + * + * Example: + * @code + * PolyMesh m; + * { + * auto is_quad = makeTemporaryProperty(m); + * for (auto& fh : m.faces()) { + * is_quad[fh] = (m.valence(fh) == 4); + * } + * // The property is automatically removed from the mesh at the end of the scope. + * } + * @endcode + * + * @param mesh The mesh on which the property is created + * @param propname (optional) The name of the created property + * @tparam ElementT Element type of the created property, e.g. VertexHandle, HalfedgeHandle, etc. + * @tparam T Value type of the created property, e.g., \p double, \p int, etc. + * @tparam MeshT Type of the mesh. Can often be inferred from \p mesh + * @returns A PropertyManager handling the lifecycle of the property + */ +template +PropertyManager::type, MeshT> +makeTemporaryProperty(MeshT &mesh, const char *propname = "") { + return PropertyManager::type, MeshT>(mesh, propname, false); +} + +/** @relates PropertyManager + * + * Obtains a handle to a named property. + * + * Example: + * @code + * PolyMesh m; + * { + * try { + * auto is_quad = getProperty(m, "is_quad"); + * // Use is_quad here. + * } + * catch (const std::runtime_error& e) { + * // There is no is_quad face property on the mesh. + * } + * } + * @endcode + * + * @pre Property with the name \p propname of matching type exists. + * @throws std::runtime_error if no property with the name \p propname of + * matching type exists. + * @param mesh The mesh on which the property is created + * @param propname The name of the created property + * @tparam ElementT Element type of the created property, e.g. VertexHandle, HalfedgeHandle, etc. + * @tparam T Value type of the created property, e.g., \p double, \p int, etc. + * @tparam MeshT Type of the mesh. Can often be inferred from \p mesh + * @returns A PropertyManager wrapping the property + */ +template +PropertyManager::type, MeshT> +getProperty(MeshT &mesh, const char *propname) { + return PropertyManager::type, MeshT>(mesh, propname, true); +} + +/** @relates PropertyManager + * + * Obtains a handle to a named property if it exists or creates a new one otherwise. + * + * Used for creating or accessing permanent properties. + * + * Example: + * @code + * PolyMesh m; + * { + * auto is_quad = getOrMakeProperty(m, "is_quad"); + * for (auto& fh : m.faces()) { + * is_quad[fh] = (m.valence(fh) == 4); + * } + * // The property remains on the mesh after the end of the scope. + * } + * { + * // Retrieve the property from the previous scope. + * auto is_quad = getOrMakeProperty(m, "is_quad"); + * // Use is_quad here. + * } + * @endcode + * + * @param mesh The mesh on which the property is created + * @param propname The name of the created property + * @tparam ElementT Element type of the created property, e.g. VertexHandle, HalfedgeHandle, etc. + * @tparam T Value type of the created property, e.g., \p double, \p int, etc. + * @tparam MeshT Type of the mesh. Can often be inferred from \p mesh + * @returns A PropertyManager wrapping the property + */ +template +PropertyManager::type, MeshT> +getOrMakeProperty(MeshT &mesh, const char *propname) { + return PropertyManager::type, MeshT>::createIfNotExists(mesh, propname); +} + +/** @relates PropertyManager + * @deprecated Use makeTemporaryProperty() instead. + * * Creates a new property whose lifecycle is managed by the returned * PropertyManager. * - * Intended for temporary properties. Shadows any existsing properties of + * Intended for temporary properties. Shadows any existing properties of * matching name and type. */ template -PropertyManager makePropertyManagerFromNew(MeshT &mesh, const char *propname) { +OM_DEPRECATED("Use makeTemporaryProperty instead.") +PropertyManager makePropertyManagerFromNew(MeshT &mesh, const char *propname) +{ return PropertyManager(mesh, propname, false); } /** \relates PropertyManager + * @deprecated Use getProperty() instead. + * * Creates a non-owning wrapper for an existing mesh property (no lifecycle * management). * @@ -516,22 +607,28 @@ PropertyManager makePropertyManagerFromNew(MeshT &mesh, const c * matching type exists. */ template -PropertyManager makePropertyManagerFromExisting(MeshT &mesh, const char *propname) { +OM_DEPRECATED("Use getProperty instead.") +PropertyManager makePropertyManagerFromExisting(MeshT &mesh, const char *propname) +{ return PropertyManager(mesh, propname, true); } -/** \relates PropertyManager +/** @relates PropertyManager + * @deprecated Use getOrMakeProperty() instead. + * * Creates a non-owning wrapper for a mesh property (no lifecycle management). * If the given property does not exist, it is created. * * Intended for creating or accessing persistent properties. */ template -PropertyManager makePropertyManagerFromExistingOrNew(MeshT &mesh, const char *propname) { +OM_DEPRECATED("Use getOrMakeProperty instead.") +PropertyManager makePropertyManagerFromExistingOrNew(MeshT &mesh, const char *propname) +{ return PropertyManager::createIfNotExists(mesh, propname); } -/** \relates PropertyManager +/** @relates PropertyManager * Like the two parameter version of makePropertyManagerFromExistingOrNew() * except it initializes the property with the specified value over the * specified range if it needs to be created. If the property already exists, @@ -552,7 +649,7 @@ PropertyManager makePropertyManagerFromExistingOrNew( mesh, propname, begin, end, init_value); } -/** \relates PropertyManager +/** @relates PropertyManager * Like the two parameter version of makePropertyManagerFromExistingOrNew() * except it initializes the property with the specified value over the * specified range if it needs to be created. If the property already exists, diff --git a/src/OpenMesh/Core/Utils/RandomNumberGenerator.cc b/src/OpenMesh/Core/Utils/RandomNumberGenerator.cc index 83222b61..9d876392 100644 --- a/src/OpenMesh/Core/Utils/RandomNumberGenerator.cc +++ b/src/OpenMesh/Core/Utils/RandomNumberGenerator.cc @@ -39,14 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 362 $ * - * $Date: 2011-01-26 10:21:12 +0100 (Mi, 26 Jan 2011) $ * - * * -\*===========================================================================*/ - - //============================================================================= // // Helper Functions for generating a random number between 0.0 and 1.0 with diff --git a/src/OpenMesh/Core/Utils/RandomNumberGenerator.hh b/src/OpenMesh/Core/Utils/RandomNumberGenerator.hh index aaedfcdf..c0b2be3d 100644 --- a/src/OpenMesh/Core/Utils/RandomNumberGenerator.hh +++ b/src/OpenMesh/Core/Utils/RandomNumberGenerator.hh @@ -39,18 +39,10 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 693 $ * - * $Date: 2012-09-23 16:25:16 +0200 (So, 23 Sep 2012) $ * - * * -\*===========================================================================*/ - - //============================================================================= // // Helper Functions for generating a random number between 0.0 and 1.0 with -// a garantueed resolution +// a guaranteed resolution // //============================================================================= diff --git a/src/OpenMesh/Core/Utils/SingletonT.cc b/src/OpenMesh/Core/Utils/SingletonT.cc index abc189ad..6ad23d66 100644 --- a/src/OpenMesh/Core/Utils/SingletonT.cc +++ b/src/OpenMesh/Core/Utils/SingletonT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/SingletonT.hh b/src/OpenMesh/Core/Utils/SingletonT.hh index b0745c40..1f0fe395 100644 --- a/src/OpenMesh/Core/Utils/SingletonT.hh +++ b/src/OpenMesh/Core/Utils/SingletonT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/color_cast.hh b/src/OpenMesh/Core/Utils/color_cast.hh index 0dd9901c..8ed6f5a2 100644 --- a/src/OpenMesh/Core/Utils/color_cast.hh +++ b/src/OpenMesh/Core/Utils/color_cast.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/vector_cast.hh b/src/OpenMesh/Core/Utils/vector_cast.hh index 39fca197..07e0794b 100644 --- a/src/OpenMesh/Core/Utils/vector_cast.hh +++ b/src/OpenMesh/Core/Utils/vector_cast.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/Utils/vector_traits.hh b/src/OpenMesh/Core/Utils/vector_traits.hh index fb78b3c5..801eb5c4 100644 --- a/src/OpenMesh/Core/Utils/vector_traits.hh +++ b/src/OpenMesh/Core/Utils/vector_traits.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Core/VS2008Core.vcproj b/src/OpenMesh/Core/VS2008Core.vcproj deleted file mode 100644 index 77963cf6..00000000 --- a/src/OpenMesh/Core/VS2008Core.vcproj +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/OpenMesh/Examples/Tutorial01/cube.cc b/src/OpenMesh/Examples/Tutorial01/cube.cc index 49b309eb..33f22ae5 100644 --- a/src/OpenMesh/Examples/Tutorial01/cube.cc +++ b/src/OpenMesh/Examples/Tutorial01/cube.cc @@ -39,14 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 1258 $ * - * $Date: 2015-04-28 15:07:46 +0200 (Di, 28 Apr 2015) $ * - * * - \*===========================================================================*/ - - #include // -------------------- OpenMesh #include diff --git a/src/OpenMesh/Examples/Tutorial08/delete_geometry.cc b/src/OpenMesh/Examples/Tutorial08/delete_geometry.cc index 10fe08f3..5614bf31 100644 --- a/src/OpenMesh/Examples/Tutorial08/delete_geometry.cc +++ b/src/OpenMesh/Examples/Tutorial08/delete_geometry.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 1258 $ * - * $Date: 2015-04-28 15:07:46 +0200 (Di, 28 Apr 2015) $ * - * * - \*===========================================================================*/ - #include // -------------------- OpenMesh diff --git a/src/OpenMesh/Tools/Decimater/BaseDecimaterT.cc b/src/OpenMesh/Tools/Decimater/BaseDecimaterT.cc index b36778fe..c5748d6d 100644 --- a/src/OpenMesh/Tools/Decimater/BaseDecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/BaseDecimaterT.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ - /** \file DecimaterT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/BaseDecimaterT.hh b/src/OpenMesh/Tools/Decimater/BaseDecimaterT.hh index 3006f6ae..24def882 100644 --- a/src/OpenMesh/Tools/Decimater/BaseDecimaterT.hh +++ b/src/OpenMesh/Tools/Decimater/BaseDecimaterT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file BaseDecimaterT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/CollapseInfoT.hh b/src/OpenMesh/Tools/Decimater/CollapseInfoT.hh index 4212e822..ed648bc4 100644 --- a/src/OpenMesh/Tools/Decimater/CollapseInfoT.hh +++ b/src/OpenMesh/Tools/Decimater/CollapseInfoT.hh @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file CollapseInfoT.hh Provides data class CollapseInfoT for storing all information diff --git a/src/OpenMesh/Tools/Decimater/DecimaterT.cc b/src/OpenMesh/Tools/Decimater/DecimaterT.cc index 2ca41a7c..24b3b195 100644 --- a/src/OpenMesh/Tools/Decimater/DecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/DecimaterT.cc @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file DecimaterT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/DecimaterT.hh b/src/OpenMesh/Tools/Decimater/DecimaterT.hh index 55cf080f..c203e88a 100644 --- a/src/OpenMesh/Tools/Decimater/DecimaterT.hh +++ b/src/OpenMesh/Tools/Decimater/DecimaterT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file DecimaterT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc index 4dc813af..aea2edbe 100644 --- a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file McDecimaterT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/McDecimaterT.hh b/src/OpenMesh/Tools/Decimater/McDecimaterT.hh index 82e1fd6b..0946fe96 100644 --- a/src/OpenMesh/Tools/Decimater/McDecimaterT.hh +++ b/src/OpenMesh/Tools/Decimater/McDecimaterT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file McDecimaterT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/MixedDecimaterT.cc b/src/OpenMesh/Tools/Decimater/MixedDecimaterT.cc index bb21f39d..1bca8be1 100644 --- a/src/OpenMesh/Tools/Decimater/MixedDecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/MixedDecimaterT.cc @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ -* * -* $Revision$ * -* $Date$ * -* * -\*===========================================================================*/ /** \file MixedDecimaterT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/MixedDecimaterT.hh b/src/OpenMesh/Tools/Decimater/MixedDecimaterT.hh index cf52a5ad..368e338c 100644 --- a/src/OpenMesh/Tools/Decimater/MixedDecimaterT.hh +++ b/src/OpenMesh/Tools/Decimater/MixedDecimaterT.hh @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file MixedDecimaterT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc index ec79f852..ef4ac9ae 100644 --- a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc +++ b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file ModAspectRatioT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh index d22325f2..2eb1db0d 100644 --- a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh +++ b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file ModAspectRatioT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/ModBaseT.hh b/src/OpenMesh/Tools/Decimater/ModBaseT.hh index 034ba5e9..d972cda6 100644 --- a/src/OpenMesh/Tools/Decimater/ModBaseT.hh +++ b/src/OpenMesh/Tools/Decimater/ModBaseT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file ModBaseT.hh Base class for all decimation modules. diff --git a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc index bfd45e52..d50eec81 100644 --- a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc +++ b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file ModEdgeLengthT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh index f50878d3..6063dce6 100644 --- a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh +++ b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file ModEdgeLengthT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc b/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc index 3701a461..315bc722 100644 --- a/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc +++ b/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ /** \file ModHausdorffT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh b/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh index caad8c5a..30310cba 100644 --- a/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh +++ b/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ /** \file ModHausdorffT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh b/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh index e4d79f62..88d62b8b 100644 --- a/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh +++ b/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * - \*===========================================================================*/ - /** \file ModQuadricT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh index 0415b042..191c0c2a 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ /** \file ModNormalDeviationT.hh */ diff --git a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh index 2fd3a180..b58fb568 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file ModNormalFlippingT.hh diff --git a/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc b/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc index 04af1e91..a31f8c09 100644 --- a/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc +++ b/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file ModProgMeshT.cc */ diff --git a/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh b/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh index 55325b40..e7b89ee0 100644 --- a/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh +++ b/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file ModProgMeshT.hh diff --git a/src/OpenMesh/Tools/Decimater/ModQuadricT.cc b/src/OpenMesh/Tools/Decimater/ModQuadricT.cc index 0b461476..f75b6991 100644 --- a/src/OpenMesh/Tools/Decimater/ModQuadricT.cc +++ b/src/OpenMesh/Tools/Decimater/ModQuadricT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file ModQuadricT.cc Bodies of template member function. diff --git a/src/OpenMesh/Tools/Decimater/ModQuadricT.hh b/src/OpenMesh/Tools/Decimater/ModQuadricT.hh index 41835a84..7514a8a6 100644 --- a/src/OpenMesh/Tools/Decimater/ModQuadricT.hh +++ b/src/OpenMesh/Tools/Decimater/ModQuadricT.hh @@ -39,14 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - - //============================================================================= // // CLASS ModQuadricT diff --git a/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh b/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh index 622947bf..32fde82a 100644 --- a/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh +++ b/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file ModRoundnessT.hh diff --git a/src/OpenMesh/Tools/Decimater/Observer.cc b/src/OpenMesh/Tools/Decimater/Observer.cc index 6a39e9c1..5e5c5939 100644 --- a/src/OpenMesh/Tools/Decimater/Observer.cc +++ b/src/OpenMesh/Tools/Decimater/Observer.cc @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 1197 $ * - * $Date: 2015-01-15 11:19:39 +0100 (Do, 15 Jan 2015) $ * - * * - \*===========================================================================*/ /** \file Observer.cc */ diff --git a/src/OpenMesh/Tools/Decimater/Observer.hh b/src/OpenMesh/Tools/Decimater/Observer.hh index f42b300d..d690209a 100644 --- a/src/OpenMesh/Tools/Decimater/Observer.hh +++ b/src/OpenMesh/Tools/Decimater/Observer.hh @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 1199 $ * - * $Date: 2015-01-16 08:47:33 +0100 (Fr, 16 Jan 2015) $ * - * * -\*===========================================================================*/ - /** \file Observer.hh * * This file contains an observer class which is used to monitor the progress diff --git a/src/OpenMesh/Tools/Dualizer/meshDualT.hh b/src/OpenMesh/Tools/Dualizer/meshDualT.hh index ab006f0d..4c221669 100644 --- a/src/OpenMesh/Tools/Dualizer/meshDualT.hh +++ b/src/OpenMesh/Tools/Dualizer/meshDualT.hh @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - /* Compute the dual of a mesh: - each face of the original mesh is replaced by a vertex at the center of gravity of the vertices of the face diff --git a/src/OpenMesh/Tools/Kernel_OSG/ArrayKernelT.hh b/src/OpenMesh/Tools/Kernel_OSG/ArrayKernelT.hh index 774faf97..07117167 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/ArrayKernelT.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/ArrayKernelT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Tools/Kernel_OSG/AttribKernelT.hh b/src/OpenMesh/Tools/Kernel_OSG/AttribKernelT.hh index 6849905e..01b63bd1 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/AttribKernelT.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/AttribKernelT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_KERNEL_OSG_ATTRIBKERNEL_HH #define OPENMESH_KENREL_OSG_ATTRIBKERNEL_HH diff --git a/src/OpenMesh/Tools/Kernel_OSG/PropertyKernel.hh b/src/OpenMesh/Tools/Kernel_OSG/PropertyKernel.hh index b2ec6a33..5d58e4e5 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/PropertyKernel.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/PropertyKernel.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_KERNEL_OSG_PROPERTYKERNEL_HH #define OPENMESH_KENREL_OSG_PROPERTYKERNEL_HH diff --git a/src/OpenMesh/Tools/Kernel_OSG/PropertyT.hh b/src/OpenMesh/Tools/Kernel_OSG/PropertyT.hh index 2530217f..47990e58 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/PropertyT.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/PropertyT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_KERNEL_OSG_PROPERTYT_HH #define OPENMESH_KERNEL_OSG_PROPERTYT_HH diff --git a/src/OpenMesh/Tools/Kernel_OSG/Traits.hh b/src/OpenMesh/Tools/Kernel_OSG/Traits.hh index bc87c01c..73593488 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/Traits.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/Traits.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Tools/Kernel_OSG/Traits.hh diff --git a/src/OpenMesh/Tools/Kernel_OSG/TriMesh_OSGArrayKernelT.hh b/src/OpenMesh/Tools/Kernel_OSG/TriMesh_OSGArrayKernelT.hh index ff4bd91d..e0800215 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/TriMesh_OSGArrayKernelT.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/TriMesh_OSGArrayKernelT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Tools/Kernel_OSG/VectorAdapter.hh b/src/OpenMesh/Tools/Kernel_OSG/VectorAdapter.hh index bb545d30..dac7b5af 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/VectorAdapter.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/VectorAdapter.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + // ---------------------------------------------------------------------------- diff --git a/src/OpenMesh/Tools/Kernel_OSG/bindT.hh b/src/OpenMesh/Tools/Kernel_OSG/bindT.hh index c93f2c85..bcb859fa 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/bindT.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/bindT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file bindT.hh diff --git a/src/OpenMesh/Tools/Kernel_OSG/color_cast.hh b/src/OpenMesh/Tools/Kernel_OSG/color_cast.hh index df4bb3eb..e4f79739 100644 --- a/src/OpenMesh/Tools/Kernel_OSG/color_cast.hh +++ b/src/OpenMesh/Tools/Kernel_OSG/color_cast.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_KERNEL_OSG_COLOR_CAST_HH #define OPENMESH_KERNEL_OSG_COLOR_CAST_HH diff --git a/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.cc b/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.cc index b75e4cef..b88330fa 100644 --- a/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.cc +++ b/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - #define OPENMESH_SMARTTAGGERT_C //== INCLUDES ================================================================= diff --git a/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.hh b/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.hh index fb69f587..182b0d5e 100644 --- a/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.hh +++ b/src/OpenMesh/Tools/SmartTagger/SmartTaggerT.hh @@ -39,14 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - - #pragma once diff --git a/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc b/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc index f038006f..46bb91c8 100644 --- a/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc +++ b/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file JacobiLaplaceSmootherT.cc diff --git a/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.hh b/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.hh index 1d9ae6b3..1085cbc1 100644 --- a/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.hh +++ b/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file JacobiLaplaceSmootherT.hh diff --git a/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc b/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc index a9623222..1d29e023 100644 --- a/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc +++ b/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file LaplaceSmootherT.cc diff --git a/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.hh b/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.hh index 98dd5f39..c580b80e 100644 --- a/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.hh +++ b/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file LaplaceSmootherT.hh diff --git a/src/OpenMesh/Tools/Smoother/SmootherT.cc b/src/OpenMesh/Tools/Smoother/SmootherT.cc index c727aeba..d54dcd48 100644 --- a/src/OpenMesh/Tools/Smoother/SmootherT.cc +++ b/src/OpenMesh/Tools/Smoother/SmootherT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file SmootherT.cc diff --git a/src/OpenMesh/Tools/Smoother/SmootherT.hh b/src/OpenMesh/Tools/Smoother/SmootherT.hh index 65d37643..0feab32c 100644 --- a/src/OpenMesh/Tools/Smoother/SmootherT.hh +++ b/src/OpenMesh/Tools/Smoother/SmootherT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file SmootherT.hh diff --git a/src/OpenMesh/Tools/Smoother/smooth_mesh.hh b/src/OpenMesh/Tools/Smoother/smooth_mesh.hh index fad9d67a..51a0fc4d 100644 --- a/src/OpenMesh/Tools/Smoother/smooth_mesh.hh +++ b/src/OpenMesh/Tools/Smoother/smooth_mesh.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef SMOOTH_MESH_HH #define SMOOTH_MESH_HH diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc index 049f5680..ea36521b 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - /** \file Adaptive/Composite/CompositeT.cc */ diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.hh b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.hh index c6bb4b00..b33e56f5 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.hh +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Adaptive/Composite/CompositeT.hh diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeTraits.hh b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeTraits.hh index d930d064..8418177d 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeTraits.hh +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeTraits.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Subdivider/Adaptive/Composite/CompositeTraits.hh Mesh traits for adaptive composite subdivider. diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh index 33046b5c..bf5867ef 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc index 1213cab7..a5141332 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file RulesT.cc diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh index 75d29817..d039c7c2 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file RulesT.hh diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/Traits.hh b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/Traits.hh index a915c1fa..06addf8a 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/Traits.hh +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/Traits.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Composite/Traits.hh diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc b/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc index 1813c2fe..a117618f 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc +++ b/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 520 $ * - * $Date: 2012-01-20 15:29:31 +0100 (Fr, 20 Jan 2012) $ * - * * -\*===========================================================================*/ - //============================================================================= // // CLASS CatmullClarkT - IMPLEMENTATION diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.hh index c756a0fa..06342109 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.hh @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision: 520 $ * - * $Date: 2012-01-20 15:29:31 +0100 (Fr, 20 Jan 2012) $ * - * * -\*===========================================================================*/ - /** \file CatmullClarkT.hh */ diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc index 621d3b9c..91213b6a 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Uniform/Composite/CompositeT.cc diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh index 6566d0a9..f16962dc 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Uniform/Composite/CompositeT.hh diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeTraits.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeTraits.hh index 0ba352f5..2241cc26 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeTraits.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeTraits.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Uniform/Composite/CompositeTraits.hh Mesh traits for uniform composite subdivision. diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/CompositeLoopT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/CompositeLoopT.hh index ad2f3bf7..a52db9f4 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/CompositeLoopT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/CompositeLoopT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file CompositeLoopT.hh diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/CompositeSqrt3T.hh b/src/OpenMesh/Tools/Subdivider/Uniform/CompositeSqrt3T.hh index 28705938..c9af0fcb 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/CompositeSqrt3T.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/CompositeSqrt3T.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file CompositeSqrt3T.hh diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh index c689af3f..3690695a 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh @@ -39,12 +39,6 @@ * * * ========================================================================= */ -/*==========================================================================*\ -* * -* $Revision: 410 $ * -* $Date: 2010-06-17 12:45:58 +0200 (Do, 17. Jun 2010) $ * -* * -\*==========================================================================*/ /** \file LongestEdgeT.hh diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh index 7701b000..2965ddb9 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file LoopT.hh diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh index 5825c9b8..96a8f868 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*==========================================================================*\ -* * -* $Revision: 410 $ * -* $Date: 2010-06-17 12:45:58 +0200 (Do, 17. Jun 2010) $ * -* * -\*==========================================================================*/ - /** \file ModifiedButterFlyT.hh The modified butterfly scheme of Denis Zorin, Peter Schröder and Wim Sweldens, diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh index 903b39ba..5d4182cc 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh @@ -39,13 +39,6 @@ * * * ========================================================================= */ -/*==========================================================================*\ -* * -* $Revision: 410 $ * -* $Date: 2010-06-17 12:45:58 +0200 (Do, 17. Jun 2010) $ * -* * -\*==========================================================================*/ - /** \file Sqrt3InterpolatingSubdividerLabsikGreinerT.hh * * Interpolating Labsik Greiner Subdivider as described in diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh index 77e0e6b0..dcea039b 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3T.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Sqrt3T.hh diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh index 08b2c0b4..a27c038f 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file SubdividerT.hh diff --git a/src/OpenMesh/Tools/Utils/Config.hh b/src/OpenMesh/Tools/Utils/Config.hh index 4bfe4e98..c023c908 100644 --- a/src/OpenMesh/Tools/Utils/Config.hh +++ b/src/OpenMesh/Tools/Utils/Config.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Tools/Utils/Config.hh */ diff --git a/src/OpenMesh/Tools/Utils/GLConstAsString.hh b/src/OpenMesh/Tools/Utils/GLConstAsString.hh index 1e6bd7c5..eaca4a5d 100644 --- a/src/OpenMesh/Tools/Utils/GLConstAsString.hh +++ b/src/OpenMesh/Tools/Utils/GLConstAsString.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/Utils/HeapT.hh b/src/OpenMesh/Tools/Utils/HeapT.hh index 63c27c25..e4f0ba63 100644 --- a/src/OpenMesh/Tools/Utils/HeapT.hh +++ b/src/OpenMesh/Tools/Utils/HeapT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Tools/Utils/HeapT.hh A generic heap class diff --git a/src/OpenMesh/Tools/Utils/MeshCheckerT.cc b/src/OpenMesh/Tools/Utils/MeshCheckerT.cc index 2c5f80df..a8c533f1 100644 --- a/src/OpenMesh/Tools/Utils/MeshCheckerT.cc +++ b/src/OpenMesh/Tools/Utils/MeshCheckerT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #define OPENMESH_MESHCHECKER_C diff --git a/src/OpenMesh/Tools/Utils/MeshCheckerT.hh b/src/OpenMesh/Tools/Utils/MeshCheckerT.hh index 2357ab26..95efff8f 100644 --- a/src/OpenMesh/Tools/Utils/MeshCheckerT.hh +++ b/src/OpenMesh/Tools/Utils/MeshCheckerT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_MESHCHECKER_HH diff --git a/src/OpenMesh/Tools/Utils/NumLimitsT.hh b/src/OpenMesh/Tools/Utils/NumLimitsT.hh index 39117ebc..9c679f36 100644 --- a/src/OpenMesh/Tools/Utils/NumLimitsT.hh +++ b/src/OpenMesh/Tools/Utils/NumLimitsT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + /** \file Tools/Utils/NumLimitsT.hh Temporary solution until std::numeric_limits is standard. diff --git a/src/OpenMesh/Tools/Utils/StripifierT.cc b/src/OpenMesh/Tools/Utils/StripifierT.cc index 8bd33727..3f86d1f3 100644 --- a/src/OpenMesh/Tools/Utils/StripifierT.cc +++ b/src/OpenMesh/Tools/Utils/StripifierT.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/Utils/StripifierT.hh b/src/OpenMesh/Tools/Utils/StripifierT.hh index 61f5182f..2197157a 100644 --- a/src/OpenMesh/Tools/Utils/StripifierT.hh +++ b/src/OpenMesh/Tools/Utils/StripifierT.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/Utils/TestingFramework.hh b/src/OpenMesh/Tools/Utils/TestingFramework.hh index 9c824388..ee34f721 100644 --- a/src/OpenMesh/Tools/Utils/TestingFramework.hh +++ b/src/OpenMesh/Tools/Utils/TestingFramework.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef TESTINGFRAMEWORK_HH #define TESTINGFRAMEWORK_HH diff --git a/src/OpenMesh/Tools/Utils/Timer.cc b/src/OpenMesh/Tools/Utils/Timer.cc index 98d6e409..72ae0f0e 100644 --- a/src/OpenMesh/Tools/Utils/Timer.cc +++ b/src/OpenMesh/Tools/Utils/Timer.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef DOXY_IGNORE_THIS // ---------------------------------------------------------------------------- diff --git a/src/OpenMesh/Tools/Utils/Timer.hh b/src/OpenMesh/Tools/Utils/Timer.hh index 91347c21..12fa6be0 100644 --- a/src/OpenMesh/Tools/Utils/Timer.hh +++ b/src/OpenMesh/Tools/Utils/Timer.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef TIMER_HH #define TIMER_HH diff --git a/src/OpenMesh/Tools/Utils/conio.cc b/src/OpenMesh/Tools/Utils/conio.cc index 985fbddb..4d053893 100644 --- a/src/OpenMesh/Tools/Utils/conio.cc +++ b/src/OpenMesh/Tools/Utils/conio.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #include diff --git a/src/OpenMesh/Tools/Utils/conio.hh b/src/OpenMesh/Tools/Utils/conio.hh index b4db158f..58fe5408 100644 --- a/src/OpenMesh/Tools/Utils/conio.hh +++ b/src/OpenMesh/Tools/Utils/conio.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + #ifndef OPENMESH_UTILS_CONIO_HH #define OPENMESH_UTILS_CONIO_HH diff --git a/src/OpenMesh/Tools/VDPM/MeshTraits.hh b/src/OpenMesh/Tools/VDPM/MeshTraits.hh index 438d9266..79acb9ac 100644 --- a/src/OpenMesh/Tools/VDPM/MeshTraits.hh +++ b/src/OpenMesh/Tools/VDPM/MeshTraits.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/StreamingDef.hh b/src/OpenMesh/Tools/VDPM/StreamingDef.hh index d3539df4..bd187856 100644 --- a/src/OpenMesh/Tools/VDPM/StreamingDef.hh +++ b/src/OpenMesh/Tools/VDPM/StreamingDef.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/VFront.cc b/src/OpenMesh/Tools/VDPM/VFront.cc index 8c50e910..b83a9704 100644 --- a/src/OpenMesh/Tools/VDPM/VFront.cc +++ b/src/OpenMesh/Tools/VDPM/VFront.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/VFront.hh b/src/OpenMesh/Tools/VDPM/VFront.hh index a53dc0c7..1d77a6bb 100644 --- a/src/OpenMesh/Tools/VDPM/VFront.hh +++ b/src/OpenMesh/Tools/VDPM/VFront.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/VHierarchy.cc b/src/OpenMesh/Tools/VDPM/VHierarchy.cc index f28be46d..233abb73 100644 --- a/src/OpenMesh/Tools/VDPM/VHierarchy.cc +++ b/src/OpenMesh/Tools/VDPM/VHierarchy.cc @@ -37,144 +37,139 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * - * ========================================================================= */ - -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ - -//============================================================================= -// -// CLASS newClass - IMPLEMENTATION -// -//============================================================================= - - -//== INCLUDES ================================================================= - -#include - - -//== NAMESPACES =============================================================== - -namespace OpenMesh { -namespace VDPM { - -//== IMPLEMENTATION ========================================================== - - -VHierarchy:: + * ========================================================================= */ + + + +//============================================================================= +// +// CLASS newClass - IMPLEMENTATION +// +//============================================================================= + + +//== INCLUDES ================================================================= + +#include + + +//== NAMESPACES =============================================================== + +namespace OpenMesh { +namespace VDPM { + +//== IMPLEMENTATION ========================================================== + + +VHierarchy:: VHierarchy() : - n_roots_(0), tree_id_bits_(0) -{ - clear(); -} - -void -VHierarchy:: -set_num_roots(unsigned int _n_roots) -{ - n_roots_ = _n_roots; - - tree_id_bits_ = 0; - while (n_roots_ > ((unsigned int) 0x00000001 << tree_id_bits_)) - ++tree_id_bits_; -} - - -VHierarchyNodeHandle -VHierarchy:: -add_node() -{ - return add_node(VHierarchyNode()); -} - -VHierarchyNodeHandle -VHierarchy:: -add_node(const VHierarchyNode &_node) -{ - nodes_.push_back(_node); - - return VHierarchyNodeHandle(int(nodes_.size() - 1)); -} - - -void -VHierarchy:: -make_children(VHierarchyNodeHandle &_parent_handle) -{ - VHierarchyNodeHandle lchild_handle = add_node(); - VHierarchyNodeHandle rchild_handle = add_node(); - - VHierarchyNode &parent = node(_parent_handle); - VHierarchyNode &lchild = node(lchild_handle); - VHierarchyNode &rchild = node(rchild_handle); - - parent.set_children_handle(lchild_handle); - lchild.set_parent_handle(_parent_handle); - rchild.set_parent_handle(_parent_handle); - - lchild.set_index(VHierarchyNodeIndex(parent.node_index().tree_id(tree_id_bits_), 2*parent.node_index().node_id(tree_id_bits_), tree_id_bits_)); - rchild.set_index(VHierarchyNodeIndex(parent.node_index().tree_id(tree_id_bits_), 2*parent.node_index().node_id(tree_id_bits_)+1, tree_id_bits_)); -} - -VHierarchyNodeHandle -VHierarchy:: -node_handle(VHierarchyNodeIndex _node_index) -{ - if (_node_index.is_valid(tree_id_bits_) != true) - return InvalidVHierarchyNodeHandle; - - VHierarchyNodeHandle node_handle = root_handle(_node_index.tree_id(tree_id_bits_)); - unsigned int node_id = _node_index.node_id(tree_id_bits_); - unsigned int flag = 0x80000000; - - while (!(node_id & flag)) flag >>= 1; - flag >>= 1; - - while (flag > 0 && is_leaf_node(node_handle) != true) - { - if (node_id & flag) // 1: rchild - { - node_handle = rchild_handle(node_handle); - } - else // 0: lchild - { - node_handle = lchild_handle(node_handle); - } - flag >>= 1; - } - - return node_handle; -} - -bool -VHierarchy:: -is_ancestor(VHierarchyNodeIndex _ancestor_index, VHierarchyNodeIndex _descendent_index) -{ - if (_ancestor_index.tree_id(tree_id_bits_) != _descendent_index.tree_id(tree_id_bits_)) - return false; - - unsigned int ancestor_node_id = _ancestor_index.node_id(tree_id_bits_); - unsigned int descendent_node_id = _descendent_index.node_id(tree_id_bits_); - - if (ancestor_node_id > descendent_node_id) - return false; - - while (descendent_node_id > 0) - { - if (ancestor_node_id == descendent_node_id) - return true; - descendent_node_id >>= 1; // descendent_node_id /= 2 - } - - return false; -} - -//============================================================================= -} // namespace VDPM -} // namespace OpenMesh -//============================================================================= + n_roots_(0), tree_id_bits_(0) +{ + clear(); +} + +void +VHierarchy:: +set_num_roots(unsigned int _n_roots) +{ + n_roots_ = _n_roots; + + tree_id_bits_ = 0; + while (n_roots_ > ((unsigned int) 0x00000001 << tree_id_bits_)) + ++tree_id_bits_; +} + + +VHierarchyNodeHandle +VHierarchy:: +add_node() +{ + return add_node(VHierarchyNode()); +} + +VHierarchyNodeHandle +VHierarchy:: +add_node(const VHierarchyNode &_node) +{ + nodes_.push_back(_node); + + return VHierarchyNodeHandle(int(nodes_.size() - 1)); +} + + +void +VHierarchy:: +make_children(VHierarchyNodeHandle &_parent_handle) +{ + VHierarchyNodeHandle lchild_handle = add_node(); + VHierarchyNodeHandle rchild_handle = add_node(); + + VHierarchyNode &parent = node(_parent_handle); + VHierarchyNode &lchild = node(lchild_handle); + VHierarchyNode &rchild = node(rchild_handle); + + parent.set_children_handle(lchild_handle); + lchild.set_parent_handle(_parent_handle); + rchild.set_parent_handle(_parent_handle); + + lchild.set_index(VHierarchyNodeIndex(parent.node_index().tree_id(tree_id_bits_), 2*parent.node_index().node_id(tree_id_bits_), tree_id_bits_)); + rchild.set_index(VHierarchyNodeIndex(parent.node_index().tree_id(tree_id_bits_), 2*parent.node_index().node_id(tree_id_bits_)+1, tree_id_bits_)); +} + +VHierarchyNodeHandle +VHierarchy:: +node_handle(VHierarchyNodeIndex _node_index) +{ + if (_node_index.is_valid(tree_id_bits_) != true) + return InvalidVHierarchyNodeHandle; + + VHierarchyNodeHandle node_handle = root_handle(_node_index.tree_id(tree_id_bits_)); + unsigned int node_id = _node_index.node_id(tree_id_bits_); + unsigned int flag = 0x80000000; + + while (!(node_id & flag)) flag >>= 1; + flag >>= 1; + + while (flag > 0 && is_leaf_node(node_handle) != true) + { + if (node_id & flag) // 1: rchild + { + node_handle = rchild_handle(node_handle); + } + else // 0: lchild + { + node_handle = lchild_handle(node_handle); + } + flag >>= 1; + } + + return node_handle; +} + +bool +VHierarchy:: +is_ancestor(VHierarchyNodeIndex _ancestor_index, VHierarchyNodeIndex _descendent_index) +{ + if (_ancestor_index.tree_id(tree_id_bits_) != _descendent_index.tree_id(tree_id_bits_)) + return false; + + unsigned int ancestor_node_id = _ancestor_index.node_id(tree_id_bits_); + unsigned int descendent_node_id = _descendent_index.node_id(tree_id_bits_); + + if (ancestor_node_id > descendent_node_id) + return false; + + while (descendent_node_id > 0) + { + if (ancestor_node_id == descendent_node_id) + return true; + descendent_node_id >>= 1; // descendent_node_id /= 2 + } + + return false; +} + +//============================================================================= +} // namespace VDPM +} // namespace OpenMesh +//============================================================================= diff --git a/src/OpenMesh/Tools/VDPM/VHierarchy.hh b/src/OpenMesh/Tools/VDPM/VHierarchy.hh index 0eca2d61..66d5a02e 100644 --- a/src/OpenMesh/Tools/VDPM/VHierarchy.hh +++ b/src/OpenMesh/Tools/VDPM/VHierarchy.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/VHierarchyNode.hh b/src/OpenMesh/Tools/VDPM/VHierarchyNode.hh index 435ba711..ba892b94 100644 --- a/src/OpenMesh/Tools/VDPM/VHierarchyNode.hh +++ b/src/OpenMesh/Tools/VDPM/VHierarchyNode.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // @@ -96,7 +91,7 @@ class VHierarchyNode { public: - VHierarchyNode() :radius_(0.0f), sin_square_(0.0f),mue_square_(0.0f), sigma_square_(0.0f) { } + VHierarchyNode() :radius_(0.0f), normal_(0.0f), sin_square_(0.0f),mue_square_(0.0f), sigma_square_(0.0f) { } /// Returns true, if node is root else false. bool is_root() const diff --git a/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.cc b/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.cc index c5c1029e..4c553064 100644 --- a/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.cc +++ b/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.hh b/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.hh index 5b17d8ec..928b14fe 100644 --- a/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.hh +++ b/src/OpenMesh/Tools/VDPM/VHierarchyNodeIndex.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/VHierarchyWindow.cc b/src/OpenMesh/Tools/VDPM/VHierarchyWindow.cc index b3aea8f9..18d50558 100644 --- a/src/OpenMesh/Tools/VDPM/VHierarchyWindow.cc +++ b/src/OpenMesh/Tools/VDPM/VHierarchyWindow.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/VHierarchyWindow.hh b/src/OpenMesh/Tools/VDPM/VHierarchyWindow.hh index a490e57b..44d2e2af 100644 --- a/src/OpenMesh/Tools/VDPM/VHierarchyWindow.hh +++ b/src/OpenMesh/Tools/VDPM/VHierarchyWindow.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/ViewingParameters.cc b/src/OpenMesh/Tools/VDPM/ViewingParameters.cc index f32cb802..ab878b7a 100644 --- a/src/OpenMesh/Tools/VDPM/ViewingParameters.cc +++ b/src/OpenMesh/Tools/VDPM/ViewingParameters.cc @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= // diff --git a/src/OpenMesh/Tools/VDPM/ViewingParameters.hh b/src/OpenMesh/Tools/VDPM/ViewingParameters.hh index a23d8fae..a1ff2f1f 100644 --- a/src/OpenMesh/Tools/VDPM/ViewingParameters.hh +++ b/src/OpenMesh/Tools/VDPM/ViewingParameters.hh @@ -39,12 +39,7 @@ * * * ========================================================================= */ -/*===========================================================================*\ - * * - * $Revision$ * - * $Date$ * - * * -\*===========================================================================*/ + //============================================================================= diff --git a/src/OpenMesh/Tools/VS2008Tools.vcproj b/src/OpenMesh/Tools/VS2008Tools.vcproj deleted file mode 100644 index e70cf9e9..00000000 --- a/src/OpenMesh/Tools/VS2008Tools.vcproj +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index ab128f5e..f73e4ddd 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -11,7 +11,7 @@ endif() if ( OPENMESH_BUILD_UNIT_TESTS ) # Search for gtest headers and libraries - find_package(GoogleTest) + find_package(GTest) if(GTEST_FOUND) diff --git a/src/Unittests/TestFiles/cube_poly_version_1_2.om b/src/Unittests/TestFiles/cube_poly_version_1_2.om new file mode 100644 index 00000000..fa583a99 Binary files /dev/null and b/src/Unittests/TestFiles/cube_poly_version_1_2.om differ diff --git a/src/Unittests/TestFiles/cube_poly_version_2_0.om b/src/Unittests/TestFiles/cube_poly_version_2_0.om new file mode 100644 index 00000000..ec32c759 Binary files /dev/null and b/src/Unittests/TestFiles/cube_poly_version_2_0.om differ diff --git a/src/Unittests/TestFiles/cube_tri_version_1_2.om b/src/Unittests/TestFiles/cube_tri_version_1_2.om new file mode 100644 index 00000000..126a2846 Binary files /dev/null and b/src/Unittests/TestFiles/cube_tri_version_1_2.om differ diff --git a/src/Unittests/TestFiles/cube_tri_version_2_0.om b/src/Unittests/TestFiles/cube_tri_version_2_0.om new file mode 100644 index 00000000..70ca37c3 Binary files /dev/null and b/src/Unittests/TestFiles/cube_tri_version_2_0.om differ diff --git a/src/Unittests/TestFiles/cube_tri_version_7_5.om b/src/Unittests/TestFiles/cube_tri_version_7_5.om new file mode 100644 index 00000000..78cead57 Binary files /dev/null and b/src/Unittests/TestFiles/cube_tri_version_7_5.om differ diff --git a/src/Unittests/unittests_convert_meshes.cc b/src/Unittests/unittests_convert_meshes.cc index 6cfd01bc..a86a78d9 100644 --- a/src/Unittests/unittests_convert_meshes.cc +++ b/src/Unittests/unittests_convert_meshes.cc @@ -285,19 +285,15 @@ TEST_F(OpenMeshConvertPolyMeshToTriangle, EdgePropertyCheckDouble) { // Check if it is ok. Mesh::EdgeIter v_it = p.edges_begin(); - if(p.is_boundary( (*v_it) )) EXPECT_EQ( p.property(doubleHandle,*v_it) , 0.0 ) << "Invalid double value for vertex 0"; ++v_it; - if(p.is_boundary( (*v_it) )) EXPECT_EQ( p.property(doubleHandle,*v_it) , 1.0 ) << "Invalid double value for vertex 1"; ++v_it; - if(p.is_boundary( (*v_it) )) EXPECT_EQ( p.property(doubleHandle,*v_it) , 2.0 ) << "Invalid double value for vertex 2"; ++v_it; - if(p.is_boundary( (*v_it) )) EXPECT_EQ( p.property(doubleHandle,*v_it) , 3.0 ) << "Invalid double value for vertex 3"; ++v_it; diff --git a/src/Unittests/unittests_polymesh_collapse.cc b/src/Unittests/unittests_polymesh_collapse.cc new file mode 100644 index 00000000..594dd1b6 --- /dev/null +++ b/src/Unittests/unittests_polymesh_collapse.cc @@ -0,0 +1,70 @@ +#include +#include + +#include + +namespace { + +class OpenMeshCollapsePoly : public OpenMeshBasePoly { + + protected: + + // This function is called before each test is run + virtual void SetUp() { + } + + // This function is called after all tests are through + virtual void TearDown() { + + // Do some final stuff with the member data here... + } + + // Member already defined in OpenMeshBase + //Mesh mesh_; +}; + +/* + * ==================================================================== + * Define tests below + * ==================================================================== + */ + + + + +/* + * This code tests is_collapse_ok on a double sided triangle. The + * test mesh comprises three vertices, that are connected to form two + * triangles of opposite orientation. All halfedges should be non collapsable. + */ +TEST_F(OpenMeshCollapsePoly, CheckCollapseOkDoublesidedTriangle) { + + mesh_.clear(); + + Mesh::VertexHandle vh0 = mesh_.add_vertex(Mesh::Point(0,0,0)); + Mesh::VertexHandle vh1 = mesh_.add_vertex(Mesh::Point(1,0,0)); + Mesh::VertexHandle vh2 = mesh_.add_vertex(Mesh::Point(1,1,0)); + mesh_.add_face(vh0, vh1, vh2); + mesh_.add_face(vh0, vh2, vh1); + + + + mesh_.request_vertex_status(); + mesh_.request_face_status(); + mesh_.request_edge_status(); + + int collapsable = 0; + + for ( const auto hh : mesh_.all_halfedges() ) + { + if (mesh_.is_collapse_ok(hh) ) + collapsable++; + } + + + EXPECT_EQ(collapsable,0) << "No collapse should be ok when we have only a double sided Triangle"; +} + + + +} diff --git a/src/Unittests/unittests_propertymanager.cc b/src/Unittests/unittests_propertymanager.cc index 3fd7b646..2fe59654 100644 --- a/src/Unittests/unittests_propertymanager.cc +++ b/src/Unittests/unittests_propertymanager.cc @@ -93,7 +93,6 @@ TEST_F(OpenMeshPropertyManager, set_range_bool) { ASSERT_TRUE(pm_f_bool[*f_it]); } -#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) /* * Same thing again, this time with C++11 ranges. */ @@ -129,15 +128,13 @@ TEST_F(OpenMeshPropertyManager, set_range_bool) { f_it != f_end; ++f_it) ASSERT_TRUE(pm_f_bool[*f_it]); } -#endif } /* * ==================================================================== - * C++11 Specific Tests + * Factory Functions * ==================================================================== */ -#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) template bool has_property(const Mesh& _mesh, const std::string& _name) { @@ -154,7 +151,7 @@ TEST_F(OpenMeshPropertyManager, cpp11_temp_property) { ASSERT_FALSE(has_property(mesh_, prop_name)); { - auto vprop = OpenMesh::makePropertyManagerFromNew(mesh_, prop_name); + auto vprop = OpenMesh::makeTemporaryProperty(mesh_, prop_name); static_cast(vprop); // Unused variable ASSERT_TRUE(has_property(mesh_, prop_name)); } @@ -172,13 +169,13 @@ TEST_F(OpenMeshPropertyManager, cpp11_temp_property_shadowing) { using handle_type = OpenMesh::VPropHandleT; const auto prop_name = "pm_v_test_property"; - auto outer_prop = OpenMesh::makePropertyManagerFromNew(mesh_, prop_name); + auto outer_prop = OpenMesh::makeTemporaryProperty(mesh_, prop_name); outer_prop[vh] = 100; ASSERT_EQ(100, outer_prop[vh]); { // inner_prop uses same type and name as outer_prop - auto inner_prop = OpenMesh::makePropertyManagerFromNew(mesh_, prop_name); + auto inner_prop = OpenMesh::makeTemporaryProperty(mesh_, prop_name); inner_prop[vh] = 200; ASSERT_EQ(200, inner_prop[vh]); // End of scope: inner_prop is removed from mesh_ @@ -205,7 +202,7 @@ TEST_F(OpenMeshPropertyManager, cpp11_persistent_and_non_owning_properties) { ASSERT_FALSE(has_property(mesh_, prop_name)); { - auto prop = OpenMesh::makePropertyManagerFromExistingOrNew(mesh_, prop_name); + auto prop = OpenMesh::getOrMakeProperty(mesh_, prop_name); prop[vh] = 100; // End of scope, property persists } @@ -214,7 +211,7 @@ TEST_F(OpenMeshPropertyManager, cpp11_persistent_and_non_owning_properties) { { // Since a property of the same name and type already exists, this refers to the existing property. - auto prop = OpenMesh::makePropertyManagerFromExistingOrNew(mesh_, prop_name); + auto prop = OpenMesh::getOrMakeProperty(mesh_, prop_name); ASSERT_EQ(100, prop[vh]); prop[vh] = 200; // End of scope, property persists @@ -224,7 +221,7 @@ TEST_F(OpenMeshPropertyManager, cpp11_persistent_and_non_owning_properties) { { // Acquire non-owning handle to the property, knowing it exists - auto prop = OpenMesh::makePropertyManagerFromExisting(mesh_, prop_name); + auto prop = OpenMesh::getProperty(mesh_, prop_name); ASSERT_EQ(200, prop[vh]); } @@ -232,12 +229,13 @@ TEST_F(OpenMeshPropertyManager, cpp11_persistent_and_non_owning_properties) { { // Attempt to acquire non-owning handle for a non-existing property - ASSERT_THROW(OpenMesh::makePropertyManagerFromExisting(mesh_, "wrong_property_name"), std::runtime_error); + auto code_that_throws = [&](){ + OpenMesh::getProperty(mesh_, "wrong_prop_name"); + }; + ASSERT_THROW(code_that_throws(), std::runtime_error); } ASSERT_TRUE(has_property(mesh_, prop_name)); } -#endif - } diff --git a/src/Unittests/unittests_read_write_OBJ.cc b/src/Unittests/unittests_read_write_OBJ.cc index 6d6019fe..caa903f4 100644 --- a/src/Unittests/unittests_read_write_OBJ.cc +++ b/src/Unittests/unittests_read_write_OBJ.cc @@ -499,4 +499,88 @@ TEST_F(OpenMeshReadWriteOBJ, ReadWriteReadSimpleOBJ) { EXPECT_EQ(1, mesh2.normal(mesh2.vertex_handle(7))[2] ) << "Wrong vertex normal at vertex 7 component 2"; } + + +TEST_F(OpenMeshReadWriteOBJ, FaceTexCoordTest) { + + mesh_.clear(); + mesh_.request_vertex_normals(); + mesh_.request_halfedge_texcoords2D(); + + // Add some vertices + Mesh::VertexHandle vhandle[5]; + + vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 0, 0)); + vhandle[1] = mesh_.add_vertex(Mesh::Point(0, 1, 0)); + vhandle[2] = mesh_.add_vertex(Mesh::Point(1, 1, 0)); + + // Add one face + std::vector face_vhandles; + + face_vhandles.push_back(vhandle[2]); + face_vhandles.push_back(vhandle[1]); + face_vhandles.push_back(vhandle[0]); + + Mesh::FaceHandle fh = mesh_.add_face(face_vhandles); + + // 1 --- 2 + // | / + // | / + // | / + // 0 + + mesh_.set_normal(vhandle[0] , Mesh::Normal(1,0,0)); + mesh_.set_normal(vhandle[1] , Mesh::Normal(0,1,0)); + mesh_.set_normal(vhandle[2] , Mesh::Normal(0,0,1)); + + + float u = 8.0f; + for ( auto he : mesh_.halfedges() ) { + + mesh_.set_texcoord2D(he,Mesh::TexCoord2D(u,u)); + u += 1.0; + } + + + u = 0.0f; + + for ( auto he : mesh_.fh_range(fh) ) + { + + mesh_.set_texcoord2D(he,Mesh::TexCoord2D(u,u)); + u += 1.0f; + } + + + + OpenMesh::IO::Options wopt; + wopt += OpenMesh::IO::Options::VertexNormal; + wopt += OpenMesh::IO::Options::FaceTexCoord; + + bool ok = OpenMesh::IO::write_mesh(mesh_, "OpenMeshReadWriteOBJ_FaceTexCoordTest.obj", wopt); + + EXPECT_TRUE(ok) << "Unable to write OpenMeshReadWriteOBJ_FaceTexCoordTest.obj"; + + mesh_.clear(); + + + OpenMesh::IO::Options ropt; + + ropt += OpenMesh::IO::Options::FaceTexCoord; + + mesh_.request_vertex_normals(); + mesh_.request_face_normals(); + mesh_.request_halfedge_texcoords2D(); + + ok = OpenMesh::IO::read_mesh(mesh_, "OpenMeshReadWriteOBJ_FaceTexCoordTest.obj", ropt); + + EXPECT_TRUE(ok) << "Unable to read back OpenMeshReadWriteOBJ_FaceTexCoordTest.obj"; + +} + + + + + + } diff --git a/src/Unittests/unittests_read_write_OM.cc b/src/Unittests/unittests_read_write_OM.cc index 4d33486e..9b4b96d1 100644 --- a/src/Unittests/unittests_read_write_OM.cc +++ b/src/Unittests/unittests_read_write_OM.cc @@ -72,7 +72,7 @@ TEST_F(OpenMeshReadWriteOM, LoadSimpleOMWithTexCoords) { bool ok = OpenMesh::IO::read_mesh(mesh_, "cube-minimal-texCoords.om",options); - EXPECT_TRUE(ok) << "Unable to load cube-minimal-texCoords.om"; + ASSERT_TRUE(ok) << "Unable to load cube-minimal-texCoords.om"; EXPECT_EQ(8u , mesh_.n_vertices()) << "The number of loaded vertices is not correct!"; EXPECT_EQ(18u , mesh_.n_edges()) << "The number of loaded edges is not correct!"; @@ -464,11 +464,11 @@ TEST_F(OpenMeshReadWriteOM, WriteTriangleEdgeIntProperty) { Mesh::EdgeHandle e2 = Mesh::EdgeHandle(1); Mesh::EdgeHandle e3 = Mesh::EdgeHandle(2); - int va1ue1 = 10, + int value1 = 10, value2 = 21, value3 = 32; - mesh.property(prop,e1) = va1ue1; + mesh.property(prop,e1) = value1; mesh.property(prop,e2) = value2; mesh.property(prop,e3) = value3; @@ -494,7 +494,7 @@ TEST_F(OpenMeshReadWriteOM, WriteTriangleEdgeIntProperty) { EXPECT_EQ(Mesh::Point(0.0,1.0,0.0) , cmpMesh.point(v2)) << "Wrong coordinates at vertex 1"; EXPECT_EQ(Mesh::Point(0.0,0.0,1.0) , cmpMesh.point(v3)) << "Wrong coordinates at vertex 2"; - EXPECT_EQ(va1ue1 , cmpMesh.property(prop,e1)) << "Wrong property at edge 0"; + EXPECT_EQ(value1 , cmpMesh.property(prop,e1)) << "Wrong property at edge 0"; EXPECT_EQ(value2 , cmpMesh.property(prop,e2)) << "Wrong property at edge 1"; EXPECT_EQ(value3 , cmpMesh.property(prop,e3)) << "Wrong property at edge 2"; @@ -503,6 +503,292 @@ TEST_F(OpenMeshReadWriteOM, WriteTriangleEdgeIntProperty) { } +/* + * Save and load simple mesh with custom property + */ +TEST_F(OpenMeshReadWriteOM, WriteSplitTriangleEdgeIntProperty) { + + Mesh mesh; + + const std::string propName = "EIProp"; + const std::string filename = std::string("triangle-minimal-")+propName+".om"; + + // generate data + Mesh::VertexHandle v1 = mesh.add_vertex(Mesh::Point(1.0,0.0,0.0)); + Mesh::VertexHandle v2 = mesh.add_vertex(Mesh::Point(0.0,1.0,0.0)); + Mesh::VertexHandle v3 = mesh.add_vertex(Mesh::Point(0.0,0.0,1.0)); + auto fh0 = mesh.add_face(v1,v2,v3); + auto c = mesh.calc_face_centroid(fh0); + Mesh::VertexHandle v4 = mesh.add_vertex(c); + mesh.split(fh0, v4); + + + OpenMesh::EPropHandleT prop; + mesh.add_property(prop,propName); + mesh.property(prop).set_persistent(true); + + Mesh::EdgeHandle e1 = Mesh::EdgeHandle(0); + Mesh::EdgeHandle e2 = Mesh::EdgeHandle(1); + Mesh::EdgeHandle e3 = Mesh::EdgeHandle(2); + Mesh::EdgeHandle e4 = Mesh::EdgeHandle(3); + Mesh::EdgeHandle e5 = Mesh::EdgeHandle(4); + Mesh::EdgeHandle e6 = Mesh::EdgeHandle(5); + + int value1 = 10, + value2 = 21, + value3 = 32, + value4 = 43, + value5 = 54, + value6 = 65; + + mesh.property(prop,e1) = value1; + mesh.property(prop,e2) = value2; + mesh.property(prop,e3) = value3; + mesh.property(prop,e4) = value4; + mesh.property(prop,e5) = value5; + mesh.property(prop,e6) = value6; + + // save + OpenMesh::IO::Options options; + bool ok = OpenMesh::IO::write_mesh(mesh,filename); + EXPECT_TRUE(ok) << "Unable to write "< vertex_deleted; + std::vector vertex_selected; + std::vector vertex_feature; + std::vector vertex_tagged; + std::vector vertex_tagged2; + + for (auto vh : mesh.all_vertices()) + { + vertex_deleted.push_back(mesh.status(vh).deleted()); + vertex_selected.push_back(mesh.status(vh).selected()); + vertex_feature.push_back(mesh.status(vh).feature()); + vertex_tagged.push_back(mesh.status(vh).tagged()); + vertex_tagged2.push_back(mesh.status(vh).tagged2()); + } + + Mesh::EdgeHandle e1 = Mesh::EdgeHandle(0); + Mesh::EdgeHandle e2 = Mesh::EdgeHandle(1); + Mesh::EdgeHandle e3 = Mesh::EdgeHandle(2); + Mesh::EdgeHandle e4 = Mesh::EdgeHandle(3); + + mesh.status(e1).set_selected(true); + mesh.status(e2).set_feature(true); + mesh.status(e3).set_tagged(true); + mesh.status(e4).set_tagged2(true); + + std::vector edge_deleted; + std::vector edge_selected; + std::vector edge_feature; + std::vector edge_tagged; + std::vector edge_tagged2; + + for (auto eh : mesh.all_edges()) + { + edge_deleted.push_back(mesh.status(eh).deleted()); + edge_selected.push_back(mesh.status(eh).selected()); + edge_feature.push_back(mesh.status(eh).feature()); + edge_tagged.push_back(mesh.status(eh).tagged()); + edge_tagged2.push_back(mesh.status(eh).tagged2()); + } + + + Mesh::HalfedgeHandle he1 = Mesh::HalfedgeHandle(0); + Mesh::HalfedgeHandle he2 = Mesh::HalfedgeHandle(3); + Mesh::HalfedgeHandle he3 = Mesh::HalfedgeHandle(5); + Mesh::HalfedgeHandle he4 = Mesh::HalfedgeHandle(1); + + mesh.status(he1).set_selected(true); + mesh.status(he2).set_feature(true); + mesh.status(he3).set_tagged(true); + mesh.status(he4).set_tagged2(true); + + std::vector halfedge_deleted; + std::vector halfedge_selected; + std::vector halfedge_feature; + std::vector halfedge_tagged; + std::vector halfedge_tagged2; + + for (auto heh : mesh.all_halfedges()) + { + halfedge_deleted.push_back(mesh.status(heh).deleted()); + halfedge_selected.push_back(mesh.status(heh).selected()); + halfedge_feature.push_back(mesh.status(heh).feature()); + halfedge_tagged.push_back(mesh.status(heh).tagged()); + halfedge_tagged2.push_back(mesh.status(heh).tagged2()); + } + + Mesh::FaceHandle f1 = Mesh::FaceHandle(0); + Mesh::FaceHandle f2 = Mesh::FaceHandle(2); + Mesh::FaceHandle f3 = Mesh::FaceHandle(1); + Mesh::FaceHandle f4 = Mesh::FaceHandle(2); + + mesh.status(f1).set_selected(true); + mesh.status(f2).set_feature(true); + mesh.status(f3).set_tagged(true); + mesh.status(f4).set_tagged2(true); + + std::vector face_deleted; + std::vector face_selected; + std::vector face_feature; + std::vector face_tagged; + std::vector face_tagged2; + + for (auto fh : mesh.all_faces()) + { + face_deleted.push_back(mesh.status(fh).deleted()); + face_selected.push_back(mesh.status(fh).selected()); + face_feature.push_back(mesh.status(fh).feature()); + face_tagged.push_back(mesh.status(fh).tagged()); + face_tagged2.push_back(mesh.status(fh).tagged2()); + } + + // save + OpenMesh::IO::Options options = OpenMesh::IO::Options::Status; + bool ok = OpenMesh::IO::write_mesh(mesh,filename, options); + EXPECT_TRUE(ok) << "Unable to write "< +#include #include #include #include @@ -448,36 +449,31 @@ TEST_F(OpenMeshTutorials, using_custom_properties) { bool ok = OpenMesh::IO::read_mesh(mesh, "output.off"); EXPECT_TRUE(ok) << "Cannot read mesh from file 'output.off'"; - // this vertex property stores the computed centers of gravity - OpenMesh::VPropHandleT cogs; - mesh.add_property(cogs); + const int iterations = 100; - // smoothing mesh N times - MyMesh::VertexIter v_it, v_end(mesh.vertices_end()); - MyMesh::VertexVertexIter vv_it; - MyMesh::Point cog; - MyMesh::Scalar valence; - unsigned int i, N(100); - - for (i=0; i < N; ++i) { - for (v_it = mesh.vertices_begin(); v_it != v_end; ++v_it) - { - mesh.property(cogs,*v_it).vectorize(0.0f); - valence = 0.0; + // Add a vertex property storing the computed centers of gravity + auto cog = OpenMesh::makeTemporaryProperty(mesh); - for (vv_it = mesh.vv_iter( *v_it ); vv_it.is_valid(); ++vv_it) - { - mesh.property(cogs,*v_it) += mesh.point( *vv_it ); - ++valence; + // Smooth the mesh several times + for (int i = 0; i < iterations; ++i) { + // Iterate over all vertices to compute centers of gravity + for (const auto& vh : mesh.vertices()) { + cog[vh] = {0,0,0}; + int valence = 0; + // Iterate over all 1-ring vertices around vh + for (const auto& vvh : mesh.vv_range(vh)) { + cog[vh] += mesh.point(vvh); + ++valence; + } + cog[vh] /= valence; + } + // Move all vertices to the previously computed positions + for (const auto& vh : mesh.vertices()) { + mesh.point(vh) = cog[vh]; } - mesh.property(cogs,*v_it) /= valence; } - - for (v_it = mesh.vertices_begin(); v_it != v_end; ++v_it) - if ( !mesh.is_boundary( *v_it ) ) - mesh.set_point( *v_it, mesh.property(cogs,*v_it) ); - } + } // The cog vertex property is removed from the mesh at the end of this scope // write mesh ok = OpenMesh::IO::write_mesh(mesh, "smoothed_custom_properties_output.off");
      Linux -gcc >= 4.8.x
      +gcc >= 6.3
      clang >= 3.3
      Windows -Microsoft Visual Studio 2013
      Microsoft Visual Studio 2015
      Microsoft Visual Studio 2017