mirror of https://github.com/CGAL/cgal
Polyhedron demonstration ported.
This commit is contained in:
parent
b460fa3596
commit
74b829ae08
|
|
@ -22,7 +22,7 @@ set( QT_USE_QTSCRIPT TRUE )
|
|||
set( QT_USE_QTOPENGL TRUE )
|
||||
|
||||
#New for Qt5 version !
|
||||
if(NOT USE_QT5)
|
||||
if(QT4 OR QT5)
|
||||
option (USE_QT5 "Use Qt5 version instead of Qt4" ON)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -177,12 +177,22 @@ if((QT4 OR QT5) AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
set(CGAL_POLYHEDRON_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}")
|
||||
set(LIBRARY_OUTPUT_PATH "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}")
|
||||
|
||||
add_library(demo_framework SHARED
|
||||
if(QT4)
|
||||
add_library(demo_framework SHARED
|
||||
Scene.cpp
|
||||
Viewer.cpp Viewer_moc.cpp Viewer_interface_moc.cpp
|
||||
Scene_item.cpp Scene_item.moc
|
||||
Scene_item_with_display_list.cpp
|
||||
Polyhedron_demo_plugin_helper.cpp)
|
||||
endif(QT4)
|
||||
if(QT5)
|
||||
add_library(demo_framework SHARED
|
||||
Scene.cpp
|
||||
Viewer.cpp Viewer_interface_moc.cpp
|
||||
Scene_item.cpp
|
||||
Scene_item_with_display_list.cpp
|
||||
Polyhedron_demo_plugin_helper.cpp)
|
||||
endif(QT5)
|
||||
|
||||
target_link_libraries(demo_framework
|
||||
${QGLVIEWER_LIBRARIES}
|
||||
|
|
@ -191,8 +201,16 @@ if((QT4 OR QT5) AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
|
||||
add_library(scene_basic_objects SHARED
|
||||
if(QT4)
|
||||
add_library(scene_basic_objects SHARED
|
||||
Scene_plane_item.cpp Scene_plane_item.moc)
|
||||
endif(QT4)
|
||||
if(QT5)
|
||||
add_library(scene_basic_objects SHARED
|
||||
Scene_plane_item.cpp)
|
||||
endif(QT5)
|
||||
|
||||
|
||||
target_link_libraries(scene_basic_objects
|
||||
demo_framework
|
||||
${CGAL_LIBRARIES}
|
||||
|
|
@ -210,34 +228,60 @@ if((QT4 OR QT5) AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
target_link_libraries(${item_name} demo_framework ${QT_LIBRARIES} ${CGAL_LIBRARIES} ${Boost_LIBRARIES})
|
||||
endmacro(add_item)
|
||||
|
||||
if(QT4)
|
||||
add_item(scene_c2t3_item Scene_c2t3_item.cpp Scene_c2t3_item.moc)
|
||||
add_item(scene_polyhedron_item Scene_polyhedron_item.cpp Scene_polyhedron_item.moc)
|
||||
add_item(scene_polyhedron_transform_item Scene_polyhedron_transform_item.cpp Scene_polyhedron_transform_item.moc)
|
||||
add_item(scene_combinatorial_map_item Scene_combinatorial_map_item.cpp Scene_combinatorial_map_item.moc)
|
||||
add_item(scene_polylines_item Scene_polylines_item.cpp Scene_polylines_item.moc)
|
||||
add_item(scene_edit_polyhedron_item Scene_edit_polyhedron_item.cpp Scene_edit_polyhedron_item.moc)
|
||||
add_item(scene_implicit_function_item Scene_implicit_function_item.cpp Scene_implicit_function_item.moc Color_ramp.cpp)
|
||||
add_item(scene_polygon_soup_item Scene_polygon_soup_item.cpp Scene_polygon_soup_item.moc)
|
||||
add_item(scene_nef_polyhedron_item Scene_nef_polyhedron_item.cpp Scene_nef_polyhedron_item.moc Scene_nef_rendering.cpp)
|
||||
add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp Scene_points_with_normal_item.moc)
|
||||
endif(QT4)
|
||||
if(QT5)
|
||||
add_item(scene_c2t3_item Scene_c2t3_item.cpp)
|
||||
add_item(scene_polyhedron_item Scene_polyhedron_item.cpp)
|
||||
add_item(scene_polyhedron_transform_item Scene_polyhedron_transform_item.cpp)
|
||||
add_item(scene_combinatorial_map_item Scene_combinatorial_map_item.cpp)
|
||||
add_item(scene_polylines_item Scene_polylines_item.cpp)
|
||||
add_item(scene_edit_polyhedron_item Scene_edit_polyhedron_item.cpp)
|
||||
add_item(scene_implicit_function_item Scene_implicit_function_item.cpp Color_ramp.cpp)
|
||||
add_item(scene_polygon_soup_item Scene_polygon_soup_item.cpp)
|
||||
add_item(scene_nef_polyhedron_item Scene_nef_polyhedron_item.cpp Scene_nef_rendering.cpp)
|
||||
add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp)
|
||||
endif(QT5)
|
||||
|
||||
# special
|
||||
target_link_libraries(scene_polyhedron_transform_item scene_polyhedron_item)
|
||||
|
||||
add_item(scene_combinatorial_map_item Scene_combinatorial_map_item.cpp Scene_combinatorial_map_item.moc)
|
||||
#add_item(scene_combinatorial_map_item Scene_combinatorial_map_item.cpp Scene_combinatorial_map_item.moc)
|
||||
# special
|
||||
target_link_libraries(scene_combinatorial_map_item scene_polyhedron_item)
|
||||
|
||||
add_item(scene_polylines_item Scene_polylines_item.cpp Scene_polylines_item.moc)
|
||||
#add_item(scene_polylines_item Scene_polylines_item.cpp Scene_polylines_item.moc)
|
||||
|
||||
add_item(scene_edit_polyhedron_item Scene_edit_polyhedron_item.cpp Scene_edit_polyhedron_item.moc)
|
||||
#add_item(scene_edit_polyhedron_item Scene_edit_polyhedron_item.cpp Scene_edit_polyhedron_item.moc)
|
||||
# special
|
||||
target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item)
|
||||
|
||||
if(EIGEN3_FOUND OR TAUCS_FOUND)
|
||||
add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp Scene_textured_polyhedron_item.moc)
|
||||
if(QT4)
|
||||
add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp Scene_textured_polyhedron_item.moc)
|
||||
endif(QT4)
|
||||
if(QT5)
|
||||
add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp)
|
||||
endif(QT5)
|
||||
endif(EIGEN3_FOUND OR TAUCS_FOUND)
|
||||
|
||||
add_item(scene_implicit_function_item Scene_implicit_function_item.cpp Scene_implicit_function_item.moc Color_ramp.cpp)
|
||||
#add_item(scene_implicit_function_item Scene_implicit_function_item.cpp Scene_implicit_function_item.moc Color_ramp.cpp)
|
||||
|
||||
add_item(scene_polygon_soup_item Scene_polygon_soup_item.cpp Scene_polygon_soup_item.moc)
|
||||
#add_item(scene_polygon_soup_item Scene_polygon_soup_item.cpp Scene_polygon_soup_item.moc)
|
||||
target_link_libraries(scene_polygon_soup_item scene_polyhedron_item)
|
||||
add_item(scene_nef_polyhedron_item Scene_nef_polyhedron_item.cpp Scene_nef_polyhedron_item.moc
|
||||
Scene_nef_rendering.cpp)
|
||||
#add_item(scene_nef_polyhedron_item Scene_nef_polyhedron_item.cpp Scene_nef_polyhedron_item.moc Scene_nef_rendering.cpp)
|
||||
target_link_libraries(scene_nef_polyhedron_item scene_polyhedron_item)
|
||||
add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp Scene_points_with_normal_item.moc)
|
||||
#add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp Scene_points_with_normal_item.moc)
|
||||
|
||||
foreach( lib
|
||||
demo_framework
|
||||
|
|
@ -252,6 +296,8 @@ if((QT4 OR QT5) AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
# if(POLYHEDRON_DEMO_ENABLE_FORWARD_DECL)
|
||||
set(CGAL_POLYHEDRON_DEMO_DEFINITIONS "-DUSE_FORWARD_DECL")
|
||||
add_definitions(${CGAL_POLYHEDRON_DEMO_DEFINITIONS})
|
||||
|
||||
if(QT4)
|
||||
add_executable ( Polyhedron_3 MainWindow.cpp
|
||||
Polyhedron_3.cpp
|
||||
# Viewer.cpp
|
||||
|
|
@ -260,6 +306,17 @@ if((QT4 OR QT5) AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
File_loader_dialog_moc.cpp
|
||||
# Viewer_moc.cpp
|
||||
${FileLoaderDialogUI_files} ${MainWindowUI_files} ${PreferencesUI_FILES} ${RESOURCE_FILES} )
|
||||
endif(QT4)
|
||||
if(QT5)
|
||||
add_executable ( Polyhedron_3 MainWindow.cpp
|
||||
Polyhedron_3.cpp
|
||||
# Viewer.cpp
|
||||
# Scene.cpp
|
||||
File_loader_dialog_moc.cpp
|
||||
# Viewer_moc.cpp
|
||||
${FileLoaderDialogUI_files} ${MainWindowUI_files} ${PreferencesUI_FILES} ${RESOURCE_FILES} )
|
||||
endif(QT5)
|
||||
|
||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 )
|
||||
if(EIGEN3_FOUND OR TAUCS_FOUND)
|
||||
# add_executable( Polyhedron_3 Scene_tex_rendering.cpp Scene_tex_polyhedron_operations.cpp )
|
||||
|
|
@ -300,11 +357,19 @@ if((QT4 OR QT5) AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
polyhedron_demo_plugin(remeshing_plugin Polyhedron_demo_remeshing_plugin Polyhedron_demo_remeshing_plugin_cgal_code.cpp Mesher_base.cpp ${remeshingUI_FILES})
|
||||
target_link_libraries(remeshing_plugin scene_polyhedron_item scene_polygon_soup_item scene_c2t3_item)
|
||||
|
||||
if(QT4)
|
||||
polyhedron_demo_plugin(camera_positions_plugin
|
||||
Polyhedron_demo_camera_positions_plugin
|
||||
Camera_positions_list
|
||||
Camera_positions_list.moc
|
||||
${cameraUI_FILES})
|
||||
endif(QT4)
|
||||
if(QT5)
|
||||
polyhedron_demo_plugin(camera_positions_plugin
|
||||
Polyhedron_demo_camera_positions_plugin
|
||||
Camera_positions_list
|
||||
${cameraUI_FILES})
|
||||
endif(QT5)
|
||||
|
||||
target_link_libraries( camera_positions_plugin ${QGLVIEWER_LIBRARIES} demo_framework)
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@ class Io_implicit_function_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
Io_implicit_function_plugin();
|
||||
virtual ~Io_implicit_function_plugin() {}
|
||||
|
|
@ -209,7 +213,9 @@ load_function_plugins()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Io_implicit_function_plugin, Io_implicit_function_plugin)
|
||||
#endif
|
||||
|
||||
#include "Io_implicit_function_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -142,12 +142,25 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
sceneView->setItemDelegate(new SceneDelegate(this));
|
||||
|
||||
sceneView->header()->setStretchLastSection(false);
|
||||
|
||||
//New for Qt5 version !
|
||||
#if QT_VERSION >= 0x050000
|
||||
|
||||
sceneView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch);
|
||||
sceneView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch);
|
||||
sceneView->header()->setSectionResizeMode(Scene::ColorColumn, QHeaderView::ResizeToContents);
|
||||
sceneView->header()->setSectionResizeMode(Scene::RenderingModeColumn, QHeaderView::Fixed);
|
||||
sceneView->header()->setSectionResizeMode(Scene::ABColumn, QHeaderView::Fixed);
|
||||
sceneView->header()->setSectionResizeMode(Scene::VisibleColumn, QHeaderView::Fixed);
|
||||
#else
|
||||
|
||||
sceneView->header()->setResizeMode(Scene::NameColumn, QHeaderView::Stretch);
|
||||
sceneView->header()->setResizeMode(Scene::NameColumn, QHeaderView::Stretch);
|
||||
sceneView->header()->setResizeMode(Scene::ColorColumn, QHeaderView::ResizeToContents);
|
||||
sceneView->header()->setResizeMode(Scene::RenderingModeColumn, QHeaderView::Fixed);
|
||||
sceneView->header()->setResizeMode(Scene::ABColumn, QHeaderView::Fixed);
|
||||
sceneView->header()->setResizeMode(Scene::VisibleColumn, QHeaderView::Fixed);
|
||||
#endif
|
||||
|
||||
sceneView->resizeColumnToContents(Scene::ColorColumn);
|
||||
sceneView->resizeColumnToContents(Scene::RenderingModeColumn);
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ int main(int argc, char **argv)
|
|||
app.setOrganizationName("GeometryFactory");
|
||||
app.setApplicationName("Polyhedron_3 demo");
|
||||
|
||||
// Import resources from libCGALQt4.
|
||||
// Import resources from libCGAL (Qt4 or Qt5).
|
||||
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
|
||||
CGAL_QT4_INIT_RESOURCES;
|
||||
CGAL_QT_INIT_RESOURCES;//New for Qt5 version !
|
||||
|
||||
MainWindow mainWindow;
|
||||
mainWindow.show();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@ class Polyhedron_demo_camera_positions_plugin :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
|
||||
public:
|
||||
void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
|
||||
QList<QAction*> actions() const;
|
||||
|
|
@ -44,6 +50,8 @@ Polyhedron_demo_camera_positions_plugin::actions() const
|
|||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_camera_positions_plugin, Polyhedron_demo_camera_positions_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_camera_positions_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ class Polyhedron_demo_convex_hull_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -99,6 +103,8 @@ void Polyhedron_demo_convex_hull_plugin::on_actionConvexHull_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_convex_hull_plugin, Polyhedron_demo_convex_hull_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_convex_hull_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ class Polyhedron_demo_corefinement_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
bool applicable() const {
|
||||
|
|
@ -174,6 +178,8 @@ void Polyhedron_demo_corefinement_plugin::corefinement()
|
|||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_corefinement_plugin, Polyhedron_demo_corefinement_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_corefinement_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -151,6 +151,10 @@ class Polyhedron_demo_cut_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
Polyhedron_demo_cut_plugin() : QObject(), edges_item(0) {
|
||||
}
|
||||
|
|
@ -303,6 +307,8 @@ void Polyhedron_demo_cut_plugin::enableAction() {
|
|||
actionCreateCutPlane->setEnabled(true);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_cut_plugin, Polyhedron_demo_cut_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_cut_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ class Polyhedron_demo_edit_polyhedron_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
Polyhedron_demo_edit_polyhedron_plugin()
|
||||
: Polyhedron_demo_plugin_helper(), size(0)
|
||||
|
|
@ -123,6 +127,8 @@ void Polyhedron_demo_edit_polyhedron_plugin::edition() {
|
|||
scene->itemChanged(edit_item);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_edit_polyhedron_plugin, Polyhedron_demo_edit_polyhedron_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_edit_polyhedron_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ class Polyhedron_demo_gocad_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
QString nameFilters() const;
|
||||
QString name() const { return "gocad_plugin"; }
|
||||
|
|
@ -105,6 +109,9 @@ bool Polyhedron_demo_gocad_plugin::save(const Scene_item* item, QFileInfo filein
|
|||
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_gocad_plugin, Polyhedron_demo_gocad_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_gocad_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ class Polyhedron_demo_inside_out_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -66,6 +70,8 @@ void Polyhedron_demo_inside_out_plugin::on_actionInsideOut_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_inside_out_plugin, Polyhedron_demo_inside_out_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_inside_out_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ class Polyhedron_demo_intersection_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
bool applicable() const {
|
||||
|
|
@ -213,6 +217,8 @@ void Polyhedron_demo_intersection_plugin::intersection()
|
|||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_intersection_plugin, Polyhedron_demo_intersection_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_intersection_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ class Polyhedron_demo_io_nef_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
QString nameFilters() const;
|
||||
QString name() const { return "io_nef_plugin"; }
|
||||
|
|
@ -73,6 +77,9 @@ bool Polyhedron_demo_io_nef_plugin::save(const Scene_item* item, QFileInfo filei
|
|||
return (nef_item && nef_item->save(out));
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_io_nef_plugin, Polyhedron_demo_io_nef_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_io_nef_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ class Polyhedron_demo_jet_fitting_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -126,6 +130,8 @@ void Polyhedron_demo_jet_fitting_plugin::on_actionEstimateCurvature_triggered()
|
|||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_jet_fitting_plugin, Polyhedron_demo_jet_fitting_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_jet_fitting_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Polyhedron_demo_join_polyhedra_plugin:
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
QAction* actionJoinPolyhedra;
|
||||
public:
|
||||
QList<QAction*> actions() const { return QList<QAction*>() << actionJoinPolyhedra; }
|
||||
|
|
@ -82,6 +87,8 @@ void Polyhedron_demo_join_polyhedra_plugin::on_actionJoinPolyhedra_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_join_polyhedra_plugin, Polyhedron_demo_join_polyhedra_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_join_polyhedra_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ class Polyhedron_demo_kernel_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -133,6 +137,8 @@ void Polyhedron_demo_kernel_plugin::on_actionKernel_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_kernel_plugin, Polyhedron_demo_kernel_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_kernel_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ class Polyhedron_demo_mesh_3_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
|
||||
this->scene = scene_interface;
|
||||
|
|
@ -133,7 +137,9 @@ void Polyhedron_demo_mesh_3_plugin::mesh_3()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_mesh_3_plugin, Polyhedron_demo_mesh_3_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_mesh_3_plugin.moc"
|
||||
|
||||
|
|
|
|||
|
|
@ -329,4 +329,8 @@ Scene_item* cgal_code_mesh_3(const Polyhedron* pMesh,
|
|||
}
|
||||
}
|
||||
|
||||
#include "Scene_c3t3_item.moc"
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include "Polyhedron_demo_mesh_3_plugin_cgal_code.moc"
|
||||
#else
|
||||
//#include "Scene_c3t3_item.moc" //Check this one, it's strange moc include.
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -48,7 +48,12 @@ class Polyhedron_demo_mesh_segmentation_plugin :
|
|||
public Polyhedron_demo_plugin_helper
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
private:
|
||||
typedef std::map<Scene_polyhedron_item*, std::vector<double> > Item_sdf_map;
|
||||
public:
|
||||
|
|
@ -348,6 +353,8 @@ void Polyhedron_demo_mesh_segmentation_plugin::colorize_segmentation(
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_mesh_segmentation_plugin, Polyhedron_demo_mesh_segmentation_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_mesh_segmentation_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ class Polyhedron_demo_mesh_simplification_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -47,6 +51,18 @@ void Polyhedron_demo_mesh_simplification_plugin::on_actionSimplify_triggered()
|
|||
|
||||
// get option (#edges)
|
||||
bool ok;
|
||||
|
||||
//New for Qt5 version !
|
||||
#if QT_VERSION >= 0x050000
|
||||
const int nb_edges =
|
||||
QInputDialog::getInt(mw, tr("Stop condition"),
|
||||
tr("Number of edges:"),
|
||||
(int)(pMesh->size_of_halfedges () / 4), // default value: current #edges / 2
|
||||
3, // min = one triangle
|
||||
(int)pMesh->size_of_halfedges(), // max #edges
|
||||
1, // step for the spinbox
|
||||
&ok);
|
||||
#else
|
||||
const int nb_edges =
|
||||
QInputDialog::getInteger(mw, tr("Stop condition"),
|
||||
tr("Number of edges:"),
|
||||
|
|
@ -55,6 +71,8 @@ void Polyhedron_demo_mesh_simplification_plugin::on_actionSimplify_triggered()
|
|||
(int)pMesh->size_of_halfedges(), // max #edges
|
||||
1, // step for the spinbox
|
||||
&ok);
|
||||
#endif
|
||||
|
||||
|
||||
// check user cancellation
|
||||
if(!ok)
|
||||
|
|
@ -79,6 +97,8 @@ void Polyhedron_demo_mesh_simplification_plugin::on_actionSimplify_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_mesh_simplification_plugin, Polyhedron_demo_mesh_simplification_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_mesh_simplification_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ class Polyhedron_demo_nef_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
QStringList actionsNames() const {
|
||||
return QStringList() << "actionToNef"
|
||||
|
|
@ -288,6 +292,8 @@ void Polyhedron_demo_nef_plugin::boolean_operation(const Boolean_operation opera
|
|||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_nef_plugin, Polyhedron_demo_nef_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_nef_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ class Polyhedron_demo_normal_estimation_plugin :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
QAction* actionNormalEstimation;
|
||||
QAction* actionNormalInversion;
|
||||
|
||||
|
|
@ -196,6 +201,8 @@ void Polyhedron_demo_normal_estimation_plugin::on_actionNormalEstimation_trigger
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_normal_estimation_plugin, Polyhedron_demo_normal_estimation_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_normal_estimation_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ class Polyhedron_demo_off_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
QString name() const { return "off_plugin"; }
|
||||
QString nameFilters() const { return "OFF files (*.off)"; }
|
||||
|
|
@ -83,6 +87,9 @@ bool Polyhedron_demo_off_plugin::save(const Scene_item* item, QFileInfo fileinfo
|
|||
(soup_item && soup_item->save(out));
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_off_plugin, Polyhedron_demo_off_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_off_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ class Polyhedron_demo_off_to_nef_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
QString name() const { return "off_to_nef_plugin"; }
|
||||
QString nameFilters() const { return "OFF files, into nef (*.off)"; }
|
||||
|
|
@ -53,6 +57,9 @@ bool Polyhedron_demo_off_to_nef_plugin::save(const Scene_item*, QFileInfo)
|
|||
return false;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_off_to_nef_plugin, Polyhedron_demo_off_to_nef_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_off_to_nef_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ class Polyhedron_demo_off_to_xyz_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
public:
|
||||
QString name() const { return "off_to_xyz_plugin"; }
|
||||
QString nameFilters() const { return "OFF files as Point set (*.off)"; }
|
||||
|
|
@ -52,6 +55,9 @@ bool Polyhedron_demo_off_to_xyz_plugin::save(const Scene_item*, QFileInfo)
|
|||
return false;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_off_to_xyz_plugin, Polyhedron_demo_off_to_xyz_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_off_to_xyz_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ class Polyhedron_demo_orient_soup_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
void init(QMainWindow* mainWindow,
|
||||
Scene_interface* scene_interface,
|
||||
|
|
@ -160,6 +164,8 @@ void Polyhedron_demo_orient_soup_plugin::displayNonManifoldEdges()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_orient_soup_plugin, Polyhedron_demo_orient_soup_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_orient_soup_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ class Polyhedron_demo_parameterization_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -145,6 +149,8 @@ void Polyhedron_demo_parameterization_plugin::on_actionDCP_triggered()
|
|||
parameterize(PARAM_DCP);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_parameterization_plugin, Polyhedron_demo_parameterization_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_parameterization_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ class Polyhedron_demo_pca_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -207,6 +211,8 @@ void Polyhedron_demo_pca_plugin::on_actionFitLine_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_pca_plugin, Polyhedron_demo_pca_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_pca_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -54,8 +54,15 @@ void Polyhedron_demo_plugin_helper::autoConnectActions()
|
|||
i < metaObject->methodCount();
|
||||
++i)
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
const int pos = QString(metaObject->method(i).methodSignature()).indexOf('(');
|
||||
methodsNames << QString(metaObject->method(i).methodSignature()).left(pos);
|
||||
#else
|
||||
const int pos = QString(metaObject->method(i).signature()).indexOf('(');
|
||||
methodsNames << QString(metaObject->method(i).signature()).left(pos);
|
||||
#endif
|
||||
|
||||
|
||||
methods << metaObject->method(i);
|
||||
}
|
||||
|
||||
|
|
@ -72,24 +79,48 @@ void Polyhedron_demo_plugin_helper::autoConnectActions()
|
|||
|
||||
if(action_method.methodType() == QMetaMethod::Signal)
|
||||
{
|
||||
//New for Qt5 version !
|
||||
#if QT_VERSION >= 0x050000
|
||||
const int pos = QString(action_method.methodSignature()).indexOf('(');
|
||||
QString methodName = QString(action_method.methodSignature()).left(pos);
|
||||
#else
|
||||
const int pos = QString(action_method.signature()).indexOf('(');
|
||||
QString methodName = QString(action_method.signature()).left(pos);
|
||||
#endif
|
||||
|
||||
QString slotName =
|
||||
QString("on_%1_%2").arg(action->objectName()).arg(methodName);
|
||||
// qDebug() << thisObject->tr("Slot %1 (%2)...").arg(slotName).arg(i);
|
||||
int index = methodsNames.indexOf(slotName);
|
||||
if(index>=0 && !connected.contains(slotName)) {
|
||||
const bool ok =
|
||||
QObject::connect(action,
|
||||
if(index>=0 && !connected.contains(slotName))
|
||||
{
|
||||
//New for Qt5 version !
|
||||
#if QT_VERSION >= 0x050000
|
||||
const bool ok = QObject::connect(action,
|
||||
qPrintable(QString("2%1").arg(QString(action_method.methodSignature()))),
|
||||
thisObject,
|
||||
qPrintable(QString("1%1").arg(QString(methods[index].methodSignature()))));
|
||||
#else
|
||||
const bool ok = QObject::connect(action,
|
||||
qPrintable(QString("2%1").arg(action_method.signature())),
|
||||
thisObject,
|
||||
qPrintable(QString("1%1").arg(methods[index].signature())));
|
||||
#endif
|
||||
|
||||
if(!ok)
|
||||
{
|
||||
//New for Qt5 version !
|
||||
#if QT_VERSION >= 0x050000
|
||||
qDebug() << thisObject->tr("Cannot connect method %1.%2 to slot %3!")
|
||||
.arg(action->objectName())
|
||||
.arg(action_method.signature())
|
||||
.arg(methods[index].signature());
|
||||
.arg(QString(action_method.methodSignature()))
|
||||
.arg(QString(methods[index].methodSignature()));
|
||||
#else
|
||||
qDebug() << thisObject->tr("Cannot connect method %1.%2 to slot %3!")
|
||||
.arg(action->objectName())
|
||||
.arg(action_method.methodSignature())
|
||||
.arg(methods[index].methodSignature());
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
// qDebug(" ->Connected!");
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ class Polyhedron_demo_point_inside_polyhedron_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
bool applicable() const
|
||||
{
|
||||
|
|
@ -178,7 +182,17 @@ public slots:
|
|||
|
||||
// take number of points param
|
||||
bool ok;
|
||||
#if QT_VERSION >= 0x050000
|
||||
const int nb_points =
|
||||
QInputDialog::getInt(mw, tr("Number of Points"),
|
||||
tr("Number of Points:"),
|
||||
100000, // default value
|
||||
1, // min
|
||||
(int)1.e9, // max
|
||||
10, // step for the spinbox
|
||||
&ok);
|
||||
#else
|
||||
const int nb_points =
|
||||
QInputDialog::getInteger(mw, tr("Number of Points"),
|
||||
tr("Number of Points:"),
|
||||
100000, // default value
|
||||
|
|
@ -186,6 +200,7 @@ public slots:
|
|||
(int)1.e9, // max
|
||||
10, // step for the spinbox
|
||||
&ok);
|
||||
#endif
|
||||
|
||||
if(!ok) { return; }
|
||||
|
||||
|
|
@ -219,6 +234,8 @@ private:
|
|||
|
||||
}; // end Polyhedron_demo_point_inside_polyhedron_plugin
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_point_inside_polyhedron_plugin, Polyhedron_demo_point_inside_polyhedron_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_point_inside_polyhedron_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ class Polyhedron_demo_point_set_average_spacing_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
private:
|
||||
QAction* actionAverageSpacing;
|
||||
|
||||
|
|
@ -63,6 +67,18 @@ void Polyhedron_demo_point_set_average_spacing_plugin::on_actionAverageSpacing_t
|
|||
|
||||
// Gets options
|
||||
bool ok;
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
const int nb_neighbors =
|
||||
QInputDialog::getInt((QWidget*)mw,
|
||||
tr("Average Spacing"), // dialog title
|
||||
tr("Number of neighbors:"), // field label
|
||||
6, // default value = 1 ring
|
||||
6, // min
|
||||
1000, // max
|
||||
1, // step
|
||||
&ok);
|
||||
#else
|
||||
const int nb_neighbors =
|
||||
QInputDialog::getInteger((QWidget*)mw,
|
||||
tr("Average Spacing"), // dialog title
|
||||
|
|
@ -72,6 +88,7 @@ void Polyhedron_demo_point_set_average_spacing_plugin::on_actionAverageSpacing_t
|
|||
1000, // max
|
||||
1, // step
|
||||
&ok);
|
||||
#endif
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
|
|
@ -104,6 +121,8 @@ void Polyhedron_demo_point_set_average_spacing_plugin::on_actionAverageSpacing_t
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_average_spacing_plugin, Polyhedron_demo_point_set_average_spacing_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_point_set_average_spacing_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ class Polyhedron_demo_point_set_outliers_removal_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
private:
|
||||
QAction* actionOutlierRemoval;
|
||||
|
||||
|
|
@ -112,6 +116,8 @@ void Polyhedron_demo_point_set_outliers_removal_plugin::on_actionOutlierRemoval_
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_outliers_removal_plugin, Polyhedron_demo_point_set_outliers_removal_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_point_set_outliers_removal_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ class Polyhedron_demo_point_set_simplification_plugin :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
QAction* actionSimplify;
|
||||
|
||||
public:
|
||||
|
|
@ -138,6 +143,8 @@ void Polyhedron_demo_point_set_simplification_plugin::on_actionSimplify_triggere
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_simplification_plugin, Polyhedron_demo_point_set_simplification_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_point_set_simplification_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Polyhedron_demo_point_set_smoothing_plugin :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
QAction* actionJetSmoothing;
|
||||
|
||||
public:
|
||||
|
|
@ -55,6 +60,18 @@ void Polyhedron_demo_point_set_smoothing_plugin::on_actionJetSmoothing_triggered
|
|||
|
||||
// Gets options
|
||||
bool ok;
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
const unsigned int nb_neighbors =
|
||||
QInputDialog::getInt((QWidget*)mw,
|
||||
tr("Jet Smoothing"), // dialog title
|
||||
tr("Number of neighbors:"), // field label
|
||||
24, // default value = fast
|
||||
6, // min
|
||||
1000, // max
|
||||
1, // step
|
||||
&ok);
|
||||
#else
|
||||
const unsigned int nb_neighbors =
|
||||
QInputDialog::getInteger((QWidget*)mw,
|
||||
tr("Jet Smoothing"), // dialog title
|
||||
|
|
@ -64,6 +81,7 @@ void Polyhedron_demo_point_set_smoothing_plugin::on_actionJetSmoothing_triggered
|
|||
1000, // max
|
||||
1, // step
|
||||
&ok);
|
||||
#endif
|
||||
if(!ok) return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
|
|
@ -79,6 +97,8 @@ void Polyhedron_demo_point_set_smoothing_plugin::on_actionJetSmoothing_triggered
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_point_set_smoothing_plugin, Polyhedron_demo_point_set_smoothing_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_point_set_smoothing_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ class Polyhedron_demo_poisson_plugin :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
QAction* actionPoissonReconstruction;
|
||||
|
||||
public:
|
||||
|
|
@ -126,6 +131,8 @@ void Polyhedron_demo_poisson_plugin::on_actionPoissonReconstruction_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_poisson_plugin, Polyhedron_demo_poisson_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_poisson_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -78,8 +78,9 @@ Polyhedron* poisson_reconstruct(const Point_set& points,
|
|||
// Computes implicit function
|
||||
//***************************************
|
||||
|
||||
|
||||
std::cerr << "Computes Poisson implicit function "
|
||||
<< "using " << solver_name.toAscii().data() << " solver...\n";
|
||||
<< "using " << solver_name.toLatin1().data() << " solver...\n";
|
||||
|
||||
|
||||
// Creates implicit function from the point set.
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ class Polyhedron_demo_polyhedron_slicer_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
bool applicable() const { return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex())); }
|
||||
void print_message(QString message) { messages->information(message);}
|
||||
|
|
@ -358,6 +362,9 @@ void Polyhedron_demo_polyhedron_slicer_plugin::intersection_of_plane_Polyhedra_3
|
|||
}
|
||||
print_message(QString("%1 axis aligned planes are found, and points are projected...").arg(nb_projection));
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_polyhedron_slicer_plugin, Polyhedron_demo_polyhedron_slicer_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_polyhedron_slicer_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Polyhedron_demo_polyhedron_stitching_plugin :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
QAction* actionDetectBorders;
|
||||
QAction* actionStitchBorders;
|
||||
public:
|
||||
|
|
@ -93,6 +98,8 @@ void Polyhedron_demo_polyhedron_stitching_plugin::on_actionStitchBorders_trigger
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_polyhedron_stitching_plugin, Polyhedron_demo_polyhedron_stitching_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_polyhedron_stitching_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ class Polyhedron_demo_polylines_io_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
QString name() const { return "polylines_io_plugin"; }
|
||||
QString nameFilters() const { return "Polylines files (*.polylines.txt *.cgal)"; }
|
||||
|
|
@ -119,6 +123,9 @@ bool Polyhedron_demo_polylines_io_plugin::save(const Scene_item* item, QFileInfo
|
|||
return (bool) out;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_polylines_io_plugin, Polyhedron_demo_polylines_io_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_polylines_io_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ class Polyhedron_demo_remeshing_plugin :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
void init(QMainWindow* mainWindow, Scene_interface* scene_interface) {
|
||||
this->scene = scene_interface;
|
||||
|
|
@ -134,7 +139,9 @@ void Polyhedron_demo_remeshing_plugin::remesh()
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_remeshing_plugin, Polyhedron_demo_remeshing_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_remeshing_plugin.moc"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ class Polyhedron_demo_self_intersection_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -88,6 +92,8 @@ void Polyhedron_demo_self_intersection_plugin::on_actionSelfIntersection_trigger
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_self_intersection_plugin, Polyhedron_demo_self_intersection_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_self_intersection_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@ class Polyhedron_demo_stl_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
public:
|
||||
QString nameFilters() const;
|
||||
QString name() const { return "stl_plugin"; }
|
||||
|
|
@ -207,6 +210,9 @@ bool Polyhedron_demo_stl_plugin::save(const Scene_item*, QFileInfo)
|
|||
return false;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_stl_plugin, Polyhedron_demo_stl_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_stl_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ class Polyhedron_demo_subdivision_methods_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
public:
|
||||
// used by Polyhedron_demo_plugin_helper
|
||||
QStringList actionsNames() const {
|
||||
|
|
@ -91,6 +94,8 @@ void Polyhedron_demo_subdivision_methods_plugin::on_actionSqrt3_triggered()
|
|||
scene->itemChanged(item);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_subdivision_methods_plugin, Polyhedron_demo_subdivision_methods_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_subdivision_methods_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ class Polyhedron_demo_transform_polyhedron_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
Polyhedron_demo_transform_polyhedron_plugin():started(false){}
|
||||
|
|
@ -138,7 +142,8 @@ void Polyhedron_demo_transform_polyhedron_plugin::end(){
|
|||
delete transform_item;
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_transform_polyhedron_plugin, Polyhedron_demo_transform_polyhedron_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_transform_polyhedron_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ class Polyhedron_demo_triangulate_facets_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
// To silent a warning -Woverloaded-virtual
|
||||
// See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
|
||||
|
|
@ -137,6 +141,8 @@ private:
|
|||
Messages_interface* messages;
|
||||
};
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_triangulate_facets_plugin, Polyhedron_demo_triangulate_facets_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_triangulate_facets_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -97,6 +97,10 @@ class Polyhedron_demo_trivial_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
void init(QMainWindow* mainWindow, Scene_interface* scene_interface);
|
||||
QList<QAction*> actions() const {
|
||||
|
|
@ -146,6 +150,8 @@ void Polyhedron_demo_trivial_plugin::enableAction() {
|
|||
actionBbox->setEnabled(true);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_trivial_plugin, Polyhedron_demo_trivial_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_trivial_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ class Polyhedron_demo_xyz_plugin :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Polyhedron_demo_io_plugin_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
QString name() const { return "xyz_plugin"; }
|
||||
|
||||
|
|
@ -75,6 +79,9 @@ bool Polyhedron_demo_xyz_plugin::save(const Scene_item* item, QFileInfo fileinfo
|
|||
return point_set_item->write_xyz_point_set(out);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Polyhedron_demo_xyz_plugin, Polyhedron_demo_xyz_plugin)
|
||||
#endif
|
||||
|
||||
#include "Polyhedron_demo_xyz_plugin.moc"
|
||||
|
|
|
|||
|
|
@ -41,9 +41,19 @@ Scene::addItem(Scene_item* item)
|
|||
|
||||
connect(item, SIGNAL(itemChanged()),
|
||||
this, SLOT(itemChanged()));
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
QAbstractListModel::beginResetModel();
|
||||
emit updated_bbox();
|
||||
emit updated();
|
||||
QAbstractListModel::endResetModel();
|
||||
#else
|
||||
emit updated_bbox();
|
||||
emit updated();
|
||||
QAbstractListModel::reset();
|
||||
#endif
|
||||
|
||||
|
||||
Item_id id = m_entries.size() - 1;
|
||||
emit newItem(id);
|
||||
return id;
|
||||
|
|
@ -87,8 +97,15 @@ Scene::erase(int index)
|
|||
m_entries.removeAt(index);
|
||||
|
||||
selected_item = -1;
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
QAbstractListModel::beginResetModel();
|
||||
emit updated();
|
||||
QAbstractListModel::endResetModel();
|
||||
#else
|
||||
emit updated();
|
||||
QAbstractListModel::reset();
|
||||
#endif
|
||||
|
||||
if(--index >= 0)
|
||||
return index;
|
||||
|
|
@ -118,8 +135,14 @@ Scene::erase(QList<int> indices)
|
|||
}
|
||||
|
||||
selected_item = -1;
|
||||
#if QT_VERSION >= 0x050000
|
||||
QAbstractListModel::beginResetModel();
|
||||
emit updated();
|
||||
QAbstractListModel::endResetModel();
|
||||
#else
|
||||
emit updated();
|
||||
QAbstractListModel::reset();
|
||||
#endif
|
||||
|
||||
int index = max_index + 1 - indices.size();
|
||||
if(index >= m_entries.size()) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ set( QT_USE_QTMAIN TRUE )
|
|||
set( QT_USE_QTSCRIPT TRUE )
|
||||
set( QT_USE_QTOPENGL TRUE )
|
||||
|
||||
#New for Qt5 version !
|
||||
if(QT4 OR QT5)
|
||||
option (USE_QT5 "Use Qt5 version instead of Qt4" ON)
|
||||
endif()
|
||||
|
||||
if(USE_QT5)
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ class Klein_implicit_function :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Implicit_function_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
virtual QString name() const { return "Klein function"; }
|
||||
|
||||
|
|
@ -50,6 +54,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Klein_implicit_function, Klein_implicit_function)
|
||||
#endif
|
||||
|
||||
#include "Klein_implicit_function.moc"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,11 @@ class Sphere_implicit_function :
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Implicit_function_interface)
|
||||
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
virtual QString name() const { return "Sphere function"; }
|
||||
|
||||
|
|
@ -50,8 +54,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Sphere_implicit_function, Sphere_implicit_function)
|
||||
#endif
|
||||
|
||||
#include "Sphere_implicit_function.moc"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ class Tanglecube_implicit_function :
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(Implicit_function_interface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.Mesh3Demo.Implicit_function_interface/1.0")//New for Qt5 version !
|
||||
#endif
|
||||
|
||||
public:
|
||||
virtual QString name() const { return "Tanglecube function"; }
|
||||
|
||||
|
|
@ -52,8 +56,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#include <QtPlugin>
|
||||
Q_EXPORT_PLUGIN2(Tanglecube_implicit_function, Tanglecube_implicit_function)
|
||||
#endif
|
||||
|
||||
#include "Tanglecube_implicit_function.moc"
|
||||
|
|
|
|||
Loading…
Reference in New Issue