CatmullClark now works with borders too

This commit is contained in:
Andreas Fabri 2017-01-02 17:08:12 +01:00 committed by Mael Rouxel-Labbé
parent 0d76fac839
commit dfc877cd2a
3 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,6 @@ if ( CGAL_FOUND )
include( CGAL_CreateSingleSourceCGALProgram ) include( CGAL_CreateSingleSourceCGALProgram )
include_directories (BEFORE "../../include")
# create a target per cppfile # create a target per cppfile
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

View File

@ -1,10 +1,12 @@
#include <CGAL/Simple_cartesian.h> #include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h> #include <CGAL/Surface_mesh.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Subdivision_method_3.h> #include <CGAL/Subdivision_method_3.h>
#include <iostream> #include <iostream>
typedef CGAL::Simple_cartesian<double> Kernel; typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Surface_mesh<Kernel::Point_3> Polyhedron; typedef CGAL::Surface_mesh<Kernel::Point_3> Polyhedron;
//typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
using namespace std; using namespace std;
using namespace CGAL; using namespace CGAL;

View File

@ -184,7 +184,7 @@ public:
Point& ep2 = get(this->vpmap,target(opposite(edge, this->polyhedron), this->polyhedron)); Point& ep2 = get(this->vpmap,target(opposite(edge, this->polyhedron), this->polyhedron));
ept = Point((ep1[0]+ep2[0])/2, (ep1[1]+ep2[1])/2, (ep1[2]+ep2[2])/2); ept = Point((ep1[0]+ep2[0])/2, (ep1[1]+ep2[1])/2, (ep1[2]+ep2[2])/2);
Halfedge_around_target_circulator<Poly> vcir(target(edge, this->polyhedron), this->polyhedron); Halfedge_around_target_circulator<Poly> vcir(edge, this->polyhedron);
Point& vp1 = get(this->vpmap,target(opposite(*vcir, this->polyhedron ), this->polyhedron)); Point& vp1 = get(this->vpmap,target(opposite(*vcir, this->polyhedron ), this->polyhedron));
Point& vp0 = get(this->vpmap, target(*vcir, this->polyhedron)); Point& vp0 = get(this->vpmap, target(*vcir, this->polyhedron));
--vcir; --vcir;