mirror of https://github.com/CGAL/cgal
Update name of reconstruction 2D in demo
This commit is contained in:
parent
39ac3cb0d5
commit
002859f842
|
|
@ -1,6 +1,6 @@
|
|||
# This is the CMake script for compiling the Reconstruction_simplification_2 demo.
|
||||
# This is the CMake script for compiling the Optimal_transportation_reconstruction_2 demo.
|
||||
|
||||
project(Reconstruction_simplification_2_demo)
|
||||
project(Optimal_transportation_reconstruction_2_demo)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
if(POLICY CMP0043)
|
||||
|
|
@ -45,7 +45,7 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND)
|
|||
set(
|
||||
SRCS
|
||||
glviewer.cpp
|
||||
Reconstruction_simplification_2_demo.cpp
|
||||
Optimal_transportation_reconstruction_2_demo.cpp
|
||||
window.cpp
|
||||
render.cpp
|
||||
)
|
||||
|
|
@ -78,20 +78,20 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND)
|
|||
|
||||
qt5_add_resources ( RESOURCE_FILES pwsrec.qrc )
|
||||
|
||||
add_executable ( Reconstruction_simplification_2_demo ${SRCS} ${MOCS} ${UI_FILES} ${RESOURCE_FILES} ${CGAL_ADDITIONAL_FILES} ${CGAL_RESOURCE_FILES})
|
||||
add_executable ( Optimal_transportation_reconstruction_2_demo ${SRCS} ${MOCS} ${UI_FILES} ${RESOURCE_FILES} ${CGAL_ADDITIONAL_FILES} ${CGAL_RESOURCE_FILES})
|
||||
|
||||
qt5_use_modules(Reconstruction_simplification_2_demo OpenGL)
|
||||
qt5_use_modules(Optimal_transportation_reconstruction_2_demo OpenGL)
|
||||
|
||||
# Link with Qt libraries
|
||||
target_link_libraries( Reconstruction_simplification_2_demo ${QT_LIBRARIES} )
|
||||
target_link_libraries( Optimal_transportation_reconstruction_2_demo ${QT_LIBRARIES} )
|
||||
|
||||
# Link with CGAL
|
||||
target_link_libraries( Reconstruction_simplification_2_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||
target_link_libraries( Optimal_transportation_reconstruction_2_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||
|
||||
# Link with OpenGL
|
||||
target_link_libraries( Reconstruction_simplification_2_demo ${OPENGL_gl_LIBRARY} )
|
||||
target_link_libraries( Optimal_transportation_reconstruction_2_demo ${OPENGL_gl_LIBRARY} )
|
||||
|
||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Reconstruction_simplification_2_demo )
|
||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Optimal_transportation_reconstruction_2_demo )
|
||||
|
||||
else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND )
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ int main(int argv, char **args)
|
|||
{
|
||||
srand(1);
|
||||
QApplication app(argv, args);
|
||||
app.setApplicationName("Reconstruction_simplification_2 Demo");
|
||||
app.setApplicationName("Optimal_transportation_reconstruction_2 Demo");
|
||||
MainWindow window;
|
||||
window.show();
|
||||
return app.exec();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef CGAL_RECONSTRUCTION_SIMPLIFICATION_KERNEL_2_H_
|
||||
#define CGAL_RECONSTRUCTION_SIMPLIFICATION_KERNEL_2_H_
|
||||
#ifndef CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_KERNEL_2_H_
|
||||
#define CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_KERNEL_2_H_
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Reconstruction_simplification_2.h>
|
||||
#include <CGAL/Optimal_transportation_reconstruction_2.h>
|
||||
|
||||
#include <CGAL/property_map.h>
|
||||
#include <CGAL/value_type_traits.h>
|
||||
|
|
@ -27,22 +27,22 @@ typedef CGAL::value_type_traits<InputIterator>::type MassPoint;
|
|||
typedef CGAL::First_of_pair_property_map<PointMassPair> Point_property_map;
|
||||
typedef CGAL::Second_of_pair_property_map<PointMassPair> Mass_property_map;
|
||||
|
||||
typedef CGAL::Reconstruction_simplification_2<K, Point_property_map,
|
||||
typedef CGAL::Optimal_transportation_reconstruction_2<K, Point_property_map,
|
||||
Mass_property_map> Rs_2;
|
||||
|
||||
class Reconstruction_simplification_kerneled_2:
|
||||
class Optimal_transportation_reconstruction_kerneled_2:
|
||||
public Rs_2 {
|
||||
|
||||
public:
|
||||
|
||||
template <typename InputRange>
|
||||
Reconstruction_simplification_kerneled_2(const InputRange& input_range,
|
||||
Optimal_transportation_reconstruction_kerneled_2(const InputRange& input_range,
|
||||
Point_property_map point_pmap, Mass_property_map mass_pmap) :
|
||||
Rs_2(input_range, point_pmap,
|
||||
mass_pmap) {
|
||||
}
|
||||
|
||||
Reconstruction_simplification_kerneled_2() :
|
||||
Optimal_transportation_reconstruction_kerneled_2() :
|
||||
Rs_2() {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>CGAL 2D Reconstruction and Simplification</string>
|
||||
<string>CGAL 2D Optimal Transportation Curve Reconstruction</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout">
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
#include <QtOpenGL>
|
||||
|
||||
// local
|
||||
#include "Reconstruction_simplification_kerneled_2.h"
|
||||
#include <CGAL/Reconstruction_simplification_2.h>
|
||||
#include "Optimal_transportation_reconstruction_kerneled_2.h"
|
||||
#include <CGAL/Optimal_transportation_reconstruction_2.h>
|
||||
|
||||
typedef Reconstruction_simplification_kerneled_2::Rec_edge_2 PEdge;
|
||||
typedef Reconstruction_simplification_kerneled_2 R_s_k_2;
|
||||
typedef Optimal_transportation_reconstruction_kerneled_2::Rec_edge_2 PEdge;
|
||||
typedef Optimal_transportation_reconstruction_kerneled_2 R_s_k_2;
|
||||
|
||||
void R_s_k_2::print_stats() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
// local
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include "Reconstruction_simplification_kerneled_2.h"
|
||||
#include <CGAL/Reconstruction_simplification_2.h>
|
||||
#include "Optimal_transportation_reconstruction_kerneled_2.h"
|
||||
#include <CGAL/Optimal_transportation_reconstruction_2.h>
|
||||
|
||||
|
||||
#ifdef CGAL_USE_CIMG
|
||||
|
|
@ -37,7 +37,7 @@ public:
|
|||
typedef CGAL::First_of_pair_property_map<PointMassPair> Point_property_map;
|
||||
typedef CGAL::Second_of_pair_property_map<PointMassPair> Mass_property_map;
|
||||
|
||||
typedef CGAL::Reconstruction_simplification_2<K, Point_property_map,
|
||||
typedef CGAL::Optimal_transportation_reconstruction_2<K, Point_property_map,
|
||||
Mass_property_map> R_s_2;
|
||||
|
||||
typedef K::Segment_2 Segment;
|
||||
|
|
@ -80,7 +80,7 @@ private:
|
|||
// data
|
||||
std::vector<Sample_> m_samples;
|
||||
|
||||
Reconstruction_simplification_kerneled_2* m_pwsrec;
|
||||
Optimal_transportation_reconstruction_kerneled_2* m_pwsrec;
|
||||
int m_ignore;
|
||||
bool m_init_done;
|
||||
double m_percentage;
|
||||
|
|
@ -100,7 +100,7 @@ public:
|
|||
m_bbox_y = 0.0;
|
||||
m_bbox_size = 1.0;
|
||||
|
||||
m_pwsrec = new Reconstruction_simplification_kerneled_2();
|
||||
m_pwsrec = new Optimal_transportation_reconstruction_kerneled_2();
|
||||
}
|
||||
|
||||
~Scene() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue