From 28b75a4649ac5e846ab3ffb24788b20c286e5d2e Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 11 May 2007 10:32:52 +0000 Subject: [PATCH] Version 4.07. --- apps/metro/history.txt | 7 ++++++- apps/metro/metro.cpp | 7 +++++-- apps/metro/readme.txt | 3 ++- apps/metro/sampling.h | 23 +++++++++++------------ 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/apps/metro/history.txt b/apps/metro/history.txt index 5aff6afa..8b34dd6b 100644 --- a/apps/metro/history.txt +++ b/apps/metro/history.txt @@ -6,9 +6,14 @@ Visual Computing Lab http://vcg.isti.cnr.it /\/| ISTI - Italian National Research Council | \ - Metro 4.06 2005/10/03 + Metro 4.07 2007/05/11 All rights reserved. +2007/05/11 Release 4.07 +Added support for obj files. +Now the Distance comparison can be done exploiting also a (slow) octree. +Removed bug on the display of the area of the mesh. + 2005/10/03 Release 4.06 Changed the core for distance computation. Current version uses the lib flexible search structures. diff --git a/apps/metro/metro.cpp b/apps/metro/metro.cpp index 3a43a29e..03190f59 100644 --- a/apps/metro/metro.cpp +++ b/apps/metro/metro.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.23 2007/05/04 16:50:23 ganovelli +added plus types version (#ifdef _PLUS_TYPES_ to use it ). + Revision 1.22 2006/10/25 12:40:19 fiorin Added possibility to use Octree as search structure: @@ -167,7 +170,7 @@ void OpenMesh(const char *filename, CMesh &m) int err = tri::io::Importer::Open(m,filename); if(err) { printf("Error in reading %s: '%s'\n",filename,tri::io::Importer::ErrorMsg(err)); - exit(-1); + if(tri::io::Importer::ErrorCritical(err)) exit(-1); } printf("read mesh `%s'\n", filename); if(CleaningFlag){ @@ -189,7 +192,7 @@ int main(int argc, char**argv) // print program info printf("-------------------------------\n" - " Metro V.4.06 \n" + " Metro V.4.07 \n" " http://vcg.isti.cnr.it\n" " release date: "__DATE__"\n" "-------------------------------\n\n"); diff --git a/apps/metro/readme.txt b/apps/metro/readme.txt index 02bfc2bf..7fd9e060 100644 --- a/apps/metro/readme.txt +++ b/apps/metro/readme.txt @@ -6,7 +6,7 @@ Visual Computing Lab http://vcg.isti.cnr.it /\/| ISTI - Italian National Research Council | \ - Metro 4.06 2005/10/03 + Metro 4.07 2007/05/11 All rights reserved. @@ -83,6 +83,7 @@ where "file1" and "file2" are the input meshes in PLY, OFF or STL format, and op -G Use a static Uniform Grid as Search Structure (default) -A Use an Axis Aligned Bounding Box Tree as Search Structure -H Use an Hashed Uniform Grid as Search Structure + -O Use an Octree as Search Structure The -C option is useful in combination with -c option for creating a set of diff --git a/apps/metro/sampling.h b/apps/metro/sampling.h index a99491ea..4c596624 100644 --- a/apps/metro/sampling.h +++ b/apps/metro/sampling.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.24 2007/05/04 16:50:23 ganovelli +added plus types version (#ifdef _PLUS_TYPES_ to use it ). + Revision 1.23 2006/10/25 12:40:19 fiorin Added possibility to use Octree as search structure: @@ -624,14 +627,10 @@ void Sampling::Hausdorff() typedef typename std::vector::iterator FaceVecIterator; // set grid meshes. - if(Flags & SamplingFlags::USE_HASH_GRID) - hS2.Set(S2.face.begin(),S2.face.end()); - if(Flags & SamplingFlags::USE_AABB_TREE) - tS2.Set(S2.face.begin(),S2.face.end()); - if(Flags & SamplingFlags::USE_STATIC_GRID) - gS2.Set(S2.face.begin(),S2.face.end()); - if (Flags & SamplingFlags::USE_OCTREE) - oS2.Set(S2.face.begin(),S2.face.end()); + if(Flags & SamplingFlags::USE_HASH_GRID) hS2.Set(S2.face.begin(),S2.face.end()); + if(Flags & SamplingFlags::USE_AABB_TREE) tS2.Set(S2.face.begin(),S2.face.end()); + if(Flags & SamplingFlags::USE_STATIC_GRID) gS2.Set(S2.face.begin(),S2.face.end()); + if(Flags & SamplingFlags::USE_OCTREE) oS2.Set(S2.face.begin(),S2.face.end()); // set bounding box bbox = S2.bbox; @@ -647,10 +646,10 @@ void Sampling::Hausdorff() // Vertex sampling. if(Flags & SamplingFlags::VERTEX_SAMPLING) VertexSampling(); - // Edge sammpling. - n_samples_target -= (int) n_total_samples; - if(n_samples_target > 0) - { + // Edge sampling. + if(n_samples_target > n_total_samples) + { + n_samples_target -= (int) n_total_samples; n_samples_per_area_unit = n_samples_target / area_S1; if(Flags & SamplingFlags::EDGE_SAMPLING) {