From 3e6f4b6e7f3e6cda5b3189b72c700b46466cf185 Mon Sep 17 00:00:00 2001 From: Marc Pouget Date: Wed, 14 Jun 2006 19:15:56 +0000 Subject: [PATCH] clean dir --- Jet_fitting_3/demo/Jet_fitting_3/README | 11 --- Jet_fitting_3/demo/Jet_fitting_3/README_visu | 9 -- .../demo/Jet_fitting_3/SketchSample.C | 2 - Jet_fitting_3/demo/Jet_fitting_3/test_visu.C | 87 ------------------- Jet_fitting_3/demo/Jet_fitting_3/visu.C | 46 +--------- 5 files changed, 4 insertions(+), 151 deletions(-) delete mode 100644 Jet_fitting_3/demo/Jet_fitting_3/README delete mode 100644 Jet_fitting_3/demo/Jet_fitting_3/test_visu.C diff --git a/Jet_fitting_3/demo/Jet_fitting_3/README b/Jet_fitting_3/demo/Jet_fitting_3/README deleted file mode 100644 index d0e48560955..00000000000 --- a/Jet_fitting_3/demo/Jet_fitting_3/README +++ /dev/null @@ -1,11 +0,0 @@ -Program introspect-qt.exe ----------------- - -takes as input -1. a file.off, -2. the corresponding file file.off.4ogl.txt computed with the example program - blind.exe from file.off - -it displays an OpenGL view of both the mesh and the estimated principal directions and normals at each vertex. - -./introspect-qt.exe ../../examples/Jet_fitting_3/data/poly2x\^2+y\^2-0.062500-off ../../examples/Jet_fitting_3/data_poly2x\^2+y\^2-0.062500-off.4ogl.txt \ No newline at end of file diff --git a/Jet_fitting_3/demo/Jet_fitting_3/README_visu b/Jet_fitting_3/demo/Jet_fitting_3/README_visu index c6ca6d990a0..7758606240d 100644 --- a/Jet_fitting_3/demo/Jet_fitting_3/README_visu +++ b/Jet_fitting_3/demo/Jet_fitting_3/README_visu @@ -26,12 +26,3 @@ libIntrospect.a, which can then be used from anywhere *set INTROSPEC_DIR variable in the makefile, and use it for the includes and the final link with -lIntrospect - -*implement the SketchSample.cpp file, which tells how to draw the -geometry - -*the main is in visu-test.cpp, which loads the geometry, and launches -the window - --> example: see visu-test.cpp in Jet_fitting_3 - diff --git a/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C b/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C index cbe4d87c8f2..1e9f6c8cc66 100644 --- a/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C +++ b/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C @@ -17,8 +17,6 @@ SketchSample::~SketchSample() { void SketchSample::buildDisplayList(GLuint surf) { - static GLfloat agray[4] = {1,1,1, 1.0 }; - glNewList(surf, GL_COMPILE); glDisable(GL_LIGHTING); diff --git a/Jet_fitting_3/demo/Jet_fitting_3/test_visu.C b/Jet_fitting_3/demo/Jet_fitting_3/test_visu.C deleted file mode 100644 index 193ac5c9b4e..00000000000 --- a/Jet_fitting_3/demo/Jet_fitting_3/test_visu.C +++ /dev/null @@ -1,87 +0,0 @@ - -#include -#include -#include -#include - -#include -#include - - -typedef CGAL::Cartesian Kernel; -typedef Kernel::Point_3 Point; -typedef CGAL::Polyhedron_3 Mesh; - - -typedef Kernel::FT FT; -typedef Kernel::Point_3 Point; -typedef Kernel::Vector_3 Vector; - -typedef Mesh::Vertex_handle Vertex_handle; -typedef Mesh::Facet_handle Facet_handle; -typedef Mesh::Vertex Vertex; -typedef Mesh::Facet Facet; -typedef Mesh::Face_handle Face_handle; -typedef Mesh::Halfedge_handle Halfedge_handle; -typedef Mesh::Facet_iterator Facet_iterator; -typedef Mesh::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator; -typedef Mesh::Halfedge_iterator Halfedge_iterator; -typedef Mesh::Point_iterator Point_iterator; -typedef Mesh::Halfedge_around_facet_circulator Halfedge_around_facet_circulator; -typedef Mesh::Vertex_iterator Vertex_iterator; -typedef Mesh::Vertex_const_iterator Vertex_const_iterator; - -typedef Mesh::Edge_iterator Edge_iterator ; -typedef Mesh::Halfedge_around_facet_const_circulator Halfedge_around_facet_const_circulator; - -typedef CGAL::Inverse_index < Vertex_const_iterator > Vertex_index; - - -void parse_facet(Facet_handle f, const Vertex_index& vi) -{ - int idx, n=0; - - Halfedge_around_facet_const_circulator hc = f->facet_begin(); - Halfedge_around_facet_const_circulator hc_end = hc; - - //std::cerr << "here\n"; - do - { - idx = vi[Vertex_const_iterator(hc->vertex())]; - ++hc; n++; - } - while (hc != hc_end); - //std::cerr << n << '\n'; -} - - -void parse_triangles(Mesh& m){ - Facet_handle f; - - Vertex_index vi(m.vertices_begin(), m.vertices_end()); - - Facet_iterator fib = m.facets_begin(), fie = m.facets_end(); - for (; fib != fie; ++fib){ - f = fib; - parse_facet(f, vi); - } -} - -int main(int argc, char* argv[]) -{ - assert(argc==2); - const char* file_off = argv[1]; - //const char* file_res=argv[2]; - - Mesh m; - - - // initialisation du maillage - std::ifstream f(file_off, std::ifstream::in); - if(!f){ - exit(0); - } - f >> m; - parse_triangles(m); -} - diff --git a/Jet_fitting_3/demo/Jet_fitting_3/visu.C b/Jet_fitting_3/demo/Jet_fitting_3/visu.C index ba2662c0818..1feccac710f 100644 --- a/Jet_fitting_3/demo/Jet_fitting_3/visu.C +++ b/Jet_fitting_3/demo/Jet_fitting_3/visu.C @@ -1,4 +1,4 @@ -//visu, lib +//visu, lib introspect #include #include #include "Observer.h" @@ -6,18 +6,14 @@ //visu, local #include "SketchSample.h" - - //geom, local #include "visu_poly.h" -//marc #include "enriched_polyhedron.h" #include #include Mesh m_mesh; - DS ppal_data; void clean_DS(DS& L) @@ -49,7 +45,7 @@ read_line(FILE* file, Point& P1,Point& P2, fscanf(file, "%lf%lf",&k1,&k2); } -void load_data_from_file(DS& l, char* file_res) +void load_data_from_file(DS& l, const char* file_res) { FILE *file; if((file = fopen(file_res, "r")) != NULL) @@ -90,15 +86,13 @@ void load_geom(int argc, char* argv[]) } - - - - +/////////////////////MAIN//////////////////////// int main(int argc, char** argv) { load_geom(argc, argv); QApplication app(argc, argv); + glutInit(&argc, argv); if ( !QGLFormat::hasOpenGL() ) { qWarning( "This system has no OpenGL support. Exiting." ); @@ -119,35 +113,3 @@ int main(int argc, char** argv) { return app.exec(); } - - - -// void parse_facet(Facet_handle f, const Vertex_index& vi) -// { -// int idx, n=0; - -// Halfedge_around_facet_const_circulator hc = f->facet_begin(); -// Halfedge_around_facet_const_circulator hc_end = hc; - -// //std::cerr << "here\n"; -// do -// { -// idx = vi[Vertex_const_iterator(hc->vertex())]; -// ++hc; n++; -// } -// while (hc != hc_end); -// //std::cerr << n << '\n'; -// } - - -// void parse_triangles(Mesh& m){ -// Facet_handle f; - -// Vertex_index vi(m.vertices_begin(), m.vertices_end()); - -// Facet_iterator fib = m.facets_begin(), fie = m.facets_end(); -// for (; fib != fie; ++fib){ -// f = fib; -// parse_facet(f, vi); -// } -// }