diff --git a/.gitattributes b/.gitattributes index 92be4c7cc86..e11828394d4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2386,6 +2386,16 @@ Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/icons/wireframe.png - Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/icons/wireframeOff.png -text Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/resources/about.html -text Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/resources/about_CGAL.html -text +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.ui -text +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc -text +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_CGAL.html svneol=native#text/html +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html svneol=native#text/html +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/cp8.png -text svneol=unset#image/png +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/fileNew.png -text svneol=unset#image/png +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/pause.png -text svneol=unset#image/png +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/planar.png -text svneol=unset#image/png +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/play.png -text svneol=unset#image/png +Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/step.png -text svneol=unset#image/png Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/offsets.gif -text Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/offsets.pdf -text Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/orient.gif -text svneol=unset#image/gif diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/MainWindow.h b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/MainWindow.h index 31c3280310c..f36b71cc35d 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/MainWindow.h +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/MainWindow.h @@ -1,6 +1,7 @@ #include #include #include +#include #include "Scene.h" #include @@ -140,6 +141,7 @@ private: public: Ui::MainWindow* ui; Scene* s; + QTimer* timer; private: QAssistantClient *assistantClient; diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt new file mode 100644 index 00000000000..d459afaf370 --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -0,0 +1,53 @@ +# Created by the script cgal_create_cmake_script +# This is the CMake script for compiling a CGAL application. + +project (Periodic_Lloyd_3) + +cmake_minimum_required(VERSION 2.4.5) + +set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) + +if ( COMMAND cmake_policy ) + cmake_policy( SET CMP0003 NEW ) +endif() + +find_package(CGAL COMPONENTS Qt4) +include(${CGAL_USE_FILE}) + +set( QT_USE_QTXML TRUE ) +set( QT_USE_QTMAIN TRUE ) +set( QT_USE_QTSCRIPT TRUE ) +set( QT_USE_QTOPENGL TRUE ) +find_package(Qt4) + +find_package(OpenGL) +find_package(QGLViewer) + +if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND ) + + include(${QT_USE_FILE}) + + include_directories (${QGLVIEWER_INCLUDE_DIR}) + include_directories (BEFORE ../../include ./ ) + + # ui file, created wih Qt Designer + qt4_wrap_ui( uis MainWindow.ui ) + + # qrc files (resources files, that contain icons, at least) + qt4_add_resources ( RESOURCE_FILES ./Periodic_Lloyd_3.qrc ) + + qt4_automoc( MainWindow.cpp Viewer.cpp) + + add_executable ( Periodic_Lloyd_3 Periodic_Lloyd_3.cpp MainWindow.cpp Viewer.cpp ${uis} ${RESOURCE_FILES} ) + + add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_Lloyd_3 ) + + target_link_libraries( Periodic_Lloyd_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) + target_link_libraries( Periodic_Lloyd_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) + target_link_libraries( Periodic_Lloyd_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ) + +else() + + message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt4, and will not be compiled.") + +endif() diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.cpp b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.cpp new file mode 100644 index 00000000000..79f45d7a8df --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.cpp @@ -0,0 +1,136 @@ + +#include "MainWindow.h" + +MainWindow::MainWindow(QWidget* parent): CGAL::Qt::DemosMainWindow(parent) +{ + setupUi(this); + this->viewer->setScene(&scene); + connectActions(); + this->addAboutDemo(":/cgal/help/about_Periodic_Lloyd_3.html"); + this->addAboutCGAL(); + + scene.eight_copies=false; + scene.two_dimensional=false; + + qtimer = new QTimer(this); + connect(qtimer, SIGNAL(timeout()), this, SLOT(lloydStep())); + int slider_value = speedSlider->value(); + int speed = (100-slider_value)*100; +} + + +void +MainWindow::connectActions() +{ + QObject::connect(this->actionNew_Point_Set, SIGNAL(triggered()), + this, SLOT(newPointSet())); + + QObject::connect(this->speedSlider, SIGNAL(valueChanged(int)), + this, SLOT(speedChanged(int))); + + QObject::connect(this->viewer, SIGNAL(valueChanged(int)), + this, SLOT(speedChanged(int))); + + QObject::connect(this, SIGNAL(sceneChanged()), + this->viewer, SLOT(sceneChanged())); + + QObject::connect(this->actionStep, SIGNAL(triggered()), + this, SLOT(lloydStep())); + + QObject::connect(this->actionStop, SIGNAL(toggled(bool)), + this, SLOT(togglePause(bool))); + + QObject::connect(this->actionShow_8_Copies, SIGNAL(toggled(bool)), + this, SLOT(toggle8Copies(bool))); + + QObject::connect(this->action2D_version, SIGNAL(toggled(bool)), + this, SLOT(toggle2D(bool))); + + QObject::connect(this->actionQuit, SIGNAL(triggered()), + qApp, SLOT(quit())); +} + +void +MainWindow::togglePause(bool p) +{ + if (p) + qtimer->stop(); + else { + int speed = (100-(speedSlider->value()))*100; + qtimer->start(speed); + } +} + +void +MainWindow::toggle8Copies(bool on) +{ + scene.eight_copies = on; + emit(sceneChanged()); +} + +void +MainWindow::toggle2D(bool on) +{ + scene.two_dimensional = on; + if (on) newPointSet(); + else emit(sceneChanged()); +} + +void +MainWindow::newPointSet() +{ + bool ok; + int numberOfPoints = QInputDialog::getInteger(this, + "Periodic Lloyd", "Number of points: ", 100, 0, 2147483647, 1, &ok ); + + if (ok) newPoints(numberOfPoints); +} + +void MainWindow::lloydStep() { + scene.lloyd_step(); + viewer->updateGL(); + } + +void +MainWindow::speedChanged(int i) +{ + int speed = (100-i)*100; + if (qtimer->isActive()) { + qtimer->stop(); + qtimer->start(speed); + } +} + +void +MainWindow::newPoints(int n) +{ + scene.periodic_triangulation.clear(); + scene.points.clear(); + + CGAL::Random rnd(std::time(NULL)); + CGAL::Random_points_in_cube_3 in_cube(1,rnd); + + for (int i=0 ; isetRange(0,100); + speedSlider->setSliderPosition(100); + + emit (sceneChanged()); + +} + + +#include "MainWindow.moc" + diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.h b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.h new file mode 100644 index 00000000000..8748bade3bb --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.h @@ -0,0 +1,41 @@ +#ifndef MAIN_WINDOW_H +#define MAIN_WINDOW_H + +#include "ui_MainWindow.h" +#include +#include +#include +#include +class QWidget; + +class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow +{ + Q_OBJECT + + public: + MainWindow(QWidget* parent = 0); + + void connectActions(); + + Scene scene; + Timer timer; + QTimer * qtimer; + +public slots: + void newPoints(int i); + void newPointSet(); + void speedChanged(int i); + void togglePause(bool p); + void toggle8Copies(bool on); + void toggle2D(bool on); + void lloydStep(); + + signals: + void sceneChanged(); + void speedChanged(); +}; + + + + +#endif diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.ui b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.ui new file mode 100644 index 00000000000..617e2c72473 --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.ui @@ -0,0 +1,224 @@ + + MainWindow + + + + 0 + 0 + 635 + 504 + + + + CGAL 3D Periodic Lloyd + + + + :/cgal/logos/cgal_icon:/cgal/logos/cgal_icon + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Speed: + + + + + + + + 0 + 0 + + + + 0 + + + 100 + + + 1 + + + 100 + + + Qt::Horizontal + + + + + + + + + + + + + + 0 + 0 + 635 + 22 + + + + + File + + + + + + + + + + Control + + + + + + + + + + + + + + toolBar + + + TopToolBarArea + + + false + + + + + + + + + + + + Quit + + + + + false + + + Render Video + + + + + + icons/fileNew.pngicons/fileNew.png + + + New Point Set + + + Ctrl+N + + + + + true + + + true + + + + icons/pause.png + icons/play.pngicons/pause.png + + + Stop + + + P + + + + + true + + + + icons/cp8.pngicons/cp8.png + + + Show 8 Copies + + + C + + + + + true + + + + icons/planar.pngicons/planar.png + + + 2D version + + + 2 + + + + + + icons/step.pngicons/step.png + + + Step + + + Return, Enter + + + + + + Viewer + QWidget +
Viewer.h
+
+
+ + + + + +
diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp new file mode 100644 index 00000000000..e9d72ade7d0 --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.cpp @@ -0,0 +1,21 @@ +#include "MainWindow.h" +#include + +int main(int argc, char** argv) +{ + QApplication application(argc,argv); + + application.setOrganizationDomain("inria.fr"); + application.setOrganizationName("INRIA"); + application.setApplicationName("3D Periodic Lloyd"); + + // Import resources from libCGALQt4. + // See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE + Q_INIT_RESOURCE(File); + Q_INIT_RESOURCE(Periodic_Lloyd_3); + Q_INIT_RESOURCE(CGAL); + MainWindow mw; + mw.show(); + + return application.exec(); +} diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc new file mode 100644 index 00000000000..4f21b077a7c --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qrc @@ -0,0 +1,6 @@ + + + about_Periodic_Lloyd_3.html + about_CGAL.html + + diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Scene.h b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Scene.h new file mode 100644 index 00000000000..45991ad329f --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Scene.h @@ -0,0 +1,77 @@ +#ifndef SCENE_H +#define SCENE_H + +#include "typedefs.h" + +struct Scene { + + std::list points; + P3DT3 periodic_triangulation; + + bool eight_copies; + bool two_dimensional; + + void lloyd_step() { + Timer timer; + timer.reset(); + + std::vector vts; + for (Periodic_point_iterator ppit + = periodic_triangulation.periodic_points_begin(P3DT3::UNIQUE) ; + ppit != periodic_triangulation.periodic_points_end(P3DT3::UNIQUE) ; + ++ppit) + vts.push_back(ppit.get_vertex()); + + points.clear(); + for (std::vector::iterator vit = vts.begin(); + vit != vts.end(); ++vit) { + std::vector dual_vertices; + periodic_triangulation.dual(*vit,std::back_inserter(dual_vertices)); + Point_3 new_point = (two_dimensional ? + compute_barycenter_2D(dual_vertices) : + compute_barycenter(dual_vertices) ); + dual_vertices.clear(); + points.push_back(new_point); + } + periodic_triangulation.clear(); + periodic_triangulation.insert(points.begin(),points.end()); + } + + Point_3 compute_barycenter(std::vector dual_pts) const { + FT x(0), y(0), z(0); + int i; + for ( i=0 ; i= 1 ? x-2 : x)); + y = (y < -1 ? y+2 : (y >= 1 ? y-2 : y)); + z = (z < -1 ? z+2 : (z >= 1 ? z-2 : z)); + + return Point_3(x,y,z); + } + + Point_3 compute_barycenter_2D(std::vector dual_pts) const { + FT x(0), y(0); + int i; + for ( i=0 ; i= 1 ? x-2 : x)); + y = (y < -1 ? y+2 : (y >= 1 ? y-2 : y)); + + return Point_3(x,y,0); + } + +}; + +#endif //SCENE_H diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.cpp b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.cpp new file mode 100644 index 00000000000..7286e2cc820 --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.cpp @@ -0,0 +1,193 @@ +#include "Viewer.h" +#include +#include +#include + + +void +Viewer::init() +{ + setBackgroundColor(::Qt::white); + this->camera()->setSceneBoundingBox( + qglviewer::Vec(-1.,-1.,-1.), + qglviewer::Vec( 1., 1., 1.)); +} + + +void +Viewer::sceneChanged() +{ + this->showEntireScene(); +} + +void +Viewer::draw() +{ + + // define material + float ambient[] = { 0.25f, + 0.20725f, + 0.20725f, + 0.922f }; + float diffuse[] = { 1.0f, + 0.829f, + 0.829f, + 0.922f }; + + float specular[] = { 0.296648f, + 0.296648f, + 0.296648f, + 0.522f }; + + float emission[] = { 0.3f, + 0.3f, + 0.3f, + 1.0f }; + float shininess[] = { 11.264f }; + + // apply material + ::glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT, ambient); + ::glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse); + ::glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, specular); + ::glMaterialfv( GL_FRONT_AND_BACK, GL_SHININESS, shininess); + ::glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, emission); + + // anti-aliasing (if the OpenGL driver permits that) + ::glEnable(GL_LINE_SMOOTH); + + ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + // draw surface mesh + bool m_view_surface = true; + bool draw_triangles_edges = true; + + if(m_view_surface) + { + ::glEnable(GL_LIGHTING); + ::glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); + ::glColor3f(0.2f, 0.2f, 1.f); + ::glEnable(GL_POLYGON_OFFSET_FILL); + ::glPolygonOffset(3.0f,-3.0f); + gl_draw_surface(); + + if(draw_triangles_edges) + { + ::glDisable(GL_LIGHTING); + ::glLineWidth(1.); + ::glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); + ::glColor3ub(0,0,0); + ::glDisable(GL_POLYGON_OFFSET_FILL); + gl_draw_surface(); + } + } +} + +void +Viewer::gl_draw_surface() +{ + ::glColor3f(1.0f, 0.72f, 0.06f); + ::glDisable(GL_LIGHTING); + ::glEnable(GL_POINT_SMOOTH); + ::glPointSize(5); + ::glBegin(GL_POINTS); + for(Periodic_point_iterator ppit + = scene->periodic_triangulation.periodic_points_begin( + P3DT3::UNIQUE) ; + ppit != scene->periodic_triangulation.periodic_points_end(P3DT3::UNIQUE); + ++ppit){ + Point_3 p(scene->periodic_triangulation.point(*ppit)); + ::glVertex3d(p.x(), p.y(), p.z()); + } + ::glEnd(); + ::glDisable(GL_POINT_SMOOTH); + + ::glBegin(GL_LINES); + + ::glColor3f(0.27f, 0.51f, 0.7f); + + for (Periodic_triangle_iterator ptit + = scene->periodic_triangulation.periodic_triangles_begin( + P3DT3::UNIQUE); + ptit != scene->periodic_triangulation.periodic_triangles_end( + P3DT3::UNIQUE); + ++ptit) { + for (int i=0 ; i<4 ; i++) { + Segment_3 dual = scene->periodic_triangulation.segment( + scene->periodic_triangulation.dual(*(ptit.get_facet()))); + + FT sz = dual.source().z(); + FT tz = dual.target().z(); + + if (scene->two_dimensional && ((sz-tz > 0.5) || (sz-tz < -0.5))) continue; + + if (scene->two_dimensional) { sz = 0.; tz = 0.; } + FT sx = dual.source().x(); + FT tx = dual.target().x(); + FT sy = dual.source().y(); + FT ty = dual.target().y(); + + ::glVertex3d(sx,sy,sz); ::glVertex3d(tx,ty,tz); + if (scene->eight_copies) { + ::glColor3f(0.69f, 0.77f, 0.87f); + ::glVertex3d(sx+0.,sy+2.,sz+0.); + ::glVertex3d(tx+0.,ty+2.,tz+0.); + ::glVertex3d(sx+2.,sy+0.,sz+0.); + ::glVertex3d(tx+2.,ty+0.,tz+0.); + ::glVertex3d(sx+2.,sy+2.,sz+0.); + ::glVertex3d(tx+2.,ty+2.,tz+0.); + if (!scene->two_dimensional) { + ::glVertex3d(sx+0.,sy+0.,sz+2.); + ::glVertex3d(tx+0.,ty+0.,tz+2.); + ::glVertex3d(sx+0.,sy+2.,sz+2.); + ::glVertex3d(tx+0.,ty+2.,tz+2.); + ::glVertex3d(sx+2.,sy+0.,sz+2.); + ::glVertex3d(tx+2.,ty+0.,tz+2.); + ::glVertex3d(sx+2.,sy+2.,sz+2.); + ::glVertex3d(tx+2.,ty+2.,tz+2.); + } + ::glColor3f(0.27f, 0.51f, 0.7f); + + } + } + } + + ::glEnd(); + ::glEnable(GL_LIGHTING); +} + +Viewer::Vec +Viewer::next_around_circle(const float& phi, const Vec& pos, const Vec& ori) { + Vec cam = pos-ori; + Vec cam_norm = cam/cam.norm(); + + Vec y(cam_norm.z, 0, -cam_norm.x); + Vec y_norm = y/y.norm(); + + Vec new_cam = ori + (cam_norm*cos(phi) + y_norm*sin(phi)) * cam.norm(); + return new_cam; +} + +void +Viewer::render_video() +{ + setSnapshotFormat("PNG"); + for (int alpha=0 ; alpha <= 100 ; alpha++ ) { + emit (valueChanged(alpha)); + std::cout<position(); + Vec ori = sceneCenter(); + Vec new_cam = next_around_circle(0.01,cam,ori); + camera()->setPosition(new_cam); + camera()->lookAt(ori); + this->showEntireScene(); + saveSnapshot(true); + } + } +} + + +#include "Viewer.moc" diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h new file mode 100644 index 00000000000..523dc973520 --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Viewer.h @@ -0,0 +1,49 @@ +#ifndef VIEWER_H +#define VIEWER_H + +#include "Scene.h" +#include + + +class Viewer : public QGLViewer { + + typedef qglviewer::Vec Vec; + + Q_OBJECT + + CGAL::Timer timer; + Scene* scene; + + int nr_of_facets; +public: + Viewer(QWidget* parent) + : QGLViewer(parent) + {} + + void setScene(Scene* scene_) + { + scene = scene_; + } + + void init(); + void clear(); + +public: + void draw(); + + void gl_draw_surface(); + + +public slots : + + void sceneChanged(); + void render_video(); + +signals: + void valueChanged(int i); + +private: + Vec next_around_circle(const float& phi, const Vec& pos, const Vec& ori); +}; + +#endif diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_CGAL.html b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_CGAL.html new file mode 100644 index 00000000000..b8a610ce41e --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_CGAL.html @@ -0,0 +1,7 @@ + + +

Computational Geometry Algorithms Library

+

CGAL provides efficient and reliable geometric algorithms in the form of a C++ library.

+

For more information visit www.cgal.org.

+ + diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html new file mode 100644 index 00000000000..ea89d0a5451 --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/about_Periodic_Lloyd_3.html @@ -0,0 +1,8 @@ + + +

3D Periodic Lloyd

+

Copyright © 2009 INRIA

+

This application illustrates the Lloyd algorithm in 3D periodic space + using CGAL.

+ + diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/cp8.png b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/cp8.png new file mode 100644 index 00000000000..0cdd5abec69 Binary files /dev/null and b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/cp8.png differ diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/fileNew.png b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/fileNew.png new file mode 100644 index 00000000000..af5d1221412 Binary files /dev/null and b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/fileNew.png differ diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/pause.png b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/pause.png new file mode 100644 index 00000000000..80723a6f104 Binary files /dev/null and b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/pause.png differ diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/planar.png b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/planar.png new file mode 100644 index 00000000000..d169abc3cdf Binary files /dev/null and b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/planar.png differ diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/play.png b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/play.png new file mode 100644 index 00000000000..72f969ec89b Binary files /dev/null and b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/play.png differ diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/step.png b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/step.png new file mode 100644 index 00000000000..3d27ad2b9fe Binary files /dev/null and b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/icons/step.png differ diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/typedefs.h b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/typedefs.h new file mode 100644 index 00000000000..13afcad4abf --- /dev/null +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/typedefs.h @@ -0,0 +1,64 @@ +#ifndef TYPEDEFS_H +#define TYPEDEFS_H + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + + +typedef double coord_type; + +typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC; +typedef CGAL::Periodic_3_triangulation_traits_3 K; + +typedef K::FT FT; +typedef K::Point_3 Point_3; +typedef K::Vector_3 Vector_3; +typedef K::Segment_3 Segment_3; +typedef K::Ray_3 Ray_3; +typedef K::Line_3 Line; +typedef K::Triangle_3 Triangle_3; +typedef K::Iso_cuboid_3 Iso_cuboid_3; +typedef K::Tetrahedron_3 Tetrahedron_3; + +typedef CGAL::Creator_uniform_3 Creator; + +typedef CGAL::Periodic_3_Delaunay_triangulation_3 P3DT3; + +typedef P3DT3::Cell Cell; +typedef P3DT3::Vertex Vertex; +typedef P3DT3::Edge Edge; +typedef P3DT3::Facet Facet; +typedef P3DT3::Cell_handle Cell_handle; +typedef P3DT3::Vertex_handle Vertex_handle; + +typedef P3DT3::Cell_circulator Cell_circulator; + +typedef P3DT3::Locate_type Locate_type; + +typedef P3DT3::Cell_iterator Cell_iterator; +typedef P3DT3::Vertex_iterator Vertex_iterator; +typedef P3DT3::Edge_iterator Edge_iterator; +typedef P3DT3::Facet_iterator Facet_iterator; + +typedef P3DT3::Periodic_point_iterator Periodic_point_iterator; +typedef P3DT3::Periodic_triangle_iterator Periodic_triangle_iterator; + +typedef P3DT3::Periodic_tetrahedron_iterator Periodic_tetrahedron_iterator; + +typedef CGAL::Timer Timer; + +#endif