~ubuntu-branches/debian/stretch/cgal/stretch

« back to all changes in this revision

Viewing changes to demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp

  • Committer: Package Import Robot
  • Author(s): Joachim Reichel
  • Date: 2014-04-05 10:56:43 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140405105643-jgnrpu2thtx23zfs
Tags: 4.4-1
* New upstream release.
* Remove patches do-not-link-example-with-qt4-support-library.patch and
  fix_jet_fitting_3.patch (applied upstream).

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  Vertex operator  () (Vertex & v) const
38
38
  {
39
39
    Dart_handle d = v.dart ();
40
 
    CGAL_assertion (d != NULL);
41
40
 
42
41
    // Old points aren't concerned.
43
42
    if (mlcc.is_marked(d, old))
54
53
         it != mlcc.one_dart_per_incident_cell<1,0>(d).end(); ++it)
55
54
    {
56
55
      // If the vertex is on a border.
57
 
      if (it->is_free (2))
 
56
      if (mlcc.is_free(it,2))
58
57
      { 
59
58
        return v;
60
59
      }
61
60
      // If we found barycenter of a facet.
62
 
      if (!mlcc.is_marked(it->opposite(), old))
 
61
      if (!mlcc.is_marked(mlcc.opposite(it), old))
63
62
      {       
64
 
        facetsPoints.push_back(LCC::point(it->opposite()));   
 
63
        facetsPoints.push_back(mlcc.point(mlcc.opposite(it)));
65
64
      }
66
65
    }
67
66
 
119
118
  Vertex operator  () (Vertex & v) const
120
119
  {
121
120
    Dart_handle d = v.dart ();
122
 
    CGAL_assertion (d != NULL);
123
121
 
124
122
    // Just old points are concerned.
125
123
    if (!mlcc.is_marked(d, old))
140
138
        it != mlcc.one_dart_per_incident_cell<1,0>(d).end(); ++it)
141
139
    {
142
140
      // If the vertex is on a border
143
 
      if (it->is_free (2))
 
141
      if (mlcc.is_free(it,2))
144
142
      { 
145
143
        return v;
146
144
      }
147
145
      // If incident isn't an old point, it's an edge point.
148
 
      if (!mlcc.is_marked(it->opposite(), old))
 
146
      if (!mlcc.is_marked(mlcc.opposite(it), old))
149
147
      {       
150
 
        edgesPoints.push_back (LCC::point(it->opposite()));  
 
148
        edgesPoints.push_back (mlcc.point(mlcc.opposite(it)));
151
149
      }
152
150
      // We go find the "facet point" of incidents facet (barycenter of a facet).
153
 
      facetsPoints.push_back (LCC::point(it->opposite()->beta_inv(1)));
 
151
      facetsPoints.push_back (mlcc.point(mlcc.beta(mlcc.opposite(it), 0)));
154
152
      ++degree;
155
153
    }
156
154
 
270
268
      {
271
269
        // If the edge join the center and a corner.
272
270
        // We remove the edge.
273
 
        if( m.is_marked(it2->beta(1), old) )
 
271
        if( m.is_marked(m.beta(it2,1), old) )
274
272
        {
275
273
          remove.push_back(it2);
276
274
        }
304
302
  for (std::vector < Vertex >::iterator vit = old_vertices.begin ();
305
303
      vit != old_vertices.end (); ++vit)
306
304
  {
307
 
    LCC::point(vit->dart())=vit->point();
 
305
    m.point(vit->dart())=vit->point();
308
306
  }
309
307
 
310
308
  // 4) Smooth new edges points.          
319
317
  for (std::vector < Vertex >::iterator vit = vertices.begin ();
320
318
      vit != vertices.end (); ++vit)
321
319
  {
322
 
    LCC::point(vit->dart())=vit->point();
 
320
    m.point(vit->dart())=vit->point();
323
321
  }
324
322
 
325
323
  m.unmark_all (old);