-
-#include "Kernel_type.h"
-
-class SCENE_BASIC_OBJECTS_EXPORT Scene_plane_item
- : public Scene_item
-{
- Q_OBJECT
-public:
- typedef qglviewer::ManipulatedFrame ManipulatedFrame;
-
- Scene_plane_item(const Scene_interface* scene_interface)
- : scene(scene_interface),
- manipulable(false),
- can_clone(true),
- frame(new ManipulatedFrame())
- {
- setNormal(0., 0., 1.);
- }
-
- ~Scene_plane_item() {
- delete frame;
- }
-
- bool isFinite() const { return false; }
- bool isEmpty() const { return false; }
- Bbox bbox() const { return Bbox(); }
-
- bool manipulatable() const {
- return manipulable;
- }
- ManipulatedFrame* manipulatedFrame() {
- return frame;
- }
-
- Scene_plane_item* clone() const {
- if(can_clone)
- {
- Scene_plane_item* item = new Scene_plane_item(scene);
- item->manipulable = manipulable;
- item->can_clone = true;
- item->frame = new ManipulatedFrame;
- item->frame->setPosition(frame->position());
- item->frame->setOrientation(frame->orientation());
- return item;
- }
- else
- return 0;
- }
-
- QString toolTip() const {
- const qglviewer::Vec& pos = frame->position();
- const qglviewer::Vec& n = frame->orientation().axis();
- return
- tr("%1 (mode: %2, color: %3)
")
- .arg(this->name())
- .arg(this->renderingModeName())
- .arg(this->color().name())
-
- +
- tr("Plane
"
- "Equation: %1*x + %2*y + %3*z + %4 = 0
"
- "Normal vector: (%1, %2, %3)
"
- "Point: (%5, %6, %7)
")
- .arg(n[0]).arg(n[1]).arg(n[2])
- .arg( - pos * n)
- .arg(pos[0]).arg(pos[1]).arg(pos[2])
- +
- tr("Can clone: %1
"
- "Manipulatable: %2
")
- .arg(can_clone?tr("true"):tr("false"))
- .arg(manipulable?tr("true"):tr("false"));
- }
-
- // Indicate if rendering mode is supported
- bool supportsRenderingMode(RenderingMode m) const {
- return (m == Wireframe || m == Flat);
- }
-
- // Flat OpenGL drawing
- void draw() const {
- const double diag = scene_diag();
- ::glPushMatrix();
- ::glMultMatrixd(frame->matrix());
- GLboolean lighting;
- ::glGetBooleanv(GL_LIGHTING, &lighting);
- ::glDisable(GL_LIGHTING);
- ::glBegin(GL_POLYGON);
- ::glVertex3d(-diag, -diag, 0.);
- ::glVertex3d(-diag, diag, 0.);
- ::glVertex3d( diag, diag, 0.);
- ::glVertex3d( diag, -diag, 0.);
- ::glEnd();
- if(lighting)
- ::glEnable(GL_LIGHTING);
- ::glPopMatrix();
- };
-
- // Wireframe OpenGL drawing
- void draw_edges() const {
- ::glPushMatrix();
- ::glMultMatrixd(frame->matrix());
- QGLViewer::drawGrid((float)scene_diag());
- ::glPopMatrix();
- }
-
- Plane_3 plane() const {
- const qglviewer::Vec& pos = frame->position();
- const qglviewer::Vec& n =
- frame->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
- return Plane_3(n[0], n[1], n[2], - n * pos);
- }
-
-private:
- double scene_diag() const {
- const Bbox& bbox = scene->bbox();
- const double& xdelta = bbox.xmax-bbox.xmin;
- const double& ydelta = bbox.ymax-bbox.ymin;
- const double& zdelta = bbox.zmax-bbox.zmin;
- const double diag = std::sqrt(xdelta*xdelta +
- ydelta*ydelta +
- zdelta*zdelta);
- return diag * 0.7;
- }
-
-public slots:
- void setPosition(float x, float y, float z) {
- frame->setPosition(x, y, z);
- }
-
- void setPosition(double x, double y, double z) {
- frame->setPosition((float)x, (float)y, (float)z);
- }
-
- void setNormal(float x, float y, float z) {
- frame->setOrientation(x, y, z, 0.f);
- }
-
- void setNormal(double x, double y, double z) {
- frame->setOrientation((float)x, (float)y, (float)z, 0.f);
- }
-
- void setClonable(bool b = true) {
- can_clone = b;
- }
-
- void setManipulatable(bool b = true) {
- manipulable = b;
- }
-private:
- const Scene_interface* scene;
- bool manipulable;
- bool can_clone;
- qglviewer::ManipulatedFrame* frame;
-};
-
-#endif // SCENE_PLANE_ITEM_H
diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item.cpp
deleted file mode 100644
index 1ed9a022df6..00000000000
--- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-#include "Scene_polyhedron_item.h"
-#include "Polyhedron_type.h"
-#include
-
-#include
-#include
-
-Scene_polyhedron_item::Scene_polyhedron_item()
- : Scene_item_with_display_list(),
- poly(new Polyhedron)
-{
-}
-
-Scene_polyhedron_item::Scene_polyhedron_item(Polyhedron* const p)
- : Scene_item_with_display_list(),
- poly(p)
-{
-}
-
-Scene_polyhedron_item::Scene_polyhedron_item(const Polyhedron& p)
- : Scene_item_with_display_list(),
- poly(new Polyhedron(p))
-{
-}
-
-// Scene_polyhedron_item::Scene_polyhedron_item(const Scene_polyhedron_item& item)
-// : Scene_item_with_display_list(item),
-// poly(new Polyhedron(*item.poly))
-// {
-// }
-
-Scene_polyhedron_item::~Scene_polyhedron_item()
-{
- delete poly;
-}
-
-Scene_polyhedron_item*
-Scene_polyhedron_item::clone() const {
- return new Scene_polyhedron_item(*poly);
-}
-
-// Loads polyhedron from .OFF file
-bool
-Scene_polyhedron_item::load(std::istream& in)
-{
- in >> *poly;
- return in && !isEmpty();
-}
-
-// Write polyhedron to .OFF file
-bool
-Scene_polyhedron_item::save(std::ostream& out) const
-{
- out << *poly;
- return (bool) out;
-}
-
-QString
-Scene_polyhedron_item::toolTip() const
-{
- if(!poly)
- return QString();
-
- return QObject::tr("%1 (mode: %5, color: %6)
"
- "Number of vertices: %2
"
- "Number of edges: %3
"
- "Number of facets: %4
")
- .arg(this->name())
- .arg(poly->size_of_vertices())
- .arg(poly->size_of_halfedges()/2)
- .arg(poly->size_of_facets())
- .arg(this->renderingModeName())
- .arg(this->color().name());
-}
-
-
-bool Scene_polyhedron_item::supportsRenderingMode(RenderingMode m) const {
- return m != PointsPlusNormals && m != Splatting;
-}
-
-// Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
-void Scene_polyhedron_item::direct_draw() const {
- gl_render_facets(*poly);
-}
-
-Polyhedron*
-Scene_polyhedron_item::polyhedron() { return poly; }
-const Polyhedron*
-Scene_polyhedron_item::polyhedron() const { return poly; }
-
-bool
-Scene_polyhedron_item::isEmpty() const {
- return (poly == 0) || poly->empty();
-}
-
-Scene_polyhedron_item::Bbox
-Scene_polyhedron_item::bbox() const {
- const Point& p = *(poly->points_begin());
- CGAL::Bbox_3 bbox(p.x(), p.y(), p.z(), p.x(), p.y(), p.z());
- for(Polyhedron::Point_iterator it = poly->points_begin();
- it != poly->points_end();
- ++it) {
- bbox = bbox + it->bbox();
- }
- return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(),
- bbox.xmax(),bbox.ymax(),bbox.zmax());
-}
-
-#include "Scene_polyhedron_item.moc"
diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item.h
deleted file mode 100644
index 846bb99f1fa..00000000000
--- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef SCENE_POLYHEDRON_ITEM_H
-#define SCENE_POLYHEDRON_ITEM_H
-
-#include "Scene_polyhedron_item_config.h"
-#include "Scene_item_with_display_list.h"
-#include "Polyhedron_type_fwd.h"
-#include
-
-// This class represents a polyhedron in the OpenGL scene
-class SCENE_POLYHEDRON_ITEM_EXPORT Scene_polyhedron_item
- : public Scene_item_with_display_list {
- Q_OBJECT
-public:
- Scene_polyhedron_item();
-// Scene_polyhedron_item(const Scene_polyhedron_item&);
- Scene_polyhedron_item(const Polyhedron& p);
- Scene_polyhedron_item(Polyhedron* const p);
- ~Scene_polyhedron_item();
-
- Scene_polyhedron_item* clone() const;
-
- // IO
- bool load(std::istream& in);
- bool save(std::ostream& out) const;
-
- // Function for displaying meta-data of the item
- virtual QString toolTip() const;
-
- // Indicate if rendering mode is supported
- virtual bool supportsRenderingMode(RenderingMode m) const;
- // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list
- virtual void direct_draw() const;
-
- // Gets wrapped polyhedron
- Polyhedron* polyhedron();
- const Polyhedron* polyhedron() const;
-
- // Gets dimensions
- bool isFinite() const { return true; }
- bool isEmpty() const;
- Bbox bbox() const;
-
-private:
- Polyhedron* poly;
-
-}; // end class Scene_polyhedron_item
-
-#endif // SCENE_POLYHEDRON_ITEM_H
diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item_config.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item_config.h
deleted file mode 100644
index 9bfe270a39b..00000000000
--- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Scene_polyhedron_item_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef SCENE_POLYHEDRON_ITEM_CONFIG_H
-#define SCENE_POLYHEDRON_ITEM_CONFIG_H
-
-#ifdef PS_demo_scene_polyhedron_item_EXPORTS
-# define SCENE_POLYHEDRON_ITEM_EXPORT Q_DECL_EXPORT
-#else
-# define SCENE_POLYHEDRON_ITEM_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // SCENE_POLYHEDRON_ITEM_CONFIG_H
diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Viewer.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Viewer.cpp
deleted file mode 100644
index 370eacc52a5..00000000000
--- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Viewer.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-#include "Viewer.h"
-#include "Scene_draw_interface.h"
-
-Viewer::Viewer(QWidget* parent, bool antialiasing)
- : QGLViewer(parent),
- scene(0),
- antialiasing(antialiasing),
- twosides(false),
- m_isInitialized(false)
-{
- setBackgroundColor(::Qt::white);
-}
-
-void Viewer::setScene(Scene_draw_interface* scene)
-{
- this->scene = scene;
-}
-
-void Viewer::setAntiAliasing(bool b)
-{
- antialiasing = b;
- if(m_isInitialized)
- updateGL();
-}
-
-void Viewer::setTwoSides(bool b)
-{
- twosides = b;
- if(m_isInitialized)
- updateGL();
-}
-
-void Viewer::draw()
-{
- draw_aux(false);
-}
-
-void Viewer::initializeGL()
-{
- m_isInitialized = true;
- QGLViewer::initializeGL();
- scene->initializeGL();
-}
-
-void Viewer::draw_aux(bool with_names)
-{
- QGLViewer::draw();
- if(scene == 0)
- return;
-
- ::glLineWidth(1.0f);
- ::glPointSize(2.f);
- ::glEnable(GL_POLYGON_OFFSET_FILL);
- ::glPolygonOffset(1.0f,1.0f);
- ::glClearColor(1.0f,1.0f,1.0f,0.0f);
- ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-
- if(twosides)
- ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
- else
- ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
-
- if(antiAliasing())
- {
- ::glEnable(GL_BLEND);
- ::glEnable(GL_LINE_SMOOTH);
- ::glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
- ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- else
- {
- ::glDisable(GL_BLEND);
- ::glDisable(GL_LINE_SMOOTH);
- ::glDisable(GL_POLYGON_SMOOTH_HINT);
- ::glBlendFunc(GL_ONE, GL_ZERO);
- ::glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST);
- }
- if(with_names)
- scene->drawWithNames();
- else
- scene->draw();
-}
-
-void Viewer::drawWithNames()
-{
- draw_aux(true);
-}
-
-void Viewer::postSelection(const QPoint&)
-{
- emit selected(this->selectedName());
-}
diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Viewer.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Viewer.h
deleted file mode 100644
index e92b0897700..00000000000
--- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Viewer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef VIEWER_H
-#define VIEWER_H
-
-#include
-
-// forward declarations
-class QWidget;
-class Scene_draw_interface;
-
-class Viewer : public QGLViewer {
-
- Q_OBJECT
-
-public:
- Viewer(QWidget * parent, bool antialiasing = false);
-
- // overload several QGLViewer virtual functions
- void draw();
- void initializeGL();
- void drawWithNames();
- void postSelection(const QPoint&);
-
- void setScene(Scene_draw_interface* scene);
- bool antiAliasing() const { return antialiasing; }
-
-signals:
- void selected(int);
-
-public slots:
- void setAntiAliasing(bool b);
- void setTwoSides(bool b);
-
-private:
- void draw_aux(bool with_names);
-
- Scene_draw_interface* scene;
- bool antialiasing;
- bool twosides;
- bool m_isInitialized;
-
-}; // end class Viewer
-
-#endif // VIEWER_H
diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/cgal_test_with_cmake b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/cgal_test_with_cmake
deleted file mode 100755
index 6e3f018d3c9..00000000000
--- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/cgal_test_with_cmake
+++ /dev/null
@@ -1,251 +0,0 @@
-#! /bin/sh
-
-#
-# This script is a modified version of cgal_test_with_cmake which:
-# - is cross-platform Unix/make and Cygwin/VisualC++
-# - concats all log files to cgal_test_with_cmake.log
-# - does not clean up object files and executables if $NEED_CLEAN==n
-#
-
-# This is a script for the CGAL test suite. Such a script must obey
-# the following rules:
-#
-# - the name of the script is cgal_test_with_cmake
-# - for every target two one line messages are written to the file 'error.txt'
-# the first one indicates if the compilation was successful
-# the second one indicates if the execution was successful
-# if one of the two was not successful, the line should start with 'ERROR:'
-# - running the script should not require any user interaction
-# - the script should clean up object files and executables
-
- ERRORFILE=error.txt
- DO_RUN=
- case "$CMAKE_GENERATOR" in
- -GVisual* ) # if Visual Studio
- MAKE_CMD="devenv.com *.sln /Build Release /Project"
- MAKE_CLEAN_CMD="devenv.com *.sln /Clean Release"
- ;;
- -GNMake* ) # if nmake
- if [ -z "$MAKE_CMD" ]; then
- MAKE_CMD="nmake"
- fi
- MAKE_CMD="${MAKE_CMD} -fMakefile"
- MAKE_CLEAN_CMD="${MAKE_CMD} clean"
- ;;
- * ) # if make
- if [ -z "${MAKE_CMD}" ]; then
- MAKE_CMD=make
- fi
- MAKE_CMD="${MAKE_CMD} -fMakefile"
- MAKE_CLEAN_CMD="${MAKE_CMD} clean"
- ;;
- esac
-
-#---------------------------------------------------------------------#
-# configure
-#---------------------------------------------------------------------#
-
-configure()
-{
- echo "Configuring... "
-
- if eval 'cmake "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \
- -DCGAL_DIR="$CGAL_DIR" \
- .' ; then
-
- echo " successful configuration" >> $ERRORFILE
- else
- echo " ERROR: configuration" >> $ERRORFILE
- fi
-}
-
-#---------------------------------------------------------------------#
-# find_executable