Merge pull request #1265 from sloriot/OTR2-fix_demo_compilation

Otr2 fix demo compilation
This commit is contained in:
Sebastien Loriot 2016-07-15 15:09:43 +02:00 committed by GitHub
commit 6e01c51f72
2 changed files with 27 additions and 8 deletions

View File

@ -1,6 +1,6 @@
# This is the CMake script for compiling the Optimal_transportation_reconstruction_2 demo.
project(Optimal_transportation_reconstruction_2_demo)
project(Otr2_demo)
cmake_minimum_required(VERSION 2.8.11)
if(POLICY CMP0043)
@ -76,20 +76,20 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND)
qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES pwsrec.qrc )
add_executable ( Optimal_transportation_reconstruction_2_demo ${SRCS} ${CGAL_Qt5_MOC_FILES} ${UI_FILES} ${CGAL_Qt5_RESOURCE_FILES})
add_executable ( Otr2_demo ${SRCS} ${CGAL_Qt5_MOC_FILES} ${UI_FILES} ${CGAL_Qt5_RESOURCE_FILES})
qt5_use_modules(Optimal_transportation_reconstruction_2_demo OpenGL)
qt5_use_modules(Otr2_demo OpenGL)
# Link with Qt libraries
target_link_libraries( Optimal_transportation_reconstruction_2_demo ${QT_LIBRARIES} )
target_link_libraries( Otr2_demo ${QT_LIBRARIES} )
# Link with CGAL
target_link_libraries( Optimal_transportation_reconstruction_2_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
target_link_libraries( Otr2_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
# Link with OpenGL
target_link_libraries( Optimal_transportation_reconstruction_2_demo ${OPENGL_gl_LIBRARY} )
target_link_libraries( Otr2_demo ${OPENGL_gl_LIBRARY} )
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Optimal_transportation_reconstruction_2_demo )
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Otr2_demo )
else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND )

View File

@ -319,10 +319,28 @@ public:
/// \cond SKIP_IN_MANUAL
Optimal_transportation_reconstruction_2()
: m_traits(m_dt.geom_traits())
{
initialize_parameters();
}
~Optimal_transportation_reconstruction_2() {
clear();
}
void initialize_parameters() {
m_verbose = 0;
m_mchoice = 0;
m_use_flip = true;
m_alpha = FT(0.5);
m_ghost = FT(1);
m_relocation = 0;
m_ignore = 0;
}
//Function if one wants to create a Optimal_transportation_reconstruction_2
//without yet specifying the input in the constructor.
template <class InputIterator>
@ -339,7 +357,6 @@ public:
}
template <class InputIterator>
void initialize(InputIterator start, InputIterator beyond) {
@ -427,6 +444,7 @@ public:
<< std::endl;
}
private:
Vertex_handle insert_point(
const Point& point, const bool pinned, const int id)
{
@ -435,6 +453,7 @@ public:
v->id() = id;
return v;
}
public:
// ASSIGNMENT //