Commit c3e57d53 authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'master' into poisson_disk_square

parents 27bdfd01 c8c8cb54
Pipeline #4676 passed with stage
in 53 minutes and 37 seconds
......@@ -56,9 +56,6 @@ VS2013-Qt-5.5.1-x64:
Mac-Cpp11:
script: "OpenFlipper/CI/ci-mac.sh"
cache:
paths:
- build-release/
tags:
- Apple
artifacts:
......
......@@ -3,6 +3,6 @@
url = https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh.git
branch = master
[submodule "libs_required/OpenVolumeMesh"]
path = libs_required/OpenVolumeMesh
path = Type-OpenVolumeMesh/libs/OpenVolumeMesh
url = https://www.graphics.rwth-aachen.de:9000/OpenVolumeMesh/OpenVolumeMesh.git
branch = master
......@@ -2,6 +2,13 @@
# Required 3.1 to set C++11
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
file(SHA512 ${CMAKE_SOURCE_DIR}/CMakeLists.txt HASH_TOPLEVEL_CMAKEFILE)
file(SHA512 ${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/CMakeLists.txt HASH_LATEST_CMAKEFILE)
if ( NOT ${HASH_TOPLEVEL_CMAKEFILE} EQUAL ${HASH_LATEST_CMAKEFILE} )
message(WARNING "WARNING! Possibly Outdated toplevel CMakeLists.txt. Please update the toplevel copy by the file OpenFlipper/cmake/CMakeLists.txt .")
endif()
# Convenience checks for problems
if(EXISTS ${CMAKE_SOURCE_DIR}/libs_required/OpenMesh)
message(FATAL_ERROR "Directory libs_required/OpenMesh has been moved to OpenFlipper/libs_required/OpenMesh! Please remove the old directory if it's still there!")
......@@ -87,22 +94,6 @@ include (MSVCMacros)
acg_get_version (OpenFlipper)
# ========================================================================
# qtcrator workaround for missing files in project
# ========================================================================
# qtcreator (4.0.3) does not include some header files and *T.cc in its
# project structure. The issue is well-known, this is a workaround.
# Unfortunately I could not find a workaround that does not involve adding
# a dummy target that is visible in the target list.
# To force adding files to the project structure, use
# target_sources(_qtcreator_add_files PUBLIC ${EXTRA_FILES})
# in your CMakeLists.txt templates of the form (*T.cc) are added automatically
add_library(_qtcreator_add_files CMakeLists.txt) # dummy file that always exists
set_target_properties(_qtcreator_add_files PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
# ========================================================================
# Branding
# ========================================================================
......@@ -194,12 +185,6 @@ if (NOT USE_INTERNAL_OPENMESH)
find_package (OpenMesh REQUIRED)
endif()
find_package (OpenVolumeMesh)
if (NOT OPENVOLUMEMESH_FOUND)
message (WARNING "OpenVolumeMesh not found, proceeding without it!")
endif ()
# ========================================================================
# Configure the executables path for tests
# ========================================================================
......@@ -224,12 +209,14 @@ add_subdirectory (OpenFlipper/libs_required/OpenMesh)
add_subdirectory (OpenFlipper/libs_required/ACG)
# search all libs in the libs directory
# (required and optional libraries
# in Packages, types, ...
# (required and optional libraries )
file (
GLOB _local_libs_in
RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/libs_required/*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/libs/*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/Type-*/libs/*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/Package-*/libs/*/CMakeLists.txt"
)
......@@ -286,7 +273,6 @@ endforeach ()
GROUP_PROJECT(OpenMeshTools libs_required)
GROUP_PROJECT(OpenMeshCore libs_required)
GROUP_PROJECT(ACG libs_required)
GROUP_PROJECT(OpenVolumeMesh libs_required)
if( DOXYGEN_FOUND )
GROUP_PROJECT(doc-install Documentation)
......@@ -297,6 +283,45 @@ endif()
# ========================================================================
add_subdirectory (OpenFlipper/PluginLib)
# ========================================================================
# Build DataTypes
# ========================================================================
# Search for all available data types
file (
GLOB _data_types
RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/Type-*/ObjectTypes/*"
"${CMAKE_SOURCE_DIR}/Package-*/Type-*/ObjectTypes/*"
)
# add all found libs to the build
foreach (DATATYPE_DIR ${_data_types})
if (EXISTS ${CMAKE_SOURCE_DIR}/${DATATYPE_DIR}/CMakeLists.txt)
add_subdirectory(${DATATYPE_DIR})
# Extract Name of type from directory
string(REGEX MATCH "[^/\\]*$" TYPENAME ${DATATYPE_DIR})
string(TOUPPER ${TYPENAME} TYPENAME )
list(APPEND TYPE_LIST ${TYPENAME})
# Binary is only for the ui files generated there. Maybe a better solution can be found!
set(${TYPENAME}_INCLUDE ${CMAKE_SOURCE_DIR}/${DATATYPE_DIR}/../../ ${CMAKE_BINARY_DIR}/${DATATYPE_DIR}/ )
endif()
endforeach()
# info header for Available data types
acg_color_message ("\n${_escape}[40;37m************************************************************${_escape}[0m")
acg_color_message ("${_escape}[40;37m* Available OpenFlipper Types: *${_escape}[0m")
acg_color_message ("${_escape}[40;37m************************************************************${_escape}[0m")
acg_color_message (" ")
foreach (DATATYPE ${TYPE_LIST})
acg_color_message ("${DATATYPE}")
endforeach()
acg_color_message (" ")
# ========================================================================
# Tests
# ========================================================================
......
find_package (OpenVolumeMesh)
if (OPENVOLUMEMESH_FOUND)
list (APPEND ADDITIONAL_PLUGINLIB_INCS ${OPENVOLUMEMESH_INCLUDE_DIR})
list (APPEND ADDITIONAL_PLUGINLIB_LIBS ${OPENVOLUMEMESH_LIBRARY})
endif ()
find_package(OpenVolumeMesh)
if(OPENVOLUMEMESH_FOUND)
list(APPEND ADDITIONAL_PLUGINLIB_INCS ${OPENVOLUMEMESH_INCLUDE_DIR})
list(APPEND ADDITIONAL_PLUGINLIB_LIBS ${OPENVOLUMEMESH_LIBRARY})
if (EXISTS ${OPENVOLUMEMESH_INCLUDE_DIR}/OpenVolumeMesh/Mesh/TetrahedralMesh.hh)
add_definitions(-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions(-DENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT)
endif()
endif()
find_package (OpenVolumeMesh)
if (OPENVOLUMEMESH_FOUND)
list (APPEND ADDITIONAL_PLUGINLIB_INCS ${OPENVOLUMEMESH_INCLUDE_DIR})
list (APPEND ADDITIONAL_PLUGINLIB_LIBS ${OPENVOLUMEMESH_LIBRARY})
endif ()
......@@ -60,9 +60,7 @@
#include <OpenFlipper/common/GlobalOptions.hh>
//#include <QGLWidget>
#include <../ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <../ObjectTypes/PolyMesh/PolyMesh.hh>
#include "PluginFunctions.hh"
#include "PluginFunctionsCore.hh"
namespace PluginFunctions {
......
......@@ -351,6 +351,7 @@ void addGlobalNode(ACG::SceneGraph::BaseNode* _node);
* The node will be added at the top of the scenegraph, before all other nodes except
* The scenegraphs real node. It will therefore influence all nodes in the scenegraph.
*/
DLLEXPORT
void addGlobalStatusNode(ACG::SceneGraph::BaseNode* _node);
/** \brief Add scenegraph node modifing object rendering
......
......@@ -84,6 +84,7 @@
#include <OpenFlipper/common/ViewerProperties.hh>
#include <ACG/QtWidgets/QtSceneGraphWidget.hh>
#include <OpenFlipper/BasePlugin/PluginFunctionsSceneGraphWidget.hh>
namespace PluginFunctions {
......@@ -169,10 +170,6 @@ void removeObjectFromMap(int _objectId);
* @{ */
//=======================================
/// Add a scenegraph generator ( the handled type will be extracted from the generator)
DLLEXPORT
void addSceneGraphGenerator(ACG::QtWidgets::SceneGraphWidgetGenerator* _generator);
DLLEXPORT
QMap< std::string ,ACG::QtWidgets::SceneGraphWidgetGenerator* > getSceneGraphGeneratorList();
......
/*===========================================================================*\
* *
* OpenFlipper *
* Copyright (c) 2001-2015, RWTH-Aachen University *
* Department of Computer Graphics and Multimedia *
* All rights reserved. *
* www.openflipper.org *
* *
*---------------------------------------------------------------------------*
* This file is part of OpenFlipper. *
*---------------------------------------------------------------------------*
* *
* 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. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $LastChangedBy$ *
* $Date$ *
* *
\*===========================================================================*/
//=============================================================================
//
// Standard Functions
//
//=============================================================================
/**
* \file PluginFunctionsSceneGraphWidget.hh
* This file contains functions to add an additional widget to the SceneGraph Widget.
*/
#pragma once
#include <OpenFlipper/common/GlobalDefines.hh>
#include <ACG/QtWidgets/QtSceneGraphWidget.hh>
namespace PluginFunctions {
//=======================================
// SceneGraph Generator Map
/** @name Add scenegraph widget generators
* @{ */
//=======================================
/// Add a scenegraph generator ( the handled type will be extracted from the generator)
DLLEXPORT
void addSceneGraphGenerator(ACG::QtWidgets::SceneGraphWidgetGenerator* _generator);
/** @} */
}
......@@ -124,7 +124,7 @@ struct DLLEXPORT PostProcessorOutput
// in/out format descriptor
struct PostProcessorFormatDesc
{
PostProcessorFormatDesc(bool _multisampled = false) : supportMultisampling_(_multisampled),outputFormat_(PostProcessorFormat_DONTCARE)
explicit PostProcessorFormatDesc(bool _multisampled = false) : supportMultisampling_(_multisampled),outputFormat_(PostProcessorFormat_DONTCARE)
{}
......
......@@ -78,7 +78,7 @@ class DLLEXPORT WhatsThisGenerator: public QObject {
const QString plugin_name_;
public:
WhatsThisGenerator(const QString &_plugin_name);
explicit WhatsThisGenerator(const QString &_plugin_name);
QString generateLink(const QString &_ref = "", const QString &_site = "index.html") const;
......
rmdir libs_required\OpenMesh /s /q
rmdir libs_required /s /q
git submodule init
......
rmdir libs_required\OpenMesh /s /q
rmdir libs_required /s /q
git submodule init
......
rmdir libs_required\OpenMesh /s /q
rmdir libs_required /s /q
git submodule init
......
......@@ -22,7 +22,7 @@ echo "Please Wait ..."
cppcheck --enable=all \
-j4 \
--quiet \
-i libs_required \
-i OpenFlipper/libs_required/OpenMesh \
-i build-release \
-i build-debug \
-i .svn \
......@@ -59,9 +59,11 @@ echo "CPPCHECK Summary"
echo "=============================================================================="
echo -e "${NC}"
if [ $COUNT -gt 25 ]; then
MAX_ERROR=100
if [ $COUNT -gt $MAX_ERROR ]; then
echo -e ${WARNING}
echo "Total CPPCHECK error Count is $COUNT, which is too High! CPPCHECK Run failed";
echo "Total CPPCHECK error Count is $COUNT, which is too High (Max is $MAX_ERROR)! CPPCHECK Run failed";
echo -e "${NC}"
exit 1;
else
......
......@@ -24,7 +24,7 @@ if [ "$COMPILER" == "gcc" ]; then
elif [ "$COMPILER" == "clang" ]; then
OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DGTEST_PREFIX=~/sw/gtest-1.7.0-clang/ "
OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DGTEST_PREFIX=~/sw/gtest-1.8.0-clang/ "
# Build options with icecc /not working due to strange symbol errors
# OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc -DGTEST_PREFIX=~/sw/gtest-1.7.0-clang/ "
......@@ -61,7 +61,7 @@ echo "Full cmake options: $OPTIONS "
########################################
# Build daemon cleanup code
########################################
rm -rf libs_required/OpenMesh
rm -rf libs_required
########################################
# Fetch submodules
......
########################################
# Build daemon cleanup code
########################################
rm -rf libs_required/OpenMesh
rm -rf libs_required
########################################
......
......@@ -65,7 +65,7 @@
#include <OpenFlipper/common/RecentFiles.hh>
#include <ObjectTypes/Light/Light.hh>
//#include <ObjectTypes/Light/Light.hh>
#include <OpenFlipper/ACGHelper/DrawModeConverter.hh>
......@@ -594,12 +594,14 @@ void Core::writeIniFile(QString _filename,
file = f->second;
}
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects
LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light );
if(light != 0) {
if(light->defaultLight()) continue;
}
*/
if (QFile(file).exists()){
// Add a section for this object
......@@ -626,12 +628,15 @@ void Core::writeIniFile(QString _filename,
// Tell plugins to save their information for the given object
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objectsEnd(); ++o_it) {
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects
LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light );
if(light != 0) {
if(light->defaultLight()) continue;
}
*/
emit iniSave( ini , o_it->id() );
}
......
......@@ -175,7 +175,7 @@ class PreloadThread : public QThread
*
* @param aggregator aggregator managing the different threads
*/
PreloadThread(PreloadAggregator *aggregator) : aggregator_(aggregator) {
explicit PreloadThread(PreloadAggregator *aggregator) : aggregator_(aggregator) {
}
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment