...
 
Commits (26)
......@@ -566,23 +566,37 @@ Core::init() {
// Set renderer
// ====================================================
QString defaultRendererKey = "Viewer" + QString::number(i)+"/DefaultRenderer";
QString defaultRendererName = OpenFlipperSettings().value(defaultRendererKey,"Default Classical Renderer Plugin").toString();
// Check if the renderer is there
int defaultRendererId = renderManager().getRendererId(defaultRendererName);
// Choose one of the two possible renderers. Shader Pipeline for Core Profile or Classical for Compatibility Profile
QString rendererDefault;
if ( defaultRendererId == -1 ) {
emit log(LOGERR,tr("Stored default renderer \"") + defaultRendererName + tr("\" is not available, trying Classical!"));
if ( OpenFlipper::Options::coreProfile() )
rendererDefault = "Shader Pipeline Renderer Plugin";
else
rendererDefault = "Default Classical Renderer Plugin";
// Check if the renderer is there
defaultRendererId = renderManager().getRendererId("Default Classical Renderer Plugin");
// Try to get a default renderer Name from the settings file. If it's not there, we fall back to the default set above
// based on the current OpenGL Profile
QString rendererKey = "Viewer" + QString::number(i)+"/DefaultRenderer";
QString rendererName = OpenFlipperSettings().value(rendererKey,rendererDefault).toString();
// Classical available?
if ( defaultRendererId != -1 ) {
renderManager().setActive(defaultRendererId,i);
// Check if the renderer is there. If a setting was in the options file, we try it here. Otherwise we are checking the default one.
int rendererId = renderManager().getRendererId(rendererName);
if ( rendererId == -1 ) {
// That failed. So either the one stored in the settings is not available or our default failed.
emit log(LOGERR,tr("Stored default renderer \"") + rendererName + tr("\" is not available, trying") + rendererDefault + "!");
// Anyway, lets try the default fallback:
rendererId = renderManager().getRendererId(rendererDefault);
// Successful?
if ( rendererId != -1 ) {
// Lets set it as the active one
renderManager().setActive(rendererId,i);
} else {
emit log(LOGERR,tr("Default classical renderer is also not available. Trying to use any other renderer i can find!"));
emit log(LOGERR,rendererDefault + tr(" renderer is also not available. Trying to use any other renderer i can find!"));
// debug information for this case, print renderer count and their names
const unsigned int rendererCount = renderManager().available();
......@@ -590,11 +604,11 @@ Core::init() {
for (unsigned int rendererId = 0 ; rendererId < rendererCount ; ++rendererId )
emit log(LOGERR, tr("Renderer ") + QString::number(rendererId) + ": " + renderManager()[rendererId]->name );
}
} else {
renderManager().setActive(defaultRendererId,i);
renderManager().setActive(rendererId,i);
}
}
// Warn the user in the log and via messagebox, that he is using the build in renderer only
......
......@@ -267,9 +267,24 @@ file (
set( REMAINING_LOCAL_LIBS "" )
# move the following libraries to the front of the list
# to have add_subdirectory() order match the dependency graph.
set( _local_libs_ordered "" )
foreach(_pattern CoMISo OpenVolumeMesh libHexEx)
foreach (_localLib ${_local_libs_in})
if ( "${_localLib}" MATCHES ".*${_pattern}.*" )
LIST(APPEND _local_libs_ordered ${_localLib})
endif()
endforeach()
endforeach()
LIST(APPEND _local_libs_ordered ${_local_libs_in})
LIST(REMOVE_DUPLICATES _local_libs_ordered)
# Special Comiso case:
# The library has to be configured first
foreach (_localLib ${_local_libs_in})
foreach (_localLib ${_local_libs_ordered})
if ( "${_localLib}" MATCHES .*CoMISo.* )
get_filename_component (_local_lib_dir ${_localLib} PATH)
if ( NOT DEFINED LIB_COMISO_BUILD )
......@@ -286,7 +301,6 @@ foreach (_localLib ${_local_libs_in})
endif()
endforeach ()
# add all found libs to the build
foreach (_localLib ${REMAINING_LOCAL_LIBS})
......
......@@ -94,6 +94,6 @@ find_package_handle_standard_args(GUROBI DEFAULT_MSG
mark_as_advanced(GUROBI_INCLUDE_DIR GUROBI_LIBRARY GUROBI_CXX_LIBRARY GUROBI_BIN_DIR )
endif(GUROBI_INCLUDE_DIR)
endif()
endif()
......@@ -87,8 +87,8 @@ if (WIN32)
ELSE( WIN32 )
find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp
PATHS "$ENV{IPOPT_HOME}/include/coin"
"/usr/include/coin"
HINTS "$ENV{IPOPT_HOME}/include/coin"
PATHS "/usr/include/coin"
"~/sw/Ipopt-3.12.4-installed/include/coin"
)
......
......@@ -36,30 +36,31 @@ endif()
find_path(METIS_INCLUDE_DIR NAMES metis.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/"
"/usr/include/"
HINTS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/"
"$ENV{IPOPT_HOME}/include/coin/ThirdParty/"
PATHS "/usr/include/"
"/usr/include/metis"
"/opt/local/include"
"/opt/local/include/metis"
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/metis"
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/metis"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/metis"
)
find_library( METIS_LIBRARY_RELEASE
metis coinmetis
PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib"
coinmetis metis
HINTS "$ENV{IPOPT_HOME}/lib/"
PATHS "/usr/lib"
"/opt/local/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
)
find_library( METIS_LIBRARY_DEBUG
metisd coinmetisd
PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib"
coinmetisd metisd
HINTS "$ENV{IPOPT_HOME}/lib/"
PATHS "/usr/lib"
"/opt/local/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
)
......
......@@ -35,24 +35,25 @@ elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
endif()
find_path(MUMPS_INCLUDE_DIR NAMES dmumps_c.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Mumps/MUMPS/include/"
"/usr/include/"
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/mumps"
HINTS "$ENV{IPOPT_HOME}/ThirdParty/Mumps/MUMPS/include/"
"$ENV{IPOPT_HOME}/include/coin/ThirdParty"
PATHS "/usr/include/"
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/mumps"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/mumps"
)
find_library( MUMPS_LIBRARY_DEBUG
dmumpsd coinmumpsd coinmumpscd
PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
coinmumpsd dmumpsd coinmumpscd
HITNS "$ENV{IPOPT_HOME}/lib/"
PATHS "/usr/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
)
find_library( MUMPS_LIBRARY_RELEASE
dmumps coinmumps coinmumpsc
PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib"
coinmumps dmumps coinmumpsc
HINTS "$ENV{IPOPT_HOME}/lib/"
PATHS "/usr/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
)
......
......@@ -32,30 +32,34 @@ elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
endif()
if (QT5_FOUND)
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.13.0")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.4-qt5.13.0")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.12.2")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.4-qt5.12.2")
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.13.2")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.4-qt5.13.2")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.13.0")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.4-qt5.13.0")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.11.2")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.11.2")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.10.1" )
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.10.1")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.9.0" )
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.9.0")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.8.0" OR ${Qt5Core_VERSION_STRING} VERSION_GREATER "5.5.1")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.8.0")
else()
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-4.9-x86_64/qwt-6.1-qt5")
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.12.2")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.4-qt5.12.2")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.11.2")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.11.2")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.10.1" )
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.10.1")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.9.0" )
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.9.0")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.8.0" OR ${Qt5Core_VERSION_STRING} VERSION_GREATER "5.5.1")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.8.0")
else()
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-4.9-x86_64/qwt-6.1-qt5")
endif()
endif()
endif()
endif()
endif()
endif()
endif()
endif()
else()
SET(ACG_SEARCH_PATH "/usr/local/qwt/")
......
This diff is collapsed.
......@@ -207,7 +207,7 @@ macro (_check_plugin_deps _prefix _optional )
if ( ${_optional} STREQUAL "TRUE" )
if ( ${_VAL}_FOUND )
if ( ${_VAL}_FOUND OR ${_val}_FOUND)
# Optional dependency found and recursive found, so add definition to enable it
if ( ${_optional} STREQUAL "TRUE" )
......@@ -276,6 +276,9 @@ macro (_check_plugin_deps _prefix _optional )
if (${_val}_FOUND OR ${_VAL}_FOUND)
foreach (_name ${_val} ${_VAL})
if (TARGET ${_name})
list(APPEND ${_prefix}_DEPS_TARGETS ${_name})
endif()
if (DEFINED ${_name}_INCLUDE_PATH)
list (APPEND ${_prefix}_DEPS_INCDIRS "${${_name}_INCLUDE_PATH}")
endif ()
......@@ -677,6 +680,10 @@ function (_build_openflipper_plugin plugin)
endif()
endif()
if(${_PLUGIN}_DEPS_TARGETS)
target_link_libraries(Plugin-${plugin} ${${_PLUGIN}_DEPS_TARGETS})
endif()
# append compiler and linker flags from plugin dependencies
list(APPEND ${_PLUGIN}_DEPS_COMPILE_DEFINITIONS ${${_PLUGIN}_CDEFINITIONSADD} )
......
......@@ -6,6 +6,7 @@
#include <ACG/Math/VectorT.hh>
#include <algorithm>
#include <cmath>
#include <utility>
#if defined(_MSC_VER) && _MSC_VER < 1900
#define constexpr
......@@ -128,20 +129,26 @@ class Matrix3x3T {
}};
}
constexpr Vec3 operator*(const Vec3 &rhs) const {
return Vec3(
template<typename OtherScalar>
constexpr auto operator*(const VectorT<OtherScalar,3> &rhs) const
-> OpenMesh::VectorT<decltype(std::declval<Scalar>() * rhs[0]), 3>
{
return {
(*this)(0, 0) * rhs[0] + (*this)(0, 1) * rhs[1] + (*this)(0, 2) * rhs[2],
(*this)(1, 0) * rhs[0] + (*this)(1, 1) * rhs[1] + (*this)(1, 2) * rhs[2],
(*this)(2, 0) * rhs[0] + (*this)(2, 1) * rhs[1] + (*this)(2, 2) * rhs[2]
);
};
}
constexpr friend Vec3 operator*(Vec3 v, const Matrix3x3T &rhs) {
return Vec3(
template<typename OtherScalar>
constexpr friend auto operator*(VectorT<OtherScalar,3> v, const Matrix3x3T &rhs)
-> OpenMesh::VectorT<decltype(std::declval<Scalar>() * v[0]), 3>
{
return {
rhs(0, 0) * v[0] + rhs(0, 1) * v[1] + rhs(0, 2) * v[2],
rhs(1, 0) * v[0] + rhs(1, 1) * v[1] + rhs(1, 2) * v[2],
rhs(2, 0) * v[0] + rhs(2, 1) * v[1] + rhs(2, 2) * v[2]
);
};
}
constexpr Matrix3x3T operator*(Scalar c) const {
......
......@@ -160,7 +160,7 @@ getSaveFileName(QWidget* _parent,
QMessageBox::Yes | QMessageBox::Default,
QMessageBox::No | QMessageBox::Escape)
!= QMessageBox::Yes)
return QString::null;
return QString();
}
return filename;
......
......@@ -69,43 +69,43 @@ namespace ACG {
ACGDLLEXPORT
QString
getOpenFileName(QWidget* _parent = 0,
const QString& _caption = QString::null,
const QString& _filter = QString::null,
const QString& _start = QString::null);
const QString& _caption = QString(),
const QString& _filter = QString(),
const QString& _start = QString());
ACGDLLEXPORT
QString
getOpenMeshName(QWidget* _parent = 0,
const QString& _caption = QString::null,
const QString& _start = QString::null);
const QString& _caption = QString(),
const QString& _start = QString());
ACGDLLEXPORT
QStringList
getOpenFileNames(QWidget* _parent = 0,
const QString& _caption = QString::null,
const QString& _filter = QString::null,
const QString& _start = QString::null);
const QString& _caption = QString(),
const QString& _filter = QString(),
const QString& _start = QString());
ACGDLLEXPORT
QStringList
getOpenMeshNames(QWidget* _parent = 0,
const QString& _caption = QString::null,
const QString& _start = QString::null);
const QString& _caption = QString(),
const QString& _start = QString());
ACGDLLEXPORT
QString
getSaveFileName(QWidget* _parent = 0,
const QString& _caption = QString::null,
const QString& _filter = QString::null,
const QString& _caption = QString(),
const QString& _filter = QString(),
bool _askOverwrite=false,
const QString& _start = QString::null);
const QString& _start = QString());
ACGDLLEXPORT
QString
getSaveMeshName(QWidget* _parent = 0,
const QString& _caption = QString::null,
const QString& _caption = QString(),
bool _askOverwrite=false,
const QString& _start = QString::null);
const QString& _start = QString());
//=============================================================================
......
......@@ -64,7 +64,7 @@ class ACGDLLEXPORT Histogram: public QwtPlotItem
{
public:
/// Constructor
explicit Histogram(const QString &title = QString::null);
explicit Histogram(const QString &title = QString());
/// Constructor
explicit Histogram(const QwtText &title);
/// Destructor
......
Subproject commit 481ffd7f78e79d0adc99ae1125c783d5ee84a099
Subproject commit 697cdb18eeedc445803bf92dc02a5e153133c976