clean dir

This commit is contained in:
Marc Pouget 2006-06-14 19:15:56 +00:00
parent a17677d9fb
commit 3e6f4b6e7f
5 changed files with 4 additions and 151 deletions

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -1,87 +0,0 @@
#include <CGAL/Cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/IO/Polyhedron_geomview_ostream.h>
#include <iostream>
#include <fstream>
typedef CGAL::Cartesian<double> Kernel;
typedef Kernel::Point_3 Point;
typedef CGAL::Polyhedron_3<Kernel> 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);
}

View File

@ -1,4 +1,4 @@
//visu, lib
//visu, lib introspect
#include <qapplication.h>
#include <qmainwindow.h>
#include "Observer.h"
@ -6,18 +6,14 @@
//visu, local
#include "SketchSample.h"
//geom, local
#include "visu_poly.h"
//marc
#include "enriched_polyhedron.h"
#include <iostream>
#include <fstream>
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);
// }
// }