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

« back to all changes in this revision

Viewing changes to vcglib/vcg/complex/trimesh/update/normal.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:
102
102
 
103
103
#include <vcg/space/triangle3.h>
104
104
#include <vcg/math/matrix33.h>
 
105
#include <vcg/simplex/face/component.h>
105
106
 
106
107
namespace vcg {
107
108
namespace tri {
388
389
      if( !(*f).IsD() ) face::ComputeNormalizedNormal(*f);
389
390
}
390
391
 
 
392
static void PerBitQuadFaceNormalized(ComputeMeshType &m)
 
393
{
 
394
        if( !m.HasPerFaceNormal()) return;
 
395
        PerFace(m);
 
396
 
 
397
        FaceIterator f;
 
398
        for(f=m.face.begin();f!=m.face.end();++f) {
 
399
      if( !(*f).IsD() ) {
 
400
        for (int k=0; k<3; k++) if (f->IsF(k)) 
 
401
        if (&*f < f->FFp(k)) {
 
402
          f->N() = f->FFp(k)->N() = (f->FFp(k)->N() + f->N()).Normalize();
 
403
        }
 
404
      }
 
405
  }
 
406
}
 
407
 
391
408
 
392
409
/// \brief Calculates the vertex normal.
393
410
static void PerVertexNormalized(ComputeMeshType &m)