~ubuntu-branches/ubuntu/lucid/meshlab/lucid

« back to all changes in this revision

Viewing changes to vcglib/vcg/complex/trimesh/stat.h

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-10-08 16:40:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091008164041-0c2ealqv8b8uc20c
Tags: 1.2.2-1
* New upstream version
* Do not build filter_isoparametrization because liblevmar dependency
  is not (yet) in Debian
* Fix compilation with gcc-4.4, thanks to Jonathan Liu for the patch
  (closes: #539544)
* rules: Add compiler variables to the qmake call (for testing with new
  GCC versions)
* io_3ds.pro: Make LIBS and INCLUDEPATH point to Debian version of lib3ds
* io_epoch.pro: Make LIBS point to Debian version of libbz2
* control:
  - Move Homepage URL to the source package section
  - Update to standards-version 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
                        }
109
109
                        
110
110
                        
111
 
      static void ComputePerVertexQualityHistogram( MeshType & m, Histogramf &h)    // V1.0
 
111
      static void ComputePerVertexQualityHistogram( MeshType & m, Histogramf &h, bool selectionOnly = false)    // V1.0
112
112
      {
113
113
                                VertexIterator vi;
114
114
                                int HistSize=10000;
117
117
                                h.Clear();
118
118
                                h.SetRange( minmax.first,minmax.second, HistSize);
119
119
                                for(vi = m.vert.begin(); vi != m.vert.end(); ++vi)
120
 
                                                if(!(*vi).IsD())
 
120
                                                if(!(*vi).IsD() &&  ((!selectionOnly) || (*vi).IsS()) )
121
121
                                                        {
122
 
                                                                assert(!math::IsNAN((*vi).Q()));
 
122
                                                                assert(!math::IsNAN((*vi).Q()) && "You should never try to compute Histogram with Invalid Floating points numbers (NaN)");
123
123
                                                                h.Add((*vi).Q());
124
124
                                                        }                                               
125
125
                                // Sanity check; If some very wrong value has happened in the Q value, 
143
143
                                                h.Clear();
144
144
                                                h.SetRange(newmin, newmax, HistSize*50);
145
145
                                                for(vi = m.vert.begin(); vi != m.vert.end(); ++vi)
146
 
                                                                if(!(*vi).IsD()) h.Add((*vi).Q());
 
146
                                                                if(!(*vi).IsD() && ((!selectionOnly) || (*vi).IsS()) )
 
147
                                                                    h.Add((*vi).Q());
147
148
                                        }
148
149
      }
149
150