This commit is contained in:
Laurent Rineau 2024-03-26 18:22:46 +01:00
parent 3f434a21e3
commit 9e6433ff06
559 changed files with 1551 additions and 1549 deletions

4
.github/test.sh vendored
View File

@ -2,8 +2,8 @@
/usr/local/bin/cmake --version /usr/local/bin/cmake --version
FACTOR=$1 FACTOR=$1
set -ex set -ex
cd Polyhedron/demo cd Lab/demo
/usr/local/bin/cmake -S Polyhedron -B build -DCGAL_DIR=$2 /usr/local/bin/cmake -S Lab -B build -DCGAL_DIR=$2
LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build build -t help | egrep 'plugin$' |& cut -d\ -f2) LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build build -t help | egrep 'plugin$' |& cut -d\ -f2)
PLUGINS_ARRAY=(${LIST_OF_PLUGINS}); PLUGINS_ARRAY=(${LIST_OF_PLUGINS});
NB_OF_PLUGINS=${#PLUGINS_ARRAY[@]} NB_OF_PLUGINS=${#PLUGINS_ARRAY[@]}

View File

@ -1,4 +1,4 @@
name: Test Polyhedron Demo name: Compile CGAL Lab
on: [push, pull_request,workflow_dispatch] on: [push, pull_request,workflow_dispatch]

View File

@ -11,9 +11,9 @@ set(list_of_whitelisted_headers_txt [=[
CGAL/Three/Edge_container.h CGAL/Three/Edge_container.h
CGAL/Three/exceptions.h CGAL/Three/exceptions.h
CGAL/Three/Point_container.h CGAL/Three/Point_container.h
CGAL/Three/Polyhedron_demo_io_plugin_interface.h CGAL/Three/CGAL_Lab_io_plugin_interface.h
CGAL/Three/Polyhedron_demo_plugin_helper.h CGAL/Three/CGAL_Lab_plugin_helper.h
CGAL/Three/Polyhedron_demo_plugin_interface.h CGAL/Three/CGAL_Lab_plugin_interface.h
CGAL/Three/Primitive_container.h CGAL/Three/Primitive_container.h
CGAL/Three/Scene_draw_interface.h CGAL/Three/Scene_draw_interface.h
CGAL/Three/Scene_group_item.h CGAL/Three/Scene_group_item.h

View File

@ -3,7 +3,7 @@
#include "config.h" #include "config.h"
#include "Plugins/Mesh_3/config_mesh_3.h" #include "Plugins/Mesh_3/config_mesh_3.h"
// as otherwise it gets set via inclusion of Polyhedron_3.h // as otherwise it gets set via inclusion of cgallab.h
#include <CGAL/Default.h> #include <CGAL/Default.h>
#include "SMesh_type.h" #include "SMesh_type.h"

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h" #include "cgallab.h"
#include "MainWindow.h" #include "MainWindow.h"
#include <QMessageBox> #include <QMessageBox>
#include <CGAL/Qt/resources.h> #include <CGAL/Qt/resources.h>
@ -11,12 +11,12 @@
#include <clocale> #include <clocale>
struct Polyhedron_demo_impl { struct CGAL_Lab_impl {
bool catch_exceptions; bool catch_exceptions;
QScopedPointer<MainWindow> mainWindow; QScopedPointer<MainWindow> mainWindow;
Polyhedron_demo_impl() : catch_exceptions(true) {} CGAL_Lab_impl() : catch_exceptions(true) {}
}; // end struct Polyhedron_demo_impl }; // end struct CGAL_Lab_impl
int& code_to_call_before_creation_of_QCoreApplication(int& i) { int& code_to_call_before_creation_of_QCoreApplication(int& i) {
QSurfaceFormat fmt; QSurfaceFormat fmt;
@ -35,7 +35,7 @@ int& code_to_call_before_creation_of_QCoreApplication(int& i) {
return i; return i;
} }
Polyhedron_demo::Polyhedron_demo(int& argc, char **argv, CGAL_Lab::CGAL_Lab(int& argc, char **argv,
QString application_name, QString application_name,
QString main_window_title, QString main_window_title,
QStringList input_keywords) QStringList input_keywords)
@ -45,7 +45,7 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
// object. // object.
argv) argv)
, d_ptr_is_initialized(false) , d_ptr_is_initialized(false)
, d_ptr(new Polyhedron_demo_impl) , d_ptr(new CGAL_Lab_impl)
{ {
//We set the locale to avoid any trouble with VTK //We set the locale to avoid any trouble with VTK
std::setlocale(LC_ALL, "C"); std::setlocale(LC_ALL, "C");
@ -129,7 +129,7 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
} }
#endif #endif
mainWindow.loadScript(":/cgal/Polyhedron_3/javascript/lib.js"); mainWindow.loadScript(":/cgal/Lab/javascript/lib.js");
QFileInfo autostart_js("autostart.js"); QFileInfo autostart_js("autostart.js");
if(!parser.isSet(no_autostart) && autostart_js.exists()) { if(!parser.isSet(no_autostart) && autostart_js.exists()) {
mainWindow.loadScript(autostart_js); mainWindow.loadScript(autostart_js);
@ -140,14 +140,14 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
} }
Polyhedron_demo::~Polyhedron_demo() {} CGAL_Lab::~CGAL_Lab() {}
void Polyhedron_demo::do_not_catch_exceptions() { void CGAL_Lab::do_not_catch_exceptions() {
d_ptr->catch_exceptions = false; d_ptr->catch_exceptions = false;
setProperty("no-try-catch", true); setProperty("no-try-catch", true);
} }
bool Polyhedron_demo::notify(QObject* receiver, QEvent* event) bool CGAL_Lab::notify(QObject* receiver, QEvent* event)
{ {
if(!d_ptr_is_initialized || !d_ptr->catch_exceptions) if(!d_ptr_is_initialized || !d_ptr->catch_exceptions)
return QApplication::notify(receiver, event); return QApplication::notify(receiver, event);
@ -171,7 +171,7 @@ bool Polyhedron_demo::notify(QObject* receiver, QEvent* event)
return false; return false;
} }
int Polyhedron_demo::try_exec() int CGAL_Lab::try_exec()
{ {
// A Qt Script may have closed the main window. // A Qt Script may have closed the main window.
// The following loop launch app.exec() only if the main window is visible. // The following loop launch app.exec() only if the main window is visible.

View File

@ -1,6 +1,6 @@
#ifndef POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H #ifndef LAB_DEMO_DETECT_SHARP_EDGES_H
#define POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H #define LAB_DEMO_DETECT_SHARP_EDGES_H
#include <CGAL/Polygon_mesh_processing/detect_features.h> #include <CGAL/Polygon_mesh_processing/detect_features.h>
@ -29,4 +29,4 @@ namespace CGAL
}//end namespace CGAL }//end namespace CGAL
#endif //POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H #endif //LAB_DEMO_DETECT_SHARP_EDGES_H

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.1...3.23) cmake_minimum_required(VERSION 3.1...3.23)
project(Polyhedron_Demo) project(CGAL_Lab)
include(FeatureSummary) include(FeatureSummary)
@ -32,9 +32,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
include_directories(BEFORE ./ ./include ./CGAL_demo) include_directories(BEFORE ./ ./include ./CGAL_demo)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}") list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}")
option(POLYHEDRON_QTSCRIPT_DEBUGGER
"Activate the use of Qt Script Debugger in Polyhedron_3 demo" OFF)
# Find CGAL # Find CGAL
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 ImageIO) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 ImageIO)
set_package_properties(CGAL PROPERTIES TYPE REQUIRED) set_package_properties(CGAL PROPERTIES TYPE REQUIRED)
@ -73,8 +70,8 @@ set_package_properties(
PURPOSE "Required for the partition plugin.") PURPOSE "Required for the partition plugin.")
# Activate concurrency? # Activate concurrency?
option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) option(LAB_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON)
if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) if(LAB_DEMO_ACTIVATE_CONCURRENCY)
find_package(TBB QUIET) find_package(TBB QUIET)
include(CGAL_TBB_support) include(CGAL_TBB_support)
if(NOT TARGET CGAL::TBB_support) if(NOT TARGET CGAL::TBB_support)
@ -130,9 +127,9 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
qt6_generate_moc("File_loader_dialog.h" qt6_generate_moc("File_loader_dialog.h"
"${CMAKE_CURRENT_BINARY_DIR}/File_loader_dialog_moc.cpp") "${CMAKE_CURRENT_BINARY_DIR}/File_loader_dialog_moc.cpp")
include(${CMAKE_CURRENT_SOURCE_DIR}/polyhedron_demo_macros.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cgallab_macros.cmake)
qt6_add_resources(CGAL_Qt6_RESOURCE_FILES Polyhedron_3.qrc) qt6_add_resources(CGAL_Qt6_RESOURCE_FILES cgallab.qrc)
find_path( find_path(
CGAL_THREE_HEADERS_PATH CGAL_THREE_HEADERS_PATH
NAMES CGAL/Three/Scene_item.h NAMES CGAL/Three/Scene_item.h
@ -162,8 +159,8 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
# put plugins (which are shared libraries) at the same location as # put plugins (which are shared libraries) at the same location as
# executable files # executable files
set(CGAL_POLYHEDRON_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}") set(CGAL_LAB_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}")
set(LIBRARY_OUTPUT_PATH "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}") set(LIBRARY_OUTPUT_PATH "${CGAL_LAB_DEMO_PLUGINS_DIR}")
add_library( add_library(
demo_framework SHARED demo_framework SHARED
@ -187,7 +184,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
Scene_item_rendering_helper.cpp Scene_item_rendering_helper.cpp
Scene_item_rendering_helper_moc.cpp Scene_item_rendering_helper_moc.cpp
Primitive_container.cpp Primitive_container.cpp
Polyhedron_demo_plugin_helper.cpp cgallab_plugin_helper.cpp
CGAL_double_edit.cpp) CGAL_double_edit.cpp)
target_link_libraries(demo_framework PUBLIC Qt6::OpenGLWidgets Qt6::Widgets Qt6::Gui Qt6::Qml target_link_libraries(demo_framework PUBLIC Qt6::OpenGLWidgets Qt6::Widgets Qt6::Gui Qt6::Qml
CGAL::CGAL_Qt6) CGAL::CGAL_Qt6)
@ -350,9 +347,9 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
add_definitions(-DUSE_FORWARD_DECL) add_definitions(-DUSE_FORWARD_DECL)
add_library( add_library(
polyhedron_demo SHARED cgal_lab SHARED
MainWindow.cpp MainWindow.cpp
Polyhedron_demo.cpp CGAL_Lab.cpp
File_loader_dialog_moc.cpp File_loader_dialog_moc.cpp
Use_ssh.cpp Use_ssh.cpp
${CGAL_Qt6_RESOURCE_FILES} ${CGAL_Qt6_RESOURCE_FILES}
@ -363,30 +360,30 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
${statisticsUI_FILES} ${statisticsUI_FILES}
${SubViewerUI_files}) ${SubViewerUI_files})
target_link_libraries( target_link_libraries(
polyhedron_demo PUBLIC demo_framework point_dialog Qt6::Gui Qt6::OpenGLWidgets cgal_lab PUBLIC demo_framework point_dialog Qt6::Gui Qt6::OpenGLWidgets
Qt6::Widgets ) Qt6::Widgets )
if(LIBSSH_FOUND) if(LIBSSH_FOUND)
target_compile_definitions(polyhedron_demo PRIVATE -DCGAL_USE_SSH) target_compile_definitions(cgal_lab PRIVATE -DCGAL_USE_SSH)
target_link_libraries(polyhedron_demo PRIVATE ${LIBSSH_LIBRARIES}) target_link_libraries(cgal_lab PRIVATE ${LIBSSH_LIBRARIES})
target_include_directories(polyhedron_demo SYSTEM PRIVATE ${LIBSSH_INCLUDE_DIR}) target_include_directories(cgal_lab SYSTEM PRIVATE ${LIBSSH_INCLUDE_DIR})
endif() #libssh endif() #libssh
if(TARGET Qt6::WebSockets) if(TARGET Qt6::WebSockets)
target_compile_definitions(polyhedron_demo PRIVATE -DCGAL_USE_WEBSOCKETS) target_compile_definitions(cgal_lab PRIVATE -DCGAL_USE_WEBSOCKETS)
target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_WEBSOCKETS) target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_WEBSOCKETS)
target_link_libraries(polyhedron_demo PRIVATE Qt6::WebSockets) target_link_libraries(cgal_lab PRIVATE Qt6::WebSockets)
endif() endif()
cgal_add_compilation_test(polyhedron_demo) cgal_add_compilation_test(cgal_lab)
add_executable(Polyhedron_3 Polyhedron_3.cpp) add_executable(cgallab cgallab.cpp)
target_link_libraries(Polyhedron_3 PRIVATE polyhedron_demo) target_link_libraries(cgallab PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS Polyhedron_3) add_to_cached_list(CGAL_EXECUTABLE_TARGETS cgallab)
cgal_add_compilation_test(Polyhedron_3) cgal_add_compilation_test(cgallab)
target_link_libraries(Polyhedron_3 PRIVATE demo_framework) target_link_libraries(cgallab PRIVATE demo_framework)
# Link with CGAL # Link with CGAL
target_link_libraries(Polyhedron_3 PUBLIC CGAL::CGAL_Qt6) target_link_libraries(cgallab PUBLIC CGAL::CGAL_Qt6)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS Polyhedron_3) add_to_cached_list(CGAL_EXECUTABLE_TARGETS cgallab)
########### ###########
# PLUGINS # # PLUGINS #
@ -407,17 +404,17 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
# #
add_executable(CGAL_Mesh_3 Mesh_3.cpp) add_executable(CGAL_Mesh_3 Mesh_3.cpp)
add_dependencies(CGAL_Mesh_3 Mesh_3) add_dependencies(CGAL_Mesh_3 Mesh_3)
target_link_libraries(CGAL_Mesh_3 PRIVATE polyhedron_demo) target_link_libraries(CGAL_Mesh_3 PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_Mesh_3) add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_Mesh_3)
add_executable(CGAL_Classification Classification.cpp) add_executable(CGAL_Classification Classification.cpp)
add_dependencies(CGAL_Classification Classification) add_dependencies(CGAL_Classification Classification)
target_link_libraries(CGAL_Classification PRIVATE polyhedron_demo) target_link_libraries(CGAL_Classification PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_Classification) add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_Classification)
add_executable(CGAL_PMP PMP.cpp) add_executable(CGAL_PMP PMP.cpp)
add_dependencies(CGAL_PMP PMP) add_dependencies(CGAL_PMP PMP)
target_link_libraries(CGAL_PMP PRIVATE polyhedron_demo) target_link_libraries(CGAL_PMP PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_PMP) add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_PMP)
#WS Server #WS Server
@ -432,14 +429,14 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
if(TARGET CGAL_Qt6) if(TARGET CGAL_Qt6)
export( export(
TARGETS CGAL CGAL_Qt6 CGAL_ImageIO TARGETS CGAL CGAL_Qt6 CGAL_ImageIO
FILE polyhedron_demo_targets.cmake FILE cgal_lab_targets.cmake
NAMESPACE Polyhedron_) NAMESPACE Lab_)
endif() endif()
if(TARGET CGAL_Qt6_moc_and_resources) if(TARGET CGAL_Qt6_moc_and_resources)
export( export(
TARGETS CGAL_Qt6_moc_and_resources TARGETS CGAL_Qt6_moc_and_resources
NAMESPACE Polyhedron_ APPEND NAMESPACE Lab_ APPEND
FILE polyhedron_demo_targets.cmake) FILE cgal_lab_targets.cmake)
endif() endif()
export( export(
TARGETS demo_framework TARGETS demo_framework
@ -452,26 +449,26 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
scene_selection_item scene_selection_item
scene_item_decorator scene_item_decorator
scene_k_ring_selection scene_k_ring_selection
NAMESPACE Polyhedron_ APPEND NAMESPACE Lab_ APPEND
FILE polyhedron_demo_targets.cmake) FILE cgal_lab_targets.cmake)
configure_file(CGAL_polyhedron_demoConfig.cmake.in configure_file(cgallabConfig.cmake.in
CGAL_polyhedron_demoConfig.cmake) cgallabConfig.cmake)
#TO DO script the activation of all the plugins. #TO DO script the activation of all the plugins.
else(CGAL_Qt6_FOUND AND Qt6_FOUND) else(CGAL_Qt6_FOUND AND Qt6_FOUND)
set(POLYHEDRON_MISSING_DEPS "") set(Lab_MISSING_DEPS "")
if(NOT CGAL_Qt6_FOUND) if(NOT CGAL_Qt6_FOUND)
set(POLYHEDRON_MISSING_DEPS "the CGAL Qt6 library, ${POLYHEDRON_MISSING_DEPS}") set(Lab_MISSING_DEPS "the CGAL Qt6 library, ${Lab_MISSING_DEPS}")
endif() endif()
if(NOT Qt6_FOUND) if(NOT Qt6_FOUND)
set(POLYHEDRON_MISSING_DEPS "Qt6, ${POLYHEDRON_MISSING_DEPS}") set(Lab_MISSING_DEPS "Qt6, ${Lab_MISSING_DEPS}")
endif() endif()
message("NOTICE: XX This demo requires ${POLYHEDRON_MISSING_DEPS} and will not be compiled.") message("NOTICE: XX This demo requires ${Lab_MISSING_DEPS} and will not be compiled.")
endif(CGAL_Qt6_FOUND AND Qt6_FOUND) endif(CGAL_Qt6_FOUND AND Qt6_FOUND)

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h" #include "CGAL_Lab.h"
#include <clocale> #include <clocale>
#include <CGAL/Qt/resources.h> #include <CGAL/Qt/resources.h>
#include <QSurfaceFormat> #include <QSurfaceFormat>
@ -10,7 +10,7 @@
*/ */
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
Polyhedron_demo app(argc, argv, CGAL_Lab app(argc, argv,
"Classification demo", "Classification demo",
"CGAL Classification Demo", "CGAL Classification Demo",
QStringList() << "Classification"); QStringList() << "Classification");

View File

@ -52,8 +52,8 @@
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Scene_item_with_properties.h> #include <CGAL/Three/Scene_item_with_properties.h>
#include "ui_SubViewer.h" #include "ui_SubViewer.h"
#include "ui_MainWindow.h" #include "ui_MainWindow.h"
@ -247,7 +247,7 @@ MainWindow::MainWindow(const QStringList &keywords, bool verbose, QWidget* paren
// add the "About CGAL..." and "About demo..." entries // add the "About CGAL..." and "About demo..." entries
this->addAboutCGAL(); this->addAboutCGAL();
this->addAboutDemo(":/cgal/Polyhedron_3/about.html"); this->addAboutDemo(":/cgal/Lab/about.html");
// Connect the button "addButton" with actionLoad // Connect the button "addButton" with actionLoad
ui->addButton->setDefaultAction(ui->actionLoad); ui->addButton->setDefaultAction(ui->actionLoad);
@ -662,7 +662,7 @@ void MainWindow::loadPlugins()
} }
} }
} }
QString env_path = qgetenv("POLYHEDRON_DEMO_PLUGINS_PATH"); QString env_path = qgetenv("LAB_DEMO_PLUGINS_PATH");
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QChar separator = QDir::listSeparator(); QChar separator = QDir::listSeparator();
#else #else
@ -734,8 +734,8 @@ bool MainWindow::hasPlugin(const QString& pluginName) const
bool MainWindow::initPlugin(QObject* obj) bool MainWindow::initPlugin(QObject* obj)
{ {
QObjectList childs = this->children(); QObjectList childs = this->children();
CGAL::Three::Polyhedron_demo_plugin_interface* plugin = CGAL::Three::CGAL_Lab_plugin_interface* plugin =
qobject_cast<CGAL::Three::Polyhedron_demo_plugin_interface*>(obj); qobject_cast<CGAL::Three::CGAL_Lab_plugin_interface*>(obj);
if(plugin) { if(plugin) {
// Call plugin's init() method // Call plugin's init() method
obj->setParent(this); obj->setParent(this);
@ -759,8 +759,8 @@ bool MainWindow::initPlugin(QObject* obj)
bool MainWindow::initIOPlugin(QObject* obj) bool MainWindow::initIOPlugin(QObject* obj)
{ {
CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin = CGAL::Three::CGAL_Lab_io_plugin_interface* plugin =
qobject_cast<CGAL::Three::Polyhedron_demo_io_plugin_interface*>(obj); qobject_cast<CGAL::Three::CGAL_Lab_io_plugin_interface*>(obj);
if(plugin) { if(plugin) {
plugin->init(); plugin->init();
io_plugins << plugin; io_plugins << plugin;
@ -973,7 +973,7 @@ void MainWindow::reloadItem() {
continue; continue;
} }
CGAL::Three::Polyhedron_demo_io_plugin_interface* fileloader = findLoader(loader_name); CGAL::Three::CGAL_Lab_io_plugin_interface* fileloader = findLoader(loader_name);
QFileInfo fileinfo(filename); QFileInfo fileinfo(filename);
bool ok; bool ok;
QList<Scene_item*> new_items = loadItem(fileinfo, fileloader, ok, false); QList<Scene_item*> new_items = loadItem(fileinfo, fileloader, ok, false);
@ -1017,8 +1017,8 @@ void MainWindow::reloadItem() {
} }
} }
CGAL::Three::Polyhedron_demo_io_plugin_interface* MainWindow::findLoader(const QString& loader_name) const { CGAL::Three::CGAL_Lab_io_plugin_interface* MainWindow::findLoader(const QString& loader_name) const {
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin : for(CGAL::Three::CGAL_Lab_io_plugin_interface* io_plugin :
io_plugins) { io_plugins) {
if(io_plugin->name() == loader_name) { if(io_plugin->name() == loader_name) {
return io_plugin; return io_plugin;
@ -1103,7 +1103,7 @@ void MainWindow::open(QString filename)
{ {
// collect all io_plugins and offer them to load if the file extension match one name filter // collect all io_plugins and offer them to load if the file extension match one name filter
// also collect all available plugins in case of a no extension match // also collect all available plugins in case of a no extension match
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin : io_plugins) { for(CGAL::Three::CGAL_Lab_io_plugin_interface* io_plugin : io_plugins) {
if ( file_matches_filter(io_plugin->loadNameFilters(), filename.toLower()) ) if ( file_matches_filter(io_plugin->loadNameFilters(), filename.toLower()) )
{ {
if ( !io_plugin->canLoad(fileinfo) ) continue; if ( !io_plugin->canLoad(fileinfo) ) continue;
@ -1115,7 +1115,7 @@ void MainWindow::open(QString filename)
} }
} }
//if no plugin is correct, offer them all. //if no plugin is correct, offer them all.
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin : io_plugins) { for(CGAL::Three::CGAL_Lab_io_plugin_interface* io_plugin : io_plugins) {
all_items << io_plugin->name(); all_items << io_plugin->name();
} }
} }
@ -1183,7 +1183,7 @@ bool MainWindow::open(QString filename, QString loader_name) {
QList<Scene_item*> MainWindow::loadItem(QFileInfo fileinfo, QList<Scene_item*> MainWindow::loadItem(QFileInfo fileinfo,
CGAL::Three::Polyhedron_demo_io_plugin_interface* loader, CGAL::Three::CGAL_Lab_io_plugin_interface* loader,
bool &ok, bool &ok,
bool add_to_scene) { bool add_to_scene) {
if(!fileinfo.isFile() || !fileinfo.isReadable()) { if(!fileinfo.isFile() || !fileinfo.isReadable()) {
@ -1834,10 +1834,10 @@ void MainWindow::on_actionLoad_triggered()
filters << "All Files (*)"; filters << "All Files (*)";
typedef QMap<QString, CGAL::Three::Polyhedron_demo_io_plugin_interface*> FilterPluginMap; typedef QMap<QString, CGAL::Three::CGAL_Lab_io_plugin_interface*> FilterPluginMap;
FilterPluginMap filterPluginMap; FilterPluginMap filterPluginMap;
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin : io_plugins) { for(CGAL::Three::CGAL_Lab_io_plugin_interface* plugin : io_plugins) {
QStringList split_filters = plugin->loadNameFilters().split(";;"); QStringList split_filters = plugin->loadNameFilters().split(";;");
for(const QString& filter : split_filters) { for(const QString& filter : split_filters) {
FilterPluginMap::iterator it = filterPluginMap.find(filter); FilterPluginMap::iterator it = filterPluginMap.find(filter);
@ -1868,7 +1868,7 @@ void MainWindow::on_actionLoad_triggered()
FilterPluginMap::iterator it = FilterPluginMap::iterator it =
filterPluginMap.find(dialog.selectedNameFilter()); filterPluginMap.find(dialog.selectedNameFilter());
CGAL::Three::Polyhedron_demo_io_plugin_interface* selectedPlugin = nullptr; CGAL::Three::CGAL_Lab_io_plugin_interface* selectedPlugin = nullptr;
if(it != filterPluginMap.end()) { if(it != filterPluginMap.end()) {
selectedPlugin = it.value(); selectedPlugin = it.value();
@ -1927,10 +1927,10 @@ void MainWindow::on_actionSaveAs_triggered()
while(!to_save.empty()) while(!to_save.empty())
{ {
Scene_item* item = to_save.front(); Scene_item* item = to_save.front();
QVector<CGAL::Three::Polyhedron_demo_io_plugin_interface*> canSavePlugins; QVector<CGAL::Three::CGAL_Lab_io_plugin_interface*> canSavePlugins;
QStringList filters; QStringList filters;
QString sf; QString sf;
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin : io_plugins) { for(CGAL::Three::CGAL_Lab_io_plugin_interface* plugin : io_plugins) {
if(plugin->canSave(item)) { if(plugin->canSave(item)) {
canSavePlugins << plugin; canSavePlugins << plugin;
filters += plugin->saveNameFilters(); filters += plugin->saveNameFilters();
@ -2046,7 +2046,7 @@ void MainWindow::on_actionSaveAs_triggered()
void MainWindow::save(QString filename, QList<CGAL::Three::Scene_item*>& to_save) { void MainWindow::save(QString filename, QList<CGAL::Three::Scene_item*>& to_save) {
QFileInfo fileinfo(filename); QFileInfo fileinfo(filename);
bool saved = false; bool saved = false;
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin : io_plugins) { for(CGAL::Three::CGAL_Lab_io_plugin_interface* plugin : io_plugins) {
if( plugin->canSave(to_save.front()) && if( plugin->canSave(to_save.front()) &&
file_matches_filter(plugin->saveNameFilters(),filename.toLower()) ) file_matches_filter(plugin->saveNameFilters(),filename.toLower()) )
{ {
@ -2879,14 +2879,14 @@ void MainWindow::on_actionSa_ve_Scene_as_Script_triggered()
std::vector<QColor> colors; std::vector<QColor> colors;
std::vector<int> rendering_modes; std::vector<int> rendering_modes;
QStringList not_saved; QStringList not_saved;
Polyhedron_demo_io_plugin_interface* camera_plugin = nullptr; CGAL_Lab_io_plugin_interface* camera_plugin = nullptr;
QMap<QString, QVector<QString> > group_children_map; QMap<QString, QVector<QString> > group_children_map;
for(int i = 0; i < scene->numberOfEntries(); ++i) for(int i = 0; i < scene->numberOfEntries(); ++i)
{ {
Scene_item* item = scene->item(i); Scene_item* item = scene->item(i);
QString loader;// = item->property("loader_name").toString(); QString loader;// = item->property("loader_name").toString();
QString ext; QString ext;
for(Polyhedron_demo_io_plugin_interface* iop : io_plugins) for(CGAL_Lab_io_plugin_interface* iop : io_plugins)
{ {
if(iop->name() == "camera_positions_plugin") if(iop->name() == "camera_positions_plugin")
camera_plugin = iop; camera_plugin = iop;
@ -3087,8 +3087,8 @@ void MainWindow::on_actionSa_ve_Scene_as_Script_triggered()
tr("Enter the name of your scene file.")); tr("Enter the name of your scene file."));
if(path.isEmpty()) if(path.isEmpty())
return; return;
if(!path.contains("/tmp/Polyhedron_demo_")) if(!path.contains("/tmp/CGAL_Lab_"))
path.prepend("/tmp/Polyhedron_demo_"); path.prepend("/tmp/CGAL_Lab_");
try{ try{
ssh_session session = nullptr; ssh_session session = nullptr;
bool res = establish_ssh_session_from_agent(session, bool res = establish_ssh_session_from_agent(session,
@ -3608,7 +3608,7 @@ void MainWindow::test_all_actions()
selectSceneItem(0); selectSceneItem(0);
for(PluginNamePair pnp : plugins) for(PluginNamePair pnp : plugins)
{ {
Polyhedron_demo_plugin_interface* plugin = pnp.first; CGAL_Lab_plugin_interface* plugin = pnp.first;
for(QAction* action : plugin->actions()){ for(QAction* action : plugin->actions()){
if(plugin->applicable(action)){ if(plugin->applicable(action)){
qDebug()<<"Testing "<<pnp.second<<"and "<<action->text()<<" on"; qDebug()<<"Testing "<<pnp.second<<"and "<<action->text()<<" on";
@ -3724,7 +3724,7 @@ void MainWindow::on_actionLoad_a_Scene_from_a_Script_File_triggered()
ssh_free(session); ssh_free(session);
return; return;
} }
path.prepend("Polyhedron_demo_"); path.prepend("CGAL_Lab_");
path = tr("/tmp/%2").arg(path); path = tr("/tmp/%2").arg(path);
res = pull_file(session,path.toStdString().c_str(), filename.toStdString().c_str()); res = pull_file(session,path.toStdString().c_str(), filename.toStdString().c_str());
if(!res) if(!res)

View File

@ -33,8 +33,8 @@ class QMenu;
class QWidgetAction; class QWidgetAction;
namespace CGAL { namespace CGAL {
namespace Three{ namespace Three{
class Polyhedron_demo_io_plugin_interface; class CGAL_Lab_io_plugin_interface;
class Polyhedron_demo_plugin_interface; class CGAL_Lab_plugin_interface;
class Scene_item; class Scene_item;
class Viewer_interface; class Viewer_interface;
} }
@ -88,14 +88,14 @@ public:
/*! Finds an I/O plugin. /*! Finds an I/O plugin.
* throws std::invalid_argument if no loader with that argument can be found * throws std::invalid_argument if no loader with that argument can be found
@returns the I/O plugin associated with `loader_name`*/ @returns the I/O plugin associated with `loader_name`*/
CGAL::Three::Polyhedron_demo_io_plugin_interface* findLoader(const QString& loader_name) const; CGAL::Three::CGAL_Lab_io_plugin_interface* findLoader(const QString& loader_name) const;
/*! \brief loads on or more item with a given loader. /*! \brief loads on or more item with a given loader.
* *
* throws `std::logic_error` if loading does not succeed or * throws `std::logic_error` if loading does not succeed or
* `std::invalid_argument` if `fileinfo` specifies an invalid file*/ * `std::invalid_argument` if `fileinfo` specifies an invalid file*/
QList<CGAL::Three::Scene_item *> loadItem(QFileInfo fileinfo, QList<CGAL::Three::Scene_item *> loadItem(QFileInfo fileinfo,
CGAL::Three::Polyhedron_demo_io_plugin_interface*, CGAL::Three::CGAL_Lab_io_plugin_interface*,
bool& ok, bool& ok,
bool add_to_scene=true); bool add_to_scene=true);
@ -418,11 +418,11 @@ private:
QSortFilterProxyModel* proxyModel; QSortFilterProxyModel* proxyModel;
QTreeView* sceneView; QTreeView* sceneView;
Ui::MainWindow* ui; Ui::MainWindow* ui;
QVector<CGAL::Three::Polyhedron_demo_io_plugin_interface*> io_plugins; QVector<CGAL::Three::CGAL_Lab_io_plugin_interface*> io_plugins;
QString last_saved_dir; QString last_saved_dir;
QMap<QString,QString> default_plugin_selection; QMap<QString,QString> default_plugin_selection;
// typedef to make Q_FOREACH work // typedef to make Q_FOREACH work
typedef QPair<CGAL::Three::Polyhedron_demo_plugin_interface*, QString> PluginNamePair; typedef QPair<CGAL::Three::CGAL_Lab_plugin_interface*, QString> PluginNamePair;
QVector<PluginNamePair > plugins; QVector<PluginNamePair > plugins;
//!Called when "Add new group" in the file menu is triggered. //!Called when "Add new group" in the file menu is triggered.
QAction* actionAddToGroup; QAction* actionAddToGroup;

View File

@ -14,7 +14,7 @@
<string>CGAL Three</string> <string>CGAL Three</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/resources/cgal_logo.xpm</normaloff>:/cgal/icons/resources/cgal_logo.xpm</iconset> <normaloff>:/cgal/icons/resources/cgal_logo.xpm</normaloff>:/cgal/icons/resources/cgal_logo.xpm</iconset>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
@ -132,7 +132,7 @@
<string>+</string> <string>+</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset> <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
</property> </property>
</widget> </widget>
@ -143,7 +143,7 @@
<string>-</string> <string>-</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset> <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
</property> </property>
</widget> </widget>
@ -154,7 +154,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset> <normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
</property> </property>
</widget> </widget>
@ -165,7 +165,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset> <normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset>
</property> </property>
</widget> </widget>
@ -176,7 +176,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset> <normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset>
</property> </property>
</widget> </widget>
@ -344,7 +344,7 @@
</action> </action>
<action name="actionLoad"> <action name="actionLoad">
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset> <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -356,7 +356,7 @@
</action> </action>
<action name="actionErase"> <action name="actionErase">
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset> <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -368,7 +368,7 @@
</action> </action>
<action name="actionDuplicate"> <action name="actionDuplicate">
<property name="icon"> <property name="icon">
<iconset resource="Polyhedron_3.qrc"> <iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset> <normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -471,8 +471,8 @@
</action> </action>
</widget> </widget>
<resources> <resources>
<include location="Polyhedron_3.qrc"/> <include location="cgallab.qrc"/>
<include location="Polyhedron_3.qrc"/> <include location="cgallab.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -3,7 +3,7 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#ifdef polyhedron_demo_EXPORTS #ifdef cgal_lab_EXPORTS
# define mainwindow_EXPORTS # define mainwindow_EXPORTS
#endif #endif

View File

@ -1,9 +1,9 @@
Main Page {#mainpage} Main Page {#mainpage}
============ ============
These pages are not documenting the whole Polyhedron demo but only the API that can be useful to create and add a new plugin. These pages are not documenting the whole Lab but only the API that can be useful to create and add a new plugin.
Understanding the Polyhedron demo Understanding the Lab
============ ============
There are several levels in this demo. There are several levels in this demo.
@ -18,19 +18,19 @@ A plugin usually defines an object that inherits from Scene_item or uses some of
Creating a simple Plugin Creating a simple Plugin
============ ============
A basic plugin will inherit from Polyhedron_demo_plugin_interface. It can also inherits from the Polyhedron_demo_plugin_helper instead, for a more detailed model of plugin. A basic plugin will inherit from CGAL_Lab_plugin_interface. It can also inherits from the CGAL_Lab_plugin_helper instead, for a more detailed model of plugin.
Its name must be of the form Polyhedron_demo_xxxx_yyyy_plugin. \n Its name must be of the form CGAL_Lab_xxxx_yyyy_plugin. \n
<b>In the CMakeList.txt file, in the section Plugins, add the following lines :</b> <b>In the CMakeList.txt file, in the section Plugins, add the following lines :</b>
polyhedron_demo_plugin(xxxx_yyyy_plugin Polyhedron_demo_xxxx_yyyy_plugin) cgal_lab_plugin(xxxx_yyyy_plugin CGAL_Lab_xxxx_yyyy_plugin)
target_link_libraries(xxxx_yyyy_plugin scene_polyhedron_item) target_link_libraries(xxxx_yyyy_plugin scene_polyhedron_item)
[init]: @ref Polyhedron_demo_plugin_helper#init(QMainWindow *, Scene_interface *) [init]: @ref CGAL_Lab_plugin_helper#init(QMainWindow *, Scene_interface *)
The class must contain the following lines :\n The class must contain the following lines :\n
Q_OBJECT\n Q_OBJECT\n
Q_INTERFACES(Polyhedron_demo_plugin_interface)\n Q_INTERFACES(CGAL_Lab_plugin_interface)\n
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")\n Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")\n
In the function [init], get a reference to the Scene and to the MainWindow. Then, create and link the actions of the plugin.\n In the function [init], get a reference to the Scene and to the MainWindow. Then, create and link the actions of the plugin.\n
Create a list of QActions containing the actions of the plugin.\n Create a list of QActions containing the actions of the plugin.\n
@ -43,7 +43,7 @@ If the plugin implements a new Scene_item, please notice that a Scene_itam have
A plugin must always contain A plugin must always contain
~~~~~~~~~~~~~{.cpp} ~~~~~~~~~~~~~{.cpp}
#include "Polyhedron_demo_xxxx_yyyy_plugin.moc" #include "CGAL_Lab_xxxx_yyyy_plugin.moc"
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
List of useful classes : List of useful classes :
@ -52,8 +52,8 @@ List of useful classes :
- Viewer_interface - Viewer_interface
- Scene_interface - Scene_interface
- Scene_item - Scene_item
- Polyhedron_demo_plugin_helper - CGAL_Lab_plugin_helper
- Polyhedron_demo_plugin_interface - CGAL_Lab_plugin_interface
Example : Example :
@ -184,21 +184,21 @@ private:
}; //end of class Scene_triangle_item }; //end of class Scene_triangle_item
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
class Polyhedron_demo_example_plugin : class CGAL_Lab_example_plugin :
public QObject, public QObject,
public Polyhedron_demo_plugin_helper public CGAL_Lab_plugin_helper
{ {
//Configures CMake to use MOC correctly //Configures CMake to use MOC correctly
Q_OBJECT Q_OBJECT
Q_INTERFACES(Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public : public :
// To silent a warning -Woverloaded-virtual // To silent a warning -Woverloaded-virtual
// See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings // See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
using Polyhedron_demo_plugin_helper::init; using CGAL_Lab_plugin_helper::init;
void init(QMainWindow* mainWindow, void init(QMainWindow* mainWindow,
Scene_interface* scene_interface) { Scene_interface* scene_interface) {
@ -233,8 +233,8 @@ private:
Scene_item* triangle; Scene_item* triangle;
QAction* actionDrawTriangle; QAction* actionDrawTriangle;
}; //end of class Polyhedron_demo_example_plugin }; //end of class CGAL_Lab_example_plugin
#include "Polyhedron_demo_example_plugin.moc" #include "CGAL_Lab_example_plugin.moc"
~~~~~~~~~~~~~ ~~~~~~~~~~~~~

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h" #include "CGAL_Lab.h"
#include <clocale> #include <clocale>
#include <CGAL/Qt/resources.h> #include <CGAL/Qt/resources.h>
#include <QSurfaceFormat> #include <QSurfaceFormat>
@ -10,7 +10,7 @@
*/ */
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
Polyhedron_demo app(argc, argv, CGAL_Lab app(argc, argv,
"Mesh_3 demo", "Mesh_3 demo",
"CGAL Mesh_3 Demo", "CGAL Mesh_3 Demo",
QStringList() << "Mesh_3"); QStringList() << "Mesh_3");

View File

@ -13,6 +13,6 @@ public:
}; };
Q_DECLARE_INTERFACE(Messages_interface, Q_DECLARE_INTERFACE(Messages_interface,
"com.geometryfactory.PolyhedronDemo.MessagesInterface/1.0") "com.geometryfactory.CGALLab.MessagesInterface/1.0")
#endif // MESSAGES_INTERFACE_H #endif // MESSAGES_INTERFACE_H

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h" #include "CGAL_Lab.h"
#include <clocale> #include <clocale>
#include <CGAL/Qt/resources.h> #include <CGAL/Qt/resources.h>
#include <QSurfaceFormat> #include <QSurfaceFormat>
@ -19,7 +19,7 @@ int main(int argc, char **argv)
QSurfaceFormat::setDefaultFormat(fmt); QSurfaceFormat::setDefaultFormat(fmt);
QStringList keywords; QStringList keywords;
keywords << "PMP"; keywords << "PMP";
Polyhedron_demo app(argc, argv, CGAL_Lab app(argc, argv,
"PMP demo", "PMP demo",
"CGAL Polygon Mesh Processing Demo", "CGAL Polygon Mesh Processing Demo",
keywords); keywords);

View File

@ -1,10 +1,10 @@
include(polyhedron_demo_macros) include(cgallab_macros)
polyhedron_demo_plugin(do_trees_intersect_plugin Do_trees_intersect_plugin) cgal_lab_plugin(do_trees_intersect_plugin Do_trees_intersect_plugin)
target_link_libraries(do_trees_intersect_plugin PUBLIC scene_surface_mesh_item target_link_libraries(do_trees_intersect_plugin PUBLIC scene_surface_mesh_item
scene_movable_sm_item) scene_movable_sm_item)
polyhedron_demo_plugin(cut_plugin Cut_plugin) cgal_lab_plugin(cut_plugin Cut_plugin)
target_link_libraries(cut_plugin PUBLIC scene_surface_mesh_item target_link_libraries(cut_plugin PUBLIC scene_surface_mesh_item
scene_basic_objects scene_color_ramp) scene_basic_objects scene_color_ramp)
if(TARGET CGAL::TBB_support) if(TARGET CGAL::TBB_support)

View File

@ -8,8 +8,8 @@
#include "Messages_interface.h" #include "Messages_interface.h"
#include "Scene_plane_item.h" #include "Scene_plane_item.h"
#include "Scene_surface_mesh_item.h" #include "Scene_surface_mesh_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Scene_interface.h> #include <CGAL/Three/Scene_interface.h>
#include <CGAL/Three/Scene_item_rendering_helper.h> #include <CGAL/Three/Scene_item_rendering_helper.h>
#include <CGAL/Three/Viewer_interface.h> #include <CGAL/Three/Viewer_interface.h>
@ -923,22 +923,22 @@ private:
}; // end class Scene_edges_item }; // end class Scene_edges_item
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_cut_plugin : class CGAL_Lab_cut_plugin :
public QObject, public QObject,
public Polyhedron_demo_plugin_interface, public CGAL_Lab_plugin_interface,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90")
public: public:
Polyhedron_demo_cut_plugin() : QObject(), edges_item(nullptr) { CGAL_Lab_cut_plugin() : QObject(), edges_item(nullptr) {
} }
~Polyhedron_demo_cut_plugin(); ~CGAL_Lab_cut_plugin();
bool applicable(QAction*) const override{ bool applicable(QAction*) const override{
// returns true if one surface_mesh is in the entries // returns true if one surface_mesh is in the entries
@ -1007,7 +1007,7 @@ public:
return false; return false;
} }
using Polyhedron_demo_io_plugin_interface::init; using CGAL_Lab_io_plugin_interface::init;
void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface,
Messages_interface* m) override; Messages_interface* m) override;
QList<QAction*> actions() const override; QList<QAction*> actions() const override;
@ -1124,10 +1124,10 @@ private:
Edge_sm_trees edge_sm_trees; Edge_sm_trees edge_sm_trees;
template<typename Item, typename Mesh, typename Facets_traits, typename Facets_tree, typename Edges_tree> template<typename Item, typename Mesh, typename Facets_traits, typename Facets_tree, typename Edges_tree>
void apply(Item* item, QMap< QObject*, Facets_tree*>& f_trees, QMap<QObject*, Edges_tree*>& e_trees); void apply(Item* item, QMap< QObject*, Facets_tree*>& f_trees, QMap<QObject*, Edges_tree*>& e_trees);
}; // end Polyhedron_demo_cut_plugin }; // end CGAL_Lab_cut_plugin
Polyhedron_demo_cut_plugin::~Polyhedron_demo_cut_plugin() CGAL_Lab_cut_plugin::~CGAL_Lab_cut_plugin()
{ {
for(Facet_sm_tree *tree : facet_sm_trees.values()) for(Facet_sm_tree *tree : facet_sm_trees.values())
{ {
@ -1140,7 +1140,7 @@ Polyhedron_demo_cut_plugin::~Polyhedron_demo_cut_plugin()
} }
void Polyhedron_demo_cut_plugin::init(QMainWindow* mainWindow, void CGAL_Lab_cut_plugin::init(QMainWindow* mainWindow,
CGAL::Three::Scene_interface* scene_interface, CGAL::Three::Scene_interface* scene_interface,
Messages_interface* m) Messages_interface* m)
{ {
@ -1190,11 +1190,11 @@ void Polyhedron_demo_cut_plugin::init(QMainWindow* mainWindow,
} }
QList<QAction*> Polyhedron_demo_cut_plugin::actions() const { QList<QAction*> CGAL_Lab_cut_plugin::actions() const {
return _actions; return _actions;
} }
void Polyhedron_demo_cut_plugin::updateTrees(int id) void CGAL_Lab_cut_plugin::updateTrees(int id)
{ {
if(plane_item && if(plane_item &&
qobject_cast<Scene_surface_mesh_item*>(scene->item(id))) qobject_cast<Scene_surface_mesh_item*>(scene->item(id)))
@ -1202,7 +1202,7 @@ if(plane_item &&
} }
template<typename Item, typename Mesh, typename Facets_traits, typename Facets_tree, typename Edges_tree> template<typename Item, typename Mesh, typename Facets_traits, typename Facets_tree, typename Edges_tree>
void Polyhedron_demo_cut_plugin::apply(Item* item, QMap< QObject*, Facets_tree*>& f_trees, QMap<QObject*, Edges_tree*>& e_trees) void CGAL_Lab_cut_plugin::apply(Item* item, QMap< QObject*, Facets_tree*>& f_trees, QMap<QObject*, Edges_tree*>& e_trees)
{ {
const Mesh& mesh = *item->polyhedron(); const Mesh& mesh = *item->polyhedron();
if(!CGAL::is_triangle_mesh(mesh)) if(!CGAL::is_triangle_mesh(mesh))
@ -1252,7 +1252,7 @@ void Polyhedron_demo_cut_plugin::apply(Item* item, QMap< QObject*, Facets_tree*>
} }
} }
void Polyhedron_demo_cut_plugin::createCutPlane() { void CGAL_Lab_cut_plugin::createCutPlane() {
bool updating = false; bool updating = false;
Scene_aabb_plane_item::Cut_planes_types type; Scene_aabb_plane_item::Cut_planes_types type;
int plane_id = -1; int plane_id = -1;
@ -1313,7 +1313,7 @@ void Polyhedron_demo_cut_plugin::createCutPlane() {
cut(); cut();
} }
void Polyhedron_demo_cut_plugin::Intersection() void CGAL_Lab_cut_plugin::Intersection()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item) if(!plane_item)
@ -1325,7 +1325,7 @@ void Polyhedron_demo_cut_plugin::Intersection()
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_cut_plugin::SignedFacets() { void CGAL_Lab_cut_plugin::SignedFacets() {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item) if(!plane_item)
createCutPlane(); createCutPlane();
@ -1340,7 +1340,7 @@ void Polyhedron_demo_cut_plugin::SignedFacets() {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_cut_plugin::UnsignedFacets() { void CGAL_Lab_cut_plugin::UnsignedFacets() {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item) if(!plane_item)
createCutPlane(); createCutPlane();
@ -1354,7 +1354,7 @@ void Polyhedron_demo_cut_plugin::UnsignedFacets() {
} }
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_cut_plugin::UnsignedEdges() { void CGAL_Lab_cut_plugin::UnsignedEdges() {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item) if(!plane_item)
createCutPlane(); createCutPlane();
@ -1369,7 +1369,7 @@ void Polyhedron_demo_cut_plugin::UnsignedEdges() {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_cut_plugin::computeIntersection() void CGAL_Lab_cut_plugin::computeIntersection()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
if(!edges_item) { if(!edges_item) {
@ -1417,7 +1417,7 @@ void Polyhedron_demo_cut_plugin::computeIntersection()
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_cut_plugin::cut() void CGAL_Lab_cut_plugin::cut()
{ {
if(!plane_item) if(!plane_item)
return; return;

View File

@ -1,4 +1,4 @@
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <QApplication> #include <QApplication>
#include <QObject> #include <QObject>
#include <QAction> #include <QAction>
@ -18,11 +18,11 @@
class DoTreesIntersectplugin: class DoTreesIntersectplugin:
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_plugin_interface public CGAL::Three::CGAL_Lab_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public: public:
bool eventFilter(QObject *, QEvent *event) override bool eventFilter(QObject *, QEvent *event) override

View File

@ -1,7 +1,7 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include "Scene_surface_mesh_item.h" #include "Scene_surface_mesh_item.h"
#include "Scene_polygon_soup_item.h" #include "Scene_polygon_soup_item.h"
@ -293,13 +293,13 @@ Q_SIGNALS:
void status_report(QString); void status_report(QString);
}; };
class Polyhedron_demo_alpha_wrap_3_plugin class CGAL_Lab_alpha_wrap_3_plugin
: public QObject, : public QObject,
public CGAL::Three::Polyhedron_demo_plugin_helper public CGAL::Three::CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
using Triangles = std::vector<Kernel::Triangle_3>; using Triangles = std::vector<Kernel::Triangle_3>;
using Segments = std::vector<Kernel::Segment_3>; using Segments = std::vector<Kernel::Segment_3>;

View File

@ -1,8 +1,8 @@
include(polyhedron_demo_macros) include(cgallab_macros)
#if the plugin has a UI file #if the plugin has a UI file
qt6_wrap_ui(alpha_wrap_3UI_FILES alpha_wrap_3_dialog.ui) qt6_wrap_ui(alpha_wrap_3UI_FILES alpha_wrap_3_dialog.ui)
polyhedron_demo_plugin(alpha_wrap_3_plugin Alpha_wrap_3_plugin ${alpha_wrap_3UI_FILES}) cgal_lab_plugin(alpha_wrap_3_plugin Alpha_wrap_3_plugin ${alpha_wrap_3UI_FILES})
#if the plugin uses external libraries like scene_items #if the plugin uses external libraries like scene_items
target_link_libraries(alpha_wrap_3_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item scene_points_with_normal_item scene_selection_item scene_polylines_item) target_link_libraries(alpha_wrap_3_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item scene_points_with_normal_item scene_selection_item scene_polylines_item)

View File

@ -1,7 +1,7 @@
include( polyhedron_demo_macros ) include( cgallab_macros )
qt6_wrap_ui( cameraUI_FILES Camera_positions_list.ui ) qt6_wrap_ui( cameraUI_FILES Camera_positions_list.ui )
polyhedron_demo_plugin(camera_positions_plugin cgal_lab_plugin(camera_positions_plugin
Camera_positions_plugin Camera_positions_plugin
Camera_positions_list.cpp Camera_positions_list.cpp
${cameraUI_FILES} ${cameraUI_FILES}

View File

@ -43,7 +43,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset> <normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
</property> </property>
</widget> </widget>
@ -54,7 +54,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset> <normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
</property> </property>
</widget> </widget>
@ -72,7 +72,7 @@
<string>&amp;Up</string> <string>&amp;Up</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset> <normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset>
</property> </property>
<property name="shortcut"> <property name="shortcut">
@ -86,7 +86,7 @@
<string>&amp;Down</string> <string>&amp;Down</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset> <normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset>
</property> </property>
<property name="shortcut"> <property name="shortcut">
@ -120,7 +120,7 @@
<string>PushButton</string> <string>PushButton</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/front.png</normaloff>:/cgal/icons/resources/front.png</iconset> <normaloff>:/cgal/icons/resources/front.png</normaloff>:/cgal/icons/resources/front.png</iconset>
</property> </property>
</widget> </widget>
@ -134,7 +134,7 @@
<string>PushButton</string> <string>PushButton</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/back.png</normaloff>:/cgal/icons/resources/back.png</iconset> <normaloff>:/cgal/icons/resources/back.png</normaloff>:/cgal/icons/resources/back.png</iconset>
</property> </property>
</widget> </widget>
@ -148,7 +148,7 @@
<string>PushButton</string> <string>PushButton</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/top.png</normaloff>:/cgal/icons/resources/top.png</iconset> <normaloff>:/cgal/icons/resources/top.png</normaloff>:/cgal/icons/resources/top.png</iconset>
</property> </property>
</widget> </widget>
@ -162,7 +162,7 @@
<string>PushButton</string> <string>PushButton</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/bot.png</normaloff>:/cgal/icons/resources/bot.png</iconset> <normaloff>:/cgal/icons/resources/bot.png</normaloff>:/cgal/icons/resources/bot.png</iconset>
</property> </property>
</widget> </widget>
@ -176,7 +176,7 @@
<string>PushButton</string> <string>PushButton</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/left.png</normaloff>:/cgal/icons/resources/left.png</iconset> <normaloff>:/cgal/icons/resources/left.png</normaloff>:/cgal/icons/resources/left.png</iconset>
</property> </property>
</widget> </widget>
@ -190,7 +190,7 @@
<string>PushButton</string> <string>PushButton</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/right.png</normaloff>:/cgal/icons/resources/right.png</iconset> <normaloff>:/cgal/icons/resources/right.png</normaloff>:/cgal/icons/resources/right.png</iconset>
</property> </property>
</widget> </widget>
@ -217,7 +217,7 @@
</widget> </widget>
</widget> </widget>
<resources> <resources>
<include location="../../Polyhedron_3.qrc"/> <include location="../../cgallab.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -1,6 +1,6 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#include "Messages_interface.h" #include "Messages_interface.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "Camera_positions_list.h" #include "Camera_positions_list.h"
@ -9,13 +9,13 @@
#include <QMainWindow> #include <QMainWindow>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_camera_positions_plugin : class CGAL_Lab_camera_positions_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90")
public: public:
void init() override; void init() override;
@ -40,7 +40,7 @@ private:
Camera_positions_list* cpl; Camera_positions_list* cpl;
}; };
void Polyhedron_demo_camera_positions_plugin::init() void CGAL_Lab_camera_positions_plugin::init()
{ {
cpl = new Camera_positions_list(CGAL::Three::Three::mainWindow()); cpl = new Camera_positions_list(CGAL::Three::Three::mainWindow());

View File

@ -1,4 +1,4 @@
include(polyhedron_demo_macros) include(cgallab_macros)
if(TARGET CGAL::Eigen3_support) if(TARGET CGAL::Eigen3_support)
@ -22,7 +22,7 @@ if(TARGET CGAL::Eigen3_support)
qt6_wrap_ui(classificationUI_FILES Classification_widget.ui qt6_wrap_ui(classificationUI_FILES Classification_widget.ui
Classification_advanced_widget.ui) Classification_advanced_widget.ui)
polyhedron_demo_plugin( cgal_lab_plugin(
classification_plugin classification_plugin
Classification_plugin Classification_plugin
Point_set_item_classification.cpp Point_set_item_classification.cpp

View File

@ -19,7 +19,7 @@
#include "Scene_polygon_soup_item.h" #include "Scene_polygon_soup_item.h"
#include <CGAL/Three/Scene_interface.h> #include <CGAL/Three/Scene_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
@ -48,13 +48,13 @@
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_classification_plugin : class CGAL_Lab_classification_plugin :
public QObject, public QObject,
public Polyhedron_demo_plugin_helper public CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
struct LabelButton struct LabelButton
{ {
@ -136,7 +136,7 @@ public:
void print_message(QString message) { CGAL::Three::Three::information(message); } void print_message(QString message) { CGAL::Three::Three::information(message); }
QList<QAction*> actions() const { return QList<QAction*>() << actionClassification; } QList<QAction*> actions() const { return QList<QAction*>() << actionClassification; }
using Polyhedron_demo_plugin_helper::init; using CGAL_Lab_plugin_helper::init;
void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) { void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) {
mw = mainWindow; mw = mainWindow;
@ -1714,6 +1714,6 @@ private:
Item_map item_map; Item_map item_map;
}; // end Polyhedron_demo_classification_plugin }; // end CGAL_Lab_classification_plugin
#include "Classification_plugin.moc" #include "Classification_plugin.moc"

View File

@ -64,7 +64,7 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/help_button.png</normaloff>:/cgal/icons/resources/help_button.png</iconset> <normaloff>:/cgal/icons/resources/help_button.png</normaloff>:/cgal/icons/resources/help_button.png</iconset>
</property> </property>
</widget> </widget>
@ -75,7 +75,7 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../Polyhedron_3.qrc"> <iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/check-off.png</normaloff>:/cgal/icons/check-off.png</iconset> <normaloff>:/cgal/icons/check-off.png</normaloff>:/cgal/icons/check-off.png</iconset>
</property> </property>
</widget> </widget>
@ -195,7 +195,7 @@
</widget> </widget>
</widget> </widget>
<resources> <resources>
<include location="../../Polyhedron_3.qrc"/> <include location="../../cgallab.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -0,0 +1,4 @@
include(cgallab_macros)
cgal_lab_plugin(nef_plugin Nef_plugin)
target_link_libraries(nef_plugin PUBLIC scene_nef_polyhedron_item)

View File

@ -1,7 +1,7 @@
#include "Scene_surface_mesh_item.h" #include "Scene_surface_mesh_item.h"
#include "Scene_nef_polyhedron_item.h" #include "Scene_nef_polyhedron_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <QString> #include <QString>
#include <QAction> #include <QAction>
@ -11,13 +11,13 @@
#include <QElapsedTimer> #include <QElapsedTimer>
#include <QMessageBox> #include <QMessageBox>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_nef_plugin : class CGAL_Lab_nef_plugin :
public QObject, public QObject,
public Polyhedron_demo_plugin_interface public CGAL_Lab_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public: public:
@ -100,10 +100,10 @@ public Q_SLOTS:
void on_actionDifference_triggered(); void on_actionDifference_triggered();
void on_actionMinkowskiSum_triggered(); void on_actionMinkowskiSum_triggered();
void on_actionConvexDecomposition_triggered(); void on_actionConvexDecomposition_triggered();
}; // end class Polyhedron_demo_nef_plugin }; // end class CGAL_Lab_nef_plugin
void void
Polyhedron_demo_nef_plugin::on_actionToNef_triggered() CGAL_Lab_nef_plugin::on_actionToNef_triggered()
{ {
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -133,7 +133,7 @@ Polyhedron_demo_nef_plugin::on_actionToNef_triggered()
void void
Polyhedron_demo_nef_plugin::on_actionConvexDecomposition_triggered() CGAL_Lab_nef_plugin::on_actionConvexDecomposition_triggered()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -178,7 +178,7 @@ Polyhedron_demo_nef_plugin::on_actionConvexDecomposition_triggered()
} }
void void
Polyhedron_demo_nef_plugin::on_actionToPoly_triggered() CGAL_Lab_nef_plugin::on_actionToPoly_triggered()
{ {
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -213,21 +213,21 @@ Polyhedron_demo_nef_plugin::on_actionToPoly_triggered()
} }
} }
void Polyhedron_demo_nef_plugin::on_actionUnion_triggered() void CGAL_Lab_nef_plugin::on_actionUnion_triggered()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(BOOLEAN_UNION); boolean_operation(BOOLEAN_UNION);
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_nef_plugin::on_actionIntersection_triggered() void CGAL_Lab_nef_plugin::on_actionIntersection_triggered()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(BOOLEAN_INTERSECTION); boolean_operation(BOOLEAN_INTERSECTION);
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_nef_plugin::on_actionDifference_triggered() void CGAL_Lab_nef_plugin::on_actionDifference_triggered()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(BOOLEAN_DIFFERENCE); boolean_operation(BOOLEAN_DIFFERENCE);
@ -235,14 +235,14 @@ void Polyhedron_demo_nef_plugin::on_actionDifference_triggered()
} }
void void
Polyhedron_demo_nef_plugin::on_actionMinkowskiSum_triggered() CGAL_Lab_nef_plugin::on_actionMinkowskiSum_triggered()
{ {
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(MINKOWSKI_SUM); boolean_operation(MINKOWSKI_SUM);
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void Polyhedron_demo_nef_plugin::boolean_operation(const Boolean_operation operation) void CGAL_Lab_nef_plugin::boolean_operation(const Boolean_operation operation)
{ {
const int indexA = scene->selectionAindex(); const int indexA = scene->selectionAindex();
const int indexB = scene->selectionBindex(); const int indexB = scene->selectionBindex();

View File

@ -1,12 +1,12 @@
include(polyhedron_demo_macros) include(cgallab_macros)
polyhedron_demo_plugin(convex_hull_plugin Convex_hull_plugin KEYWORDS cgal_lab_plugin(convex_hull_plugin Convex_hull_plugin KEYWORDS
PointSetProcessing) PointSetProcessing)
target_link_libraries( target_link_libraries(
convex_hull_plugin PUBLIC scene_points_with_normal_item scene_polylines_item convex_hull_plugin PUBLIC scene_points_with_normal_item scene_polylines_item
scene_selection_item scene_surface_mesh_item) scene_selection_item scene_surface_mesh_item)
polyhedron_demo_plugin(kernel_plugin Kernel_plugin) cgal_lab_plugin(kernel_plugin Kernel_plugin)
target_link_libraries(kernel_plugin PUBLIC scene_surface_mesh_item) target_link_libraries(kernel_plugin PUBLIC scene_surface_mesh_item)

View File

@ -9,19 +9,19 @@
#include "Scene_polyhedron_selection_item.h" #include "Scene_polyhedron_selection_item.h"
#include "SMesh_type.h" #include "SMesh_type.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/convex_hull_3.h> #include <CGAL/convex_hull_3.h>
#include <CGAL/boost/graph/copy_face_graph.h> #include <CGAL/boost/graph/copy_face_graph.h>
#include <CGAL/boost/iterator/transform_iterator.hpp> #include <CGAL/boost/iterator/transform_iterator.hpp>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_convex_hull_plugin : class CGAL_Lab_convex_hull_plugin :
public QObject, public QObject,
public Polyhedron_demo_plugin_interface public CGAL_Lab_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public: public:
void init(QMainWindow*mw, void init(QMainWindow*mw,
Scene_interface* scene_interface, Scene_interface* scene_interface,
@ -51,10 +51,10 @@ private:
QList<QAction*> _actions; QList<QAction*> _actions;
Scene_interface* scene; Scene_interface* scene;
QMainWindow* mw; QMainWindow* mw;
}; // end Polyhedron_demo_convex_hull_plugin }; // end CGAL_Lab_convex_hull_plugin
void Polyhedron_demo_convex_hull_plugin::on_actionConvexHull_triggered() void CGAL_Lab_convex_hull_plugin::on_actionConvexHull_triggered()
{ {
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
Scene_points_with_normal_item* pts_item = Scene_points_with_normal_item* pts_item =

View File

@ -8,7 +8,7 @@
#include "Scene_surface_mesh_item.h" #include "Scene_surface_mesh_item.h"
#include "SMesh_type.h" #include "SMesh_type.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Exact_rational.h> #include <CGAL/Exact_rational.h>
#include <CGAL/Polyhedron_kernel.h> #include <CGAL/Polyhedron_kernel.h>
#include <CGAL/convex_hull_3.h> #include <CGAL/convex_hull_3.h>
@ -24,13 +24,13 @@ typedef Kernel::Vector_3 Vector;
typedef Kernel::Plane_3 Plane; typedef Kernel::Plane_3 Plane;
typedef Kernel::FT FT; typedef Kernel::FT FT;
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_kernel_plugin : class CGAL_Lab_kernel_plugin :
public QObject, public QObject,
public Polyhedron_demo_plugin_interface public CGAL_Lab_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public: public:
QList<QAction*> actions() const { QList<QAction*> actions() const {
@ -57,10 +57,10 @@ private:
CGAL::Three::Scene_interface* scene; CGAL::Three::Scene_interface* scene;
QMainWindow* mw; QMainWindow* mw;
}; // end Polyhedron_demo_kernel_plugin }; // end CGAL_Lab_kernel_plugin
void Polyhedron_demo_kernel_plugin::on_actionKernel_triggered() void CGAL_Lab_kernel_plugin::on_actionKernel_triggered()
{ {
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();

View File

@ -1,14 +1,14 @@
include(polyhedron_demo_macros) include(cgallab_macros)
qt6_wrap_ui(display_propertyUI_FILES Display_property.ui) qt6_wrap_ui(display_propertyUI_FILES Display_property.ui)
polyhedron_demo_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer) cgal_lab_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer)
target_link_libraries(display_property_plugin PUBLIC scene_surface_mesh_item target_link_libraries(display_property_plugin PUBLIC scene_surface_mesh_item
scene_points_with_normal_item scene_points_with_normal_item
scene_color_ramp) scene_color_ramp)
if(TARGET CGAL::Eigen3_support) if(TARGET CGAL::Eigen3_support)
qt6_wrap_ui(heat_methodUI_FILES Heat_method.ui) qt6_wrap_ui(heat_methodUI_FILES Heat_method.ui)
polyhedron_demo_plugin(heat_method_plugin Heat_method_plugin ${heat_methodUI_FILES} KEYWORDS Viewer) cgal_lab_plugin(heat_method_plugin Heat_method_plugin ${heat_methodUI_FILES} KEYWORDS Viewer)
target_link_libraries(heat_method_plugin PUBLIC scene_surface_mesh_item target_link_libraries(heat_method_plugin PUBLIC scene_surface_mesh_item
scene_selection_item scene_selection_item
scene_color_ramp scene_color_ramp

View File

@ -11,8 +11,8 @@
#include "Scene_points_with_normal_item.h" #include "Scene_points_with_normal_item.h"
#include "triangulate_primitive.h" #include "triangulate_primitive.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Triangle_container.h> #include <CGAL/Three/Triangle_container.h>
#include <CGAL/Buffer_for_vao.h> #include <CGAL/Buffer_for_vao.h>
@ -67,11 +67,11 @@ public:
class Display_property_plugin class Display_property_plugin
: public QObject, : public QObject,
public Polyhedron_demo_plugin_helper public CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
private: private:
QAction* actionDisplayProperties; QAction* actionDisplayProperties;

View File

@ -9,8 +9,8 @@
#include "Scene_polyhedron_selection_item.h" #include "Scene_polyhedron_selection_item.h"
#include "Scene_surface_mesh_item.h" #include "Scene_surface_mesh_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Triangle_container.h> #include <CGAL/Three/Triangle_container.h>
#include <CGAL/Buffer_for_vao.h> #include <CGAL/Buffer_for_vao.h>
@ -207,11 +207,11 @@ public:
class Heat_method_plugin class Heat_method_plugin
: public QObject, : public QObject,
public Polyhedron_demo_plugin_helper public CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
using Vertex_distance_map = SMesh::Property_map<vertex_descriptor, double>; using Vertex_distance_map = SMesh::Property_map<vertex_descriptor, double>;
using Heat_method = CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<SMesh>; using Heat_method = CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<SMesh>;

View File

@ -1,5 +1,5 @@
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
@ -21,11 +21,11 @@ using namespace NMR;
class Io_3mf_plugin: class Io_3mf_plugin:
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "3mf_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "3mf_io_plugin.json")
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef std::vector<Kernel::Point_3> PointRange; typedef std::vector<Kernel::Point_3> PointRange;

View File

@ -1,4 +1,4 @@
include(polyhedron_demo_macros) include(cgallab_macros)
find_package(LASLIB QUIET) find_package(LASLIB QUIET)
set_package_properties( set_package_properties(
@ -8,39 +8,39 @@ set_package_properties(
include(CGAL_LASLIB_support) include(CGAL_LASLIB_support)
polyhedron_demo_plugin(gocad_plugin GOCAD_io_plugin KEYWORDS Viewer) cgal_lab_plugin(gocad_plugin GOCAD_io_plugin KEYWORDS Viewer)
target_link_libraries(gocad_plugin PUBLIC scene_surface_mesh_item) target_link_libraries(gocad_plugin PUBLIC scene_surface_mesh_item)
qt6_wrap_ui( funcUI_FILES Function_dialog.ui ) qt6_wrap_ui( funcUI_FILES Function_dialog.ui )
polyhedron_demo_plugin(io_implicit_function_plugin cgal_lab_plugin(io_implicit_function_plugin
Implicit_function_io_plugin Implicit_function_io_plugin
${funcUI_FILES} ${funcUI_FILES}
KEYWORDS Viewer Mesh_3) KEYWORDS Viewer Mesh_3)
target_link_libraries(io_implicit_function_plugin PUBLIC scene_implicit_function_item) target_link_libraries(io_implicit_function_plugin PUBLIC scene_implicit_function_item)
polyhedron_demo_plugin(nef_io_plugin Nef_io_plugin KEYWORDS Viewer) cgal_lab_plugin(nef_io_plugin Nef_io_plugin KEYWORDS Viewer)
target_link_libraries(nef_io_plugin PUBLIC scene_nef_polyhedron_item) target_link_libraries(nef_io_plugin PUBLIC scene_nef_polyhedron_item)
polyhedron_demo_plugin(off_plugin OFF_io_plugin cgal_lab_plugin(off_plugin OFF_io_plugin
KEYWORDS Viewer Mesh_3 PointSetProcessing Classification PMP) KEYWORDS Viewer Mesh_3 PointSetProcessing Classification PMP)
target_link_libraries(off_plugin PUBLIC scene_polygon_soup_item scene_points_with_normal_item scene_surface_mesh_item) target_link_libraries(off_plugin PUBLIC scene_polygon_soup_item scene_points_with_normal_item scene_surface_mesh_item)
polyhedron_demo_plugin(off_to_nef_plugin OFF_to_nef_io_plugin KEYWORDS Viewer) cgal_lab_plugin(off_to_nef_plugin OFF_to_nef_io_plugin KEYWORDS Viewer)
target_link_libraries(off_to_nef_plugin PUBLIC scene_nef_polyhedron_item) target_link_libraries(off_to_nef_plugin PUBLIC scene_nef_polyhedron_item)
polyhedron_demo_plugin(polylines_io_plugin Polylines_io_plugin KEYWORDS Viewer Mesh_3) cgal_lab_plugin(polylines_io_plugin Polylines_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(polylines_io_plugin PUBLIC scene_polylines_item) target_link_libraries(polylines_io_plugin PUBLIC scene_polylines_item)
polyhedron_demo_plugin(wkt_plugin WKT_io_plugin KEYWORDS Viewer PointSetProcessing Mesh_3) cgal_lab_plugin(wkt_plugin WKT_io_plugin KEYWORDS Viewer PointSetProcessing Mesh_3)
target_link_libraries(wkt_plugin PUBLIC scene_polylines_item) target_link_libraries(wkt_plugin PUBLIC scene_polylines_item)
polyhedron_demo_plugin(stl_plugin STL_io_plugin KEYWORDS Viewer PMP) cgal_lab_plugin(stl_plugin STL_io_plugin KEYWORDS Viewer PMP)
target_link_libraries(stl_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item) target_link_libraries(stl_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item)
polyhedron_demo_plugin(surf_io_plugin Surf_io_plugin KEYWORDS Viewer PMP) cgal_lab_plugin(surf_io_plugin Surf_io_plugin KEYWORDS Viewer PMP)
target_link_libraries(surf_io_plugin PUBLIC scene_surface_mesh_item) target_link_libraries(surf_io_plugin PUBLIC scene_surface_mesh_item)
polyhedron_demo_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer) cgal_lab_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer)
target_link_libraries(lcc_io_plugin PUBLIC scene_lcc_item) target_link_libraries(lcc_io_plugin PUBLIC scene_lcc_item)
find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML
@ -50,7 +50,7 @@ set_package_properties(
DESCRIPTION "A library for image processing." DESCRIPTION "A library for image processing."
PURPOSE "Can be used for I/O (DICOM, VTU, VTP.") PURPOSE "Can be used for I/O (DICOM, VTU, VTP.")
polyhedron_demo_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer) cgal_lab_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer)
target_link_libraries(triangulation_3_io_plugin PUBLIC scene_triangulation_3_item) target_link_libraries(triangulation_3_io_plugin PUBLIC scene_triangulation_3_item)
if(VTK_FOUND) if(VTK_FOUND)
@ -63,7 +63,7 @@ if(VTK_FOUND)
VTK::FiltersCore VTK::FiltersSources) VTK::FiltersCore VTK::FiltersSources)
endif() endif()
if(VTK_LIBRARIES) if(VTK_LIBRARIES)
polyhedron_demo_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3) cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item
${VTK_LIBRARIES}) ${VTK_LIBRARIES})
target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
@ -76,7 +76,7 @@ if(VTK_FOUND)
else() else()
message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.") message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.")
endif() endif()
polyhedron_demo_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification) cgal_lab_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification)
target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item) target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item)
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_rvalue_references has_cxx_rvalues) list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_rvalue_references has_cxx_rvalues)
@ -87,12 +87,12 @@ if(has_cxx_rvalues LESS 0 OR has_cxx_variadic LESS 0)
else() else()
set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates)
polyhedron_demo_plugin(ply_plugin PLY_io_plugin KEYWORDS Viewer PointSetProcessing Classification PMP) cgal_lab_plugin(ply_plugin PLY_io_plugin KEYWORDS Viewer PointSetProcessing Classification PMP)
target_link_libraries(ply_plugin PUBLIC scene_points_with_normal_item scene_polygon_soup_item scene_surface_mesh_item scene_textured_item) target_link_libraries(ply_plugin PUBLIC scene_points_with_normal_item scene_polygon_soup_item scene_surface_mesh_item scene_textured_item)
target_compile_features(ply_plugin PRIVATE ${needed_cxx_features}) target_compile_features(ply_plugin PRIVATE ${needed_cxx_features})
if (TARGET CGAL::LASLIB_support) if (TARGET CGAL::LASLIB_support)
polyhedron_demo_plugin(las_plugin LAS_io_plugin KEYWORDS Viewer PointSetProcessing Classification) cgal_lab_plugin(las_plugin LAS_io_plugin KEYWORDS Viewer PointSetProcessing Classification)
target_link_libraries(las_plugin PUBLIC scene_points_with_normal_item CGAL::LASLIB_support) target_link_libraries(las_plugin PUBLIC scene_points_with_normal_item CGAL::LASLIB_support)
target_compile_features(las_plugin PRIVATE ${needed_cxx_features}) target_compile_features(las_plugin PRIVATE ${needed_cxx_features})
if(MSVC) if(MSVC)
@ -119,7 +119,7 @@ if(3MF_LIBRARIES
AND 3MF_INCLUDE_DIR AND 3MF_INCLUDE_DIR
AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/NMR_DLLInterfaces.h") AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/NMR_DLLInterfaces.h")
include_directories(${3MF_INCLUDE_DIR}) include_directories(${3MF_INCLUDE_DIR})
polyhedron_demo_plugin(io_3mf_plugin 3mf_io_plugin KEYWORDS Viewer PMP) cgal_lab_plugin(io_3mf_plugin 3mf_io_plugin KEYWORDS Viewer PMP)
target_link_libraries(io_3mf_plugin PRIVATE scene_surface_mesh_item scene_points_with_normal_item scene_polylines_item ${3MF_LIBRARIES}) target_link_libraries(io_3mf_plugin PRIVATE scene_surface_mesh_item scene_points_with_normal_item scene_polylines_item ${3MF_LIBRARIES})
target_compile_definitions(io_3mf_plugin PRIVATE -DCGAL_LINKED_WITH_3MF) target_compile_definitions(io_3mf_plugin PRIVATE -DCGAL_LINKED_WITH_3MF)
else() else()

View File

@ -5,9 +5,9 @@
#include "SMesh_type.h" #include "SMesh_type.h"
#include <CGAL/Timer.h> #include <CGAL/Timer.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/boost/graph/io.h> #include <CGAL/boost/graph/io.h>
@ -18,14 +18,14 @@
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_gocad_plugin : class CGAL_Lab_gocad_plugin :
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "gocad_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "gocad_io_plugin.json")
public: public:
@ -38,17 +38,17 @@ public:
bool save(QFileInfo fileinfo, QList<CGAL::Three::Scene_item*>& ); bool save(QFileInfo fileinfo, QList<CGAL::Three::Scene_item*>& );
}; };
QString Polyhedron_demo_gocad_plugin::nameFilters() const { QString CGAL_Lab_gocad_plugin::nameFilters() const {
return "GOCAD files (*.ts)"; return "GOCAD files (*.ts)";
} }
bool Polyhedron_demo_gocad_plugin::canLoad(QFileInfo) const { bool CGAL_Lab_gocad_plugin::canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> QList<Scene_item*>
Polyhedron_demo_gocad_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) { CGAL_Lab_gocad_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
// Open file // Open file
std::ifstream in(fileinfo.filePath().toUtf8()); std::ifstream in(fileinfo.filePath().toUtf8());
@ -101,13 +101,13 @@ Polyhedron_demo_gocad_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_sce
return QList<Scene_item*>()<<item; return QList<Scene_item*>()<<item;
} }
bool Polyhedron_demo_gocad_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_gocad_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
// This plugin supports polyhedrons // This plugin supports polyhedrons
return qobject_cast<const Scene_surface_mesh_item*>(item); return qobject_cast<const Scene_surface_mesh_item*>(item);
} }
bool Polyhedron_demo_gocad_plugin:: bool CGAL_Lab_gocad_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();

View File

@ -14,8 +14,8 @@
// File Description : // File Description :
//****************************************************************************** //******************************************************************************
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "implicit_functions/Implicit_function_interface.h" #include "implicit_functions/Implicit_function_interface.h"
#include "Scene_implicit_function_item.h" #include "Scene_implicit_function_item.h"
@ -33,11 +33,11 @@
using namespace CGAL::Three; using namespace CGAL::Three;
class Io_implicit_function_plugin : class Io_implicit_function_plugin :
public QObject, public QObject,
protected Polyhedron_demo_plugin_helper protected CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "implicit_function_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "implicit_function_io_plugin.json")
public: public:
Io_implicit_function_plugin(); Io_implicit_function_plugin();
@ -50,7 +50,7 @@ public:
// bool canLoad() const { return false; } // bool canLoad() const { return false; }
typedef Polyhedron_demo_plugin_helper Plugin_helper; typedef CGAL_Lab_plugin_helper Plugin_helper;
using Plugin_helper::init; using Plugin_helper::init;
virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*); virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*);

View File

@ -1,17 +1,17 @@
#include "Scene_points_with_normal_item.h" #include "Scene_points_with_normal_item.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Scene_item.h> #include <CGAL/Three/Scene_item.h>
#include <CGAL/Point_set_3/IO.h> #include <CGAL/Point_set_3/IO.h>
#include <fstream> #include <fstream>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_las_plugin : class CGAL_Lab_las_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "las_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "las_io_plugin.json")
public: public:
QString name() const { return "las_plugin"; } QString name() const { return "las_plugin"; }
@ -23,11 +23,11 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& ); bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& );
}; };
bool Polyhedron_demo_las_plugin::canLoad(QFileInfo ) const { bool CGAL_Lab_las_plugin::canLoad(QFileInfo ) const {
return true; return true;
} }
QList<Scene_item*> Polyhedron_demo_las_plugin:: QList<Scene_item*> CGAL_Lab_las_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) { load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary); std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary);
@ -70,12 +70,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>()<<item; return QList<Scene_item*>()<<item;
} }
bool Polyhedron_demo_las_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_las_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
return qobject_cast<const Scene_points_with_normal_item*>(item); return qobject_cast<const Scene_points_with_normal_item*>(item);
} }
bool Polyhedron_demo_las_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) bool CGAL_Lab_las_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();
// Check extension (quietly) // Check extension (quietly)

View File

@ -1,18 +1,18 @@
#include "Scene_nef_polyhedron_item.h" #include "Scene_nef_polyhedron_item.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <fstream> #include <fstream>
#include <limits> #include <limits>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_io_nef_plugin : class CGAL_Lab_io_nef_plugin :
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "nef_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "nef_io_plugin.json")
public: public:
QString nameFilters() const override; QString nameFilters() const override;
@ -29,16 +29,16 @@ public:
} }
}; };
QString Polyhedron_demo_io_nef_plugin::nameFilters() const { QString CGAL_Lab_io_nef_plugin::nameFilters() const {
return "nef files (*.nef3)"; return "nef files (*.nef3)";
} }
bool Polyhedron_demo_io_nef_plugin::canLoad(QFileInfo) const { bool CGAL_Lab_io_nef_plugin::canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> Polyhedron_demo_io_nef_plugin:: QList<Scene_item*> CGAL_Lab_io_nef_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) { load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
//do not try file with extension different from nef3 //do not try file with extension different from nef3
if (fileinfo.suffix() != "nef3") if (fileinfo.suffix() != "nef3")
@ -79,13 +79,13 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>()<<item; return QList<Scene_item*>()<<item;
} }
bool Polyhedron_demo_io_nef_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_io_nef_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
// This plugin supports polyhedrons and polygon soups // This plugin supports polyhedrons and polygon soups
return qobject_cast<const Scene_nef_polyhedron_item*>(item); return qobject_cast<const Scene_nef_polyhedron_item*>(item);
} }
bool Polyhedron_demo_io_nef_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) bool CGAL_Lab_io_nef_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();
// This plugin supports polyhedrons and polygon soups // This plugin supports polyhedrons and polygon soups

View File

@ -3,7 +3,7 @@
#include "Scene_points_with_normal_item.h" #include "Scene_points_with_normal_item.h"
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/exceptions.h> #include <CGAL/exceptions.h>
@ -20,13 +20,13 @@
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_off_plugin : class CGAL_Lab_off_plugin :
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "off_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "off_io_plugin.json")
public: public:
bool isDefaultLoader(const Scene_item *item) const override bool isDefaultLoader(const Scene_item *item) const override
@ -53,11 +53,11 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& ) override; bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& ) override;
}; };
bool Polyhedron_demo_off_plugin::canLoad(QFileInfo) const { bool CGAL_Lab_off_plugin::canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> Polyhedron_demo_off_plugin:: QList<Scene_item*> CGAL_Lab_off_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) { load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
if(fileinfo.size() == 0) if(fileinfo.size() == 0)
@ -105,7 +105,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
CGAL::Three::Scene_item* CGAL::Three::Scene_item*
Polyhedron_demo_off_plugin::load_off(QFileInfo fileinfo) { CGAL_Lab_off_plugin::load_off(QFileInfo fileinfo) {
// Open file // Open file
std::ifstream in(fileinfo.filePath().toUtf8()); std::ifstream in(fileinfo.filePath().toUtf8());
if(!in) { if(!in) {
@ -207,7 +207,7 @@ Polyhedron_demo_off_plugin::load_off(QFileInfo fileinfo) {
} }
CGAL::Three::Scene_item* CGAL::Three::Scene_item*
Polyhedron_demo_off_plugin::load_obj(QFileInfo fileinfo) { CGAL_Lab_off_plugin::load_obj(QFileInfo fileinfo) {
// Open file // Open file
std::ifstream in(fileinfo.filePath().toUtf8()); std::ifstream in(fileinfo.filePath().toUtf8());
if(!in) { if(!in) {
@ -230,7 +230,7 @@ Polyhedron_demo_off_plugin::load_obj(QFileInfo fileinfo) {
return nullptr; return nullptr;
} }
bool Polyhedron_demo_off_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_off_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
// This plugin supports surface_meshes and polygon soups // This plugin supports surface_meshes and polygon soups
return qobject_cast<const Scene_surface_mesh_item*>(item) || return qobject_cast<const Scene_surface_mesh_item*>(item) ||
@ -240,7 +240,7 @@ bool Polyhedron_demo_off_plugin::canSave(const CGAL::Three::Scene_item* item)
bool bool
Polyhedron_demo_off_plugin:: CGAL_Lab_off_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();

View File

@ -1,17 +1,17 @@
#include "Scene_nef_polyhedron_item.h" #include "Scene_nef_polyhedron_item.h"
#include "Nef_type.h" #include "Nef_type.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <fstream> #include <fstream>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_off_to_nef_plugin : class CGAL_Lab_off_to_nef_plugin :
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "off_to_nef_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "off_to_nef_io_plugin.json")
public: public:
QString name() const { return "off_to_nef_plugin"; } QString name() const { return "off_to_nef_plugin"; }
@ -23,11 +23,11 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& ); bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& );
}; };
bool Polyhedron_demo_off_to_nef_plugin::canLoad(QFileInfo) const { bool CGAL_Lab_off_to_nef_plugin::canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> Polyhedron_demo_off_to_nef_plugin:: QList<Scene_item*> CGAL_Lab_off_to_nef_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene){ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
std::ifstream in(fileinfo.filePath().toUtf8()); std::ifstream in(fileinfo.filePath().toUtf8());
@ -57,12 +57,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
return QList<Scene_item*>()<<item; return QList<Scene_item*>()<<item;
} }
bool Polyhedron_demo_off_to_nef_plugin::canSave(const CGAL::Three::Scene_item*) bool CGAL_Lab_off_to_nef_plugin::canSave(const CGAL::Three::Scene_item*)
{ {
return false; return false;
} }
bool Polyhedron_demo_off_to_nef_plugin:: bool CGAL_Lab_off_to_nef_plugin::
save(QFileInfo ,QList<CGAL::Three::Scene_item*>&) save(QFileInfo ,QList<CGAL::Three::Scene_item*>&)
{ {
return false; return false;

View File

@ -4,7 +4,7 @@
#include "Scene_points_with_normal_item.h" #include "Scene_points_with_normal_item.h"
#include <CGAL/IO/PLY.h> #include <CGAL/IO/PLY.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Surface_mesh/IO/PLY.h> #include <CGAL/Surface_mesh/IO/PLY.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
@ -21,13 +21,13 @@
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_ply_plugin : class CGAL_Lab_ply_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "ply_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "ply_io_plugin.json")
public: public:
bool isDefaultLoader(const CGAL::Three::Scene_item *item) const override bool isDefaultLoader(const CGAL::Three::Scene_item *item) const override
@ -46,13 +46,13 @@ public:
}; };
bool Polyhedron_demo_ply_plugin:: bool CGAL_Lab_ply_plugin::
canLoad(QFileInfo) const { canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> QList<Scene_item*>
Polyhedron_demo_ply_plugin:: CGAL_Lab_ply_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) { load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary); std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary);
@ -175,7 +175,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>(); return QList<Scene_item*>();
} }
bool Polyhedron_demo_ply_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_ply_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
// This plugin supports point sets and any type of surface // This plugin supports point sets and any type of surface
return (qobject_cast<const Scene_points_with_normal_item*>(item) return (qobject_cast<const Scene_points_with_normal_item*>(item)
@ -184,7 +184,7 @@ bool Polyhedron_demo_ply_plugin::canSave(const CGAL::Three::Scene_item* item)
|| qobject_cast<const Scene_textured_surface_mesh_item*>(item)); || qobject_cast<const Scene_textured_surface_mesh_item*>(item));
} }
bool Polyhedron_demo_ply_plugin:: bool CGAL_Lab_ply_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();

View File

@ -1,9 +1,9 @@
#include "Scene_polylines_item.h" #include "Scene_polylines_item.h"
#include <QMainWindow> #include <QMainWindow>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Polygon_mesh_processing/internal/simplify_polyline.h> #include <CGAL/Polygon_mesh_processing/internal/simplify_polyline.h>
#include <CGAL/boost/graph/split_graph_into_polylines.h> #include <CGAL/boost/graph/split_graph_into_polylines.h>
#include <CGAL/Mesh_3/polylines_to_protect.h> #include <CGAL/Mesh_3/polylines_to_protect.h>
@ -14,22 +14,22 @@
#include <QMessageBox> #include <QMessageBox>
#include <QInputDialog> #include <QInputDialog>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_polylines_io_plugin : class CGAL_Lab_polylines_io_plugin :
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface, public CGAL_Lab_io_plugin_interface,
public Polyhedron_demo_plugin_helper public CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "polylines_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "polylines_io_plugin.json")
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90")
public: public:
// To silent a warning -Woverloaded-virtual // To silent a warning -Woverloaded-virtual
// See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings // See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
using Polyhedron_demo_io_plugin_interface::init; using CGAL_Lab_io_plugin_interface::init;
//! Configures the widget //! Configures the widget
void init(QMainWindow* mainWindow, void init(QMainWindow* mainWindow,
CGAL::Three::Scene_interface* scene_interface, CGAL::Three::Scene_interface* scene_interface,
@ -54,10 +54,10 @@ public:
actionSimplify_polylines->setProperty("subMenuName", "Operations on Polylines"); actionSimplify_polylines->setProperty("subMenuName", "Operations on Polylines");
actionSimplify_polylines->setObjectName("actionSimplifyPolylines"); actionSimplify_polylines->setObjectName("actionSimplifyPolylines");
connect(actionSplit_polylines, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::split); connect(actionSplit_polylines, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::split);
connect(actionSplit_polylines_graph, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::split_graph); connect(actionSplit_polylines_graph, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::split_graph);
connect(actionJoin_polylines, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::join); connect(actionJoin_polylines, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::join);
connect(actionSimplify_polylines, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::simplify); connect(actionSimplify_polylines, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::simplify);
} }
@ -118,7 +118,7 @@ private:
QAction* actionSimplify_polylines; QAction* actionSimplify_polylines;
}; };
bool Polyhedron_demo_polylines_io_plugin::canLoad(QFileInfo fileinfo) const{ bool CGAL_Lab_polylines_io_plugin::canLoad(QFileInfo fileinfo) const{
if(!fileinfo.suffix().contains("cgal")) if(!fileinfo.suffix().contains("cgal"))
return true; return true;
std::ifstream in(fileinfo.filePath().toUtf8()); std::ifstream in(fileinfo.filePath().toUtf8());
@ -134,7 +134,7 @@ bool Polyhedron_demo_polylines_io_plugin::canLoad(QFileInfo fileinfo) const{
QList<Scene_item*> QList<Scene_item*>
Polyhedron_demo_polylines_io_plugin:: CGAL_Lab_polylines_io_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene){ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
// Open file // Open file
@ -212,12 +212,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
return QList<Scene_item*>()<<item; return QList<Scene_item*>()<<item;
} }
bool Polyhedron_demo_polylines_io_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_polylines_io_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
return qobject_cast<const Scene_polylines_item*>(item) != 0; return qobject_cast<const Scene_polylines_item*>(item) != 0;
} }
bool Polyhedron_demo_polylines_io_plugin:: bool CGAL_Lab_polylines_io_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();
@ -259,7 +259,7 @@ save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
return res; return res;
} }
void Polyhedron_demo_polylines_io_plugin::split() void CGAL_Lab_polylines_io_plugin::split()
{ {
Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex())); Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex()));
Scene_group_item* group = new Scene_group_item("Split Polylines"); Scene_group_item* group = new Scene_group_item("Split Polylines");
@ -324,7 +324,7 @@ polylines_to_split(std::vector<std::vector<P> >& polylines,
CGAL::split_graph_into_polylines(const_graph, visitor); CGAL::split_graph_into_polylines(const_graph, visitor);
} }
void Polyhedron_demo_polylines_io_plugin::split_graph() void CGAL_Lab_polylines_io_plugin::split_graph()
{ {
Scene_item* main_item = scene->item(scene->mainSelectionIndex()); Scene_item* main_item = scene->item(scene->mainSelectionIndex());
Scene_polylines_item* polylines_item = Scene_polylines_item* polylines_item =
@ -339,7 +339,7 @@ void Polyhedron_demo_polylines_io_plugin::split_graph()
scene->addItem(new_item); scene->addItem(new_item);
} }
void Polyhedron_demo_polylines_io_plugin::simplify() void CGAL_Lab_polylines_io_plugin::simplify()
{ {
Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex())); Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex()));
bool ok; bool ok;
@ -362,7 +362,7 @@ void Polyhedron_demo_polylines_io_plugin::simplify()
item->redraw(); item->redraw();
} }
void Polyhedron_demo_polylines_io_plugin::join() void CGAL_Lab_polylines_io_plugin::join()
{ {
std::vector<Scene_polylines_item*> items; std::vector<Scene_polylines_item*> items;

View File

@ -4,7 +4,7 @@
#include "Kernel_type.h" #include "Kernel_type.h"
#include "Scene.h" #include "Scene.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/IO/polygon_soup_io.h> #include <CGAL/IO/polygon_soup_io.h>
@ -26,13 +26,13 @@
#include <vector> #include <vector>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_stl_plugin : class CGAL_Lab_stl_plugin :
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "stl_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "stl_io_plugin.json")
public: public:
QString nameFilters() const; QString nameFilters() const;
@ -44,18 +44,18 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&); bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&);
}; };
QString Polyhedron_demo_stl_plugin::nameFilters() const { QString CGAL_Lab_stl_plugin::nameFilters() const {
return "STL files (*.stl)"; return "STL files (*.stl)";
} }
bool Polyhedron_demo_stl_plugin::canLoad(QFileInfo) const { bool CGAL_Lab_stl_plugin::canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> QList<Scene_item*>
Polyhedron_demo_stl_plugin:: CGAL_Lab_stl_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene){ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
// Open file // Open file
@ -120,12 +120,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
return QList<Scene_item*>()<<item; return QList<Scene_item*>()<<item;
} }
bool Polyhedron_demo_stl_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_stl_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
return qobject_cast<const Scene_surface_mesh_item*>(item); return qobject_cast<const Scene_surface_mesh_item*>(item);
} }
bool Polyhedron_demo_stl_plugin:: bool CGAL_Lab_stl_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();

View File

@ -2,7 +2,7 @@
#include <QMainWindow> #include <QMainWindow>
#include <QObject> #include <QObject>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Scene_group_item.h> #include <CGAL/Three/Scene_group_item.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
@ -18,11 +18,11 @@
using namespace CGAL::Three; using namespace CGAL::Three;
class Surf_io_plugin: class Surf_io_plugin:
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "surf_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "surf_io_plugin.json")
public: public:

View File

@ -18,8 +18,8 @@
#include "Scene_polylines_item.h" #include "Scene_polylines_item.h"
#include "Scene_points_with_normal_item.h" #include "Scene_points_with_normal_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <QApplication> #include <QApplication>
@ -183,13 +183,13 @@ namespace CGAL{
}//end namespace CGAL }//end namespace CGAL
class Polyhedron_demo_vtk_plugin : class CGAL_Lab_vtk_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "vtk_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "vtk_io_plugin.json")
public: public:
typedef boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor; typedef boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
@ -543,7 +543,7 @@ public:
CGAL::Three::Three::scene()->addItem(point_item); CGAL::Three::Three::scene()->addItem(point_item);
return QList<Scene_item*>()<<point_item; return QList<Scene_item*>()<<point_item;
} }
}; // end Polyhedron_demo_vtk_plugin }; // end CGAL_Lab_vtk_plugin
#include "VTK_io_plugin.moc" #include "VTK_io_plugin.moc"

View File

@ -1,6 +1,6 @@
#include "Scene_polylines_item.h" #include "Scene_polylines_item.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <QInputDialog> #include <QInputDialog>
#include <QApplication> #include <QApplication>
@ -10,13 +10,13 @@
#include <QMessageBox> #include <QMessageBox>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_wkt_plugin : class CGAL_Lab_wkt_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "wkt_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "wkt_io_plugin.json")
public: public:
bool isDefaultLoader(const CGAL::Three::Scene_item *item) const bool isDefaultLoader(const CGAL::Three::Scene_item *item) const
@ -37,13 +37,13 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&); bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&);
}; };
bool Polyhedron_demo_wkt_plugin:: bool CGAL_Lab_wkt_plugin::
canLoad(QFileInfo) const { canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> QList<Scene_item*>
Polyhedron_demo_wkt_plugin:: CGAL_Lab_wkt_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) { load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary); std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary);
@ -77,13 +77,13 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>() << item; return QList<Scene_item*>() << item;
} }
bool Polyhedron_demo_wkt_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_wkt_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
// This plugin supports polylines // This plugin supports polylines
return (qobject_cast<const Scene_polylines_item*>(item)); return (qobject_cast<const Scene_polylines_item*>(item));
} }
bool Polyhedron_demo_wkt_plugin:: bool CGAL_Lab_wkt_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();

View File

@ -2,20 +2,20 @@
#include "Kernel_type.h" #include "Kernel_type.h"
#include <QMainWindow> #include <QMainWindow>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <fstream> #include <fstream>
#include <QMessageBox> #include <QMessageBox>
#include <QMenu> #include <QMenu>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_xyz_plugin : class CGAL_Lab_xyz_plugin :
public QObject, public QObject,
public Polyhedron_demo_io_plugin_interface public CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "xyz_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "xyz_io_plugin.json")
public: public:
@ -28,13 +28,13 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&); bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&);
}; };
bool Polyhedron_demo_xyz_plugin::canLoad(QFileInfo) const { bool CGAL_Lab_xyz_plugin::canLoad(QFileInfo) const {
return true; return true;
} }
QList<Scene_item*> QList<Scene_item*>
Polyhedron_demo_xyz_plugin:: CGAL_Lab_xyz_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) load(QFileInfo fileinfo, bool& ok, bool add_to_scene)
{ {
// Open file // Open file
@ -74,13 +74,13 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene)
return QList<Scene_item*>()<<point_set_item; return QList<Scene_item*>()<<point_set_item;
} }
bool Polyhedron_demo_xyz_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_xyz_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
// This plugin supports point sets // This plugin supports point sets
return qobject_cast<const Scene_points_with_normal_item*>(item); return qobject_cast<const Scene_points_with_normal_item*>(item);
} }
bool Polyhedron_demo_xyz_plugin:: bool CGAL_Lab_xyz_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();

View File

@ -1,5 +1,5 @@
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Combinatorial_map_save_load.h> #include <CGAL/Combinatorial_map_save_load.h>
#include <CGAL/Polyhedron_3_to_lcc.h> #include <CGAL/Polyhedron_3_to_lcc.h>
@ -10,11 +10,11 @@
class LCC_io_plugin : class LCC_io_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "lcc_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "lcc_io_plugin.json")
public: public:
bool isDefaultLoader(const CGAL::Three::Scene_item *item) const override bool isDefaultLoader(const CGAL::Three::Scene_item *item) const override

View File

@ -1,6 +1,6 @@
#include <CGAL/IO/io.h> #include <CGAL/IO/io.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "T3_type.h" #include "T3_type.h"
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -8,11 +8,11 @@
class Triangulation_3_io_plugin : class Triangulation_3_io_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "triangulation_3_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "triangulation_3_io_plugin.json")
public: public:

View File

@ -1,6 +1,6 @@
include(polyhedron_demo_macros) include(cgallab_macros)
polyhedron_demo_plugin(isosurface_3_plugin Isosurface_3_plugin KEYWORDS cgal_lab_plugin(isosurface_3_plugin Isosurface_3_plugin KEYWORDS
Isosurface_3) Isosurface_3)
target_link_libraries( target_link_libraries(
isosurface_3_plugin PUBLIC scene_polygon_soup_item scene_image_item ) isosurface_3_plugin PUBLIC scene_polygon_soup_item scene_image_item )

View File

@ -7,18 +7,18 @@
#include "SMesh_type.h" #include "SMesh_type.h"
#include "Image_type.h" #include "Image_type.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h> #include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h> #include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
using namespace CGAL::Three; using namespace CGAL::Three;
class Polyhedron_demo_isosurface_3_plugin : class CGAL_Lab_isosurface_3_plugin :
public QObject, public QObject,
public Polyhedron_demo_plugin_interface public CGAL_Lab_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public: public:
void init(QMainWindow*mw, void init(QMainWindow*mw,
Scene_interface* scene_interface, Scene_interface* scene_interface,
@ -45,9 +45,9 @@ private:
QList<QAction*> _actions; QList<QAction*> _actions;
Scene_interface* scene; Scene_interface* scene;
QMainWindow* mw; QMainWindow* mw;
}; // end Polyhedron_demo_convex_hull_plugin }; // end CGAL_Lab_convex_hull_plugin
class Polyhedron_demo_isosurface_3_plugin_helper { class CGAL_Lab_isosurface_3_plugin_helper {
typedef float Word_type; typedef float Word_type;
typedef std::size_t vertex_descriptor; typedef std::size_t vertex_descriptor;
typedef std::pair<Word_type, Word_type> surface_descriptor; typedef std::pair<Word_type, Word_type> surface_descriptor;
@ -121,7 +121,7 @@ class Polyhedron_demo_isosurface_3_plugin_helper {
}; };
public: public:
Polyhedron_demo_isosurface_3_plugin_helper(const Image* image) CGAL_Lab_isosurface_3_plugin_helper(const Image* image)
{ {
image_ = image; image_ = image;
} }
@ -322,7 +322,7 @@ private:
} }
}; };
void Polyhedron_demo_isosurface_3_plugin::on_actionDualLabel_triggered() void CGAL_Lab_isosurface_3_plugin::on_actionDualLabel_triggered()
{ {
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -340,7 +340,7 @@ void Polyhedron_demo_isosurface_3_plugin::on_actionDualLabel_triggered()
time_per_op.start(); time_per_op.start();
std::cout << "Dual contour label image..."; std::cout << "Dual contour label image...";
Polyhedron_demo_isosurface_3_plugin_helper helper(img_item->image()); CGAL_Lab_isosurface_3_plugin_helper helper(img_item->image());
helper.dual_contouring_label_image(); helper.dual_contouring_label_image();
std::vector<Point_3> vertices; std::vector<Point_3> vertices;

View File

@ -1,7 +1,7 @@
include(polyhedron_demo_macros) include(cgallab_macros)
#if the plugin has a UI file #if the plugin has a UI file
qt6_wrap_ui(mesh_2UI_FILES mesh_2_dialog.ui) qt6_wrap_ui(mesh_2UI_FILES mesh_2_dialog.ui)
polyhedron_demo_plugin(mesh_2_plugin Mesh_2_plugin ${mesh_2UI_FILES}) cgal_lab_plugin(mesh_2_plugin Mesh_2_plugin ${mesh_2UI_FILES})
#if the plugin uses external libraries like scene_items #if the plugin uses external libraries like scene_items
target_link_libraries( target_link_libraries(
mesh_2_plugin PUBLIC scene_surface_mesh_item scene_polylines_item mesh_2_plugin PUBLIC scene_surface_mesh_item scene_polylines_item

View File

@ -11,8 +11,8 @@
#include <QtCore/qglobal.h> #include <QtCore/qglobal.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include "Scene_surface_mesh_item.h" #include "Scene_surface_mesh_item.h"
@ -139,13 +139,13 @@ void cdt2_to_face_graph(const CDT& cdt, TriangleMesh& tm, int constant_coordinat
} }
} }
class Polyhedron_demo_mesh_2_plugin : class CGAL_Lab_mesh_2_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_plugin_helper public CGAL::Three::CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public: public:
void init(QMainWindow* mainWindow, void init(QMainWindow* mainWindow,

View File

@ -1,7 +1,7 @@
#include <CGAL/SMDS_3/io_signature.h> #include <CGAL/SMDS_3/io_signature.h>
#include "Scene_c3t3_item.h" #include "Scene_c3t3_item.h"
#include <CGAL/SMDS_3/tet_soup_to_c3t3.h> #include <CGAL/SMDS_3/tet_soup_to_c3t3.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include <CGAL/IO/File_avizo.h> #include <CGAL/IO/File_avizo.h>
#include <iostream> #include <iostream>
@ -9,13 +9,13 @@
#include <QMessageBox> #include <QMessageBox>
class Polyhedron_demo_c3t3_binary_io_plugin : class CGAL_Lab_c3t3_binary_io_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "c3t3_io_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "c3t3_io_plugin.json")
public: public:
QString name() const override { return "C3t3_io_plugin"; } QString name() const override { return "C3t3_io_plugin"; }
@ -42,7 +42,7 @@ private:
}; };
bool Polyhedron_demo_c3t3_binary_io_plugin::canLoad(QFileInfo fi) const { bool CGAL_Lab_c3t3_binary_io_plugin::canLoad(QFileInfo fi) const {
if(!fi.suffix().contains("cgal")) if(!fi.suffix().contains("cgal"))
return true; return true;
std::ifstream in(fi.filePath().toUtf8(), std::ifstream in(fi.filePath().toUtf8(),
@ -71,7 +71,7 @@ bool Polyhedron_demo_c3t3_binary_io_plugin::canLoad(QFileInfo fi) const {
} }
QList<Scene_item*> QList<Scene_item*>
Polyhedron_demo_c3t3_binary_io_plugin::load( CGAL_Lab_c3t3_binary_io_plugin::load(
QFileInfo fileinfo, bool& ok, bool add_to_scene) { QFileInfo fileinfo, bool& ok, bool add_to_scene) {
// Open file // Open file
@ -185,14 +185,14 @@ Polyhedron_demo_c3t3_binary_io_plugin::load(
return QList<Scene_item*>(); return QList<Scene_item*>();
} }
bool Polyhedron_demo_c3t3_binary_io_plugin::canSave(const CGAL::Three::Scene_item* item) bool CGAL_Lab_c3t3_binary_io_plugin::canSave(const CGAL::Three::Scene_item* item)
{ {
// This plugin supports c3t3 items. // This plugin supports c3t3 items.
return qobject_cast<const Scene_c3t3_item*>(item); return qobject_cast<const Scene_c3t3_item*>(item);
} }
bool bool
Polyhedron_demo_c3t3_binary_io_plugin:: CGAL_Lab_c3t3_binary_io_plugin::
save(QFileInfo fileinfo, QList<Scene_item *> &items) save(QFileInfo fileinfo, QList<Scene_item *> &items)
{ {
Scene_item* item = items.front(); Scene_item* item = items.front();
@ -481,7 +481,7 @@ struct Update_cell_from_CDT_3 {
}; // end struct Update_cell }; // end struct Update_cell
bool bool
Polyhedron_demo_c3t3_binary_io_plugin:: CGAL_Lab_c3t3_binary_io_plugin::
try_load_a_cdt_3(std::istream& is, C3t3& c3t3) try_load_a_cdt_3(std::istream& is, C3t3& c3t3)
{ {
std::cerr << "Try load a CDT_3..."; std::cerr << "Try load a CDT_3...";
@ -522,7 +522,7 @@ try_load_a_cdt_3(std::istream& is, C3t3& c3t3)
} }
void void
Polyhedron_demo_c3t3_binary_io_plugin:: CGAL_Lab_c3t3_binary_io_plugin::
update_c3t3(C3t3& c3t3) update_c3t3(C3t3& c3t3)
{ {
using Cell_handle = C3t3::Triangulation::Cell_handle; using Cell_handle = C3t3::Triangulation::Cell_handle;
@ -563,7 +563,7 @@ update_c3t3(C3t3& c3t3)
//Generates a compilation error. //Generates a compilation error.
bool bool
Polyhedron_demo_c3t3_binary_io_plugin:: CGAL_Lab_c3t3_binary_io_plugin::
try_load_other_binary_format(std::istream& is, C3t3& c3t3) try_load_other_binary_format(std::istream& is, C3t3& c3t3)
{ {
CGAL::IO::set_ascii_mode(is); CGAL::IO::set_ascii_mode(is);
@ -583,7 +583,7 @@ try_load_other_binary_format(std::istream& is, C3t3& c3t3)
std::getline(is, s); std::getline(is, s);
if(s != "") { if(s != "") {
if(s != std::string(" ") + CGAL::Get_io_signature<Fake_c3t3>()()) { if(s != std::string(" ") + CGAL::Get_io_signature<Fake_c3t3>()()) {
std::cerr << "Polyhedron_demo_c3t3_binary_io_plugin::try_load_other_binary_format:" std::cerr << "CGAL_Lab_c3t3_binary_io_plugin::try_load_other_binary_format:"
<< "\n expected format: " << CGAL::Get_io_signature<Fake_c3t3>()() << "\n expected format: " << CGAL::Get_io_signature<Fake_c3t3>()()
<< "\n got format:" << s << std::endl; << "\n got format:" << s << std::endl;
return false; return false;

View File

@ -6,8 +6,8 @@
#endif #endif
#include <CGAL/Three/Viewer_interface.h> #include <CGAL/Three/Viewer_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h> #include <CGAL/Three/Three.h>
#include "Scene_c3t3_item.h" #include "Scene_c3t3_item.h"
@ -33,11 +33,11 @@ using namespace CGAL::Three;
class C3t3_rib_exporter_plugin : class C3t3_rib_exporter_plugin :
public QObject, public QObject,
protected Polyhedron_demo_plugin_helper protected CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "c3t3_rib_exporter_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "c3t3_rib_exporter_plugin.json")
public: public:
C3t3_rib_exporter_plugin(); C3t3_rib_exporter_plugin();

View File

@ -1,4 +1,4 @@
include(polyhedron_demo_macros) include(cgallab_macros)
remove_definitions(-DQT_STATICPLUGIN) remove_definitions(-DQT_STATICPLUGIN)
@ -8,7 +8,7 @@ qt6_wrap_cpp(VOLUME_MOC_OUTFILES
${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h) ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h)
qt6_wrap_ui(meshingUI_FILES Meshing_dialog.ui Smoother_dialog.ui qt6_wrap_ui(meshingUI_FILES Meshing_dialog.ui Smoother_dialog.ui
Local_optimizers_dialog.ui) Local_optimizers_dialog.ui)
polyhedron_demo_plugin( cgal_lab_plugin(
mesh_3_plugin mesh_3_plugin
Mesh_3_plugin Mesh_3_plugin
Mesh_3_plugin_cgal_code.cpp Mesh_3_plugin_cgal_code.cpp
@ -59,7 +59,7 @@ endif()
find_package(Boost QUIET OPTIONAL_COMPONENTS filesystem system) find_package(Boost QUIET OPTIONAL_COMPONENTS filesystem system)
if(Boost_FILESYSTEM_FOUND) if(Boost_FILESYSTEM_FOUND)
qt6_wrap_ui( imgUI_FILES Image_res_dialog.ui raw_image.ui) qt6_wrap_ui( imgUI_FILES Image_res_dialog.ui raw_image.ui)
polyhedron_demo_plugin(io_image_plugin Io_image_plugin cgal_lab_plugin(io_image_plugin Io_image_plugin
Volume_plane_intersection.cpp Volume_plane_intersection.cpp
Raw_image_dialog.cpp Raw_image_dialog.cpp
${imgUI_FILES} ${imgUI_FILES}
@ -78,7 +78,7 @@ if(Boost_FILESYSTEM_FOUND)
else() else()
message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled") message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled")
endif() endif()
polyhedron_demo_plugin( cgal_lab_plugin(
mesh_3_optimization_plugin mesh_3_optimization_plugin
Optimization_plugin Optimization_plugin
Optimization_plugin_cgal_code.cpp Optimization_plugin_cgal_code.cpp
@ -101,15 +101,15 @@ else()
"A deprecated class will be used to replace it. Warnings are to be expected.") "A deprecated class will be used to replace it. Warnings are to be expected.")
endif() endif()
polyhedron_demo_plugin(c3t3_io_plugin C3t3_io_plugin KEYWORDS Viewer Mesh_3) cgal_lab_plugin(c3t3_io_plugin C3t3_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(c3t3_io_plugin PUBLIC scene_c3t3_item) target_link_libraries(c3t3_io_plugin PUBLIC scene_c3t3_item)
qt6_wrap_ui(tetraUI_FILES Tetrahedra_filter_widget.ui) qt6_wrap_ui(tetraUI_FILES Tetrahedra_filter_widget.ui)
polyhedron_demo_plugin(tetrahedra_filtering_plugin Tetrahedra_filtering_plugin ${tetraUI_FILES} KEYWORDS Mesh_3 Viewer) cgal_lab_plugin(tetrahedra_filtering_plugin Tetrahedra_filtering_plugin ${tetraUI_FILES} KEYWORDS Mesh_3 Viewer)
target_link_libraries(tetrahedra_filtering_plugin PUBLIC scene_c3t3_item scene_tetrahedra_item) target_link_libraries(tetrahedra_filtering_plugin PUBLIC scene_c3t3_item scene_tetrahedra_item)
qt6_wrap_ui(ribUI_FILES Rib_dialog.ui) qt6_wrap_ui(ribUI_FILES Rib_dialog.ui)
polyhedron_demo_plugin(c3t3_rib_exporter_plugin C3t3_rib_exporter_plugin cgal_lab_plugin(c3t3_rib_exporter_plugin C3t3_rib_exporter_plugin
${ribUI_FILES} KEYWORDS Mesh_3) ${ribUI_FILES} KEYWORDS Mesh_3)
target_link_libraries(c3t3_rib_exporter_plugin PUBLIC scene_c3t3_item) target_link_libraries(c3t3_rib_exporter_plugin PUBLIC scene_c3t3_item)
@ -121,7 +121,7 @@ if(TBB_FOUND)
endif() endif()
qt6_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui) qt6_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui)
polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin cgal_lab_plugin(offset_meshing_plugin Offset_meshing_plugin
${offsetMeshingUI_FILES}) ${offsetMeshingUI_FILES})
target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item
scene_polygon_soup_item scene_polygon_soup_item

View File

@ -17,8 +17,8 @@
#include <CGAL/Image_3.h> #include <CGAL/Image_3.h>
#include <CGAL/ImageIO.h> #include <CGAL/ImageIO.h>
#include <CGAL/SEP_to_ImageIO.h> #include <CGAL/SEP_to_ImageIO.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Scene_interface.h> #include <CGAL/Three/Scene_interface.h>
#include <CGAL/Three/Scene_item.h> #include <CGAL/Three/Scene_item.h>
#include <CGAL/Three/Scene_group_item.h> #include <CGAL/Three/Scene_group_item.h>
@ -48,7 +48,7 @@
#include <QSettings> #include <QSettings>
#include <QUrl> #include <QUrl>
#include "Raw_image_dialog.h" #include "Raw_image_dialog.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#ifdef CGAL_USE_VTK #ifdef CGAL_USE_VTK
#include <CGAL/IO/read_vtk_image_data.h> #include <CGAL/IO/read_vtk_image_data.h>
@ -253,13 +253,13 @@ enum class Directory_extension_type
class Io_image_plugin : class Io_image_plugin :
public QObject, public QObject,
public CGAL::Three::Polyhedron_demo_plugin_helper, public CGAL::Three::CGAL_Lab_plugin_helper,
public CGAL::Three::Polyhedron_demo_io_plugin_interface public CGAL::Three::CGAL_Lab_io_plugin_interface
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "io_image_plugin.json") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "io_image_plugin.json")
public: public:
bool applicable(QAction*) const override bool applicable(QAction*) const override
@ -267,7 +267,7 @@ public:
return qobject_cast<Scene_image_item*>(scene->item(scene->mainSelectionIndex())); return qobject_cast<Scene_image_item*>(scene->item(scene->mainSelectionIndex()));
} }
using Polyhedron_demo_io_plugin_interface::init; using CGAL_Lab_io_plugin_interface::init;
void init(QMainWindow* mainWindow, void init(QMainWindow* mainWindow,
CGAL::Three::Scene_interface* scene_interface, CGAL::Three::Scene_interface* scene_interface,
Messages_interface *mi) override Messages_interface *mi) override

View File

@ -16,8 +16,8 @@
//#include <CGAL_demo/Plugin_interface.h> //#include <CGAL_demo/Plugin_interface.h>
//#include <CGAL_demo/Plugin_helper.h> //#include <CGAL_demo/Plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "implicit_functions/Implicit_function_interface.h" #include "implicit_functions/Implicit_function_interface.h"
#include "Scene_implicit_function_item.h" #include "Scene_implicit_function_item.h"
@ -36,11 +36,11 @@
using namespace CGAL::Three; using namespace CGAL::Three;
class Io_implicit_function_plugin : class Io_implicit_function_plugin :
public QObject, public QObject,
protected Polyhedron_demo_plugin_helper protected CGAL_Lab_plugin_helper
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public: public:
Io_implicit_function_plugin(); Io_implicit_function_plugin();
@ -53,7 +53,7 @@ public:
// bool canLoad() const { return false; } // bool canLoad() const { return false; }
typedef Polyhedron_demo_plugin_helper Plugin_helper; typedef CGAL_Lab_plugin_helper Plugin_helper;
using Plugin_helper::init; using Plugin_helper::init;
virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*); virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*);

Some files were not shown because too many files have changed in this diff Show More