Fix Doo Sabin subdivision for Gmpq-based kernels

This commit is contained in:
Dimitris Papavasiliou 2021-10-30 13:35:17 +03:00
parent 47132b441b
commit 45696cd539
1 changed files with 2 additions and 2 deletions

View File

@ -477,7 +477,7 @@ public:
/// computes the Doo-Sabin point `pt` of the vertex pointed by the halfedge `he`. /// computes the Doo-Sabin point `pt` of the vertex pointed by the halfedge `he`.
void corner_node(halfedge_descriptor he, Point& pt) { void corner_node(halfedge_descriptor he, Point& pt) {
size_t n = 0; int n = 0;
halfedge_descriptor hd = he; halfedge_descriptor hd = he;
do{ do{
hd = next(hd, *(this->pmesh)); hd = next(hd, *(this->pmesh));
@ -493,7 +493,7 @@ public:
cv = cv/16; cv = cv/16;
} else { } else {
FT a; FT a;
for (size_t k = 0; k < n; ++k, he = next(he, *(this->pmesh))) { for (int k = 0; k < n; ++k, he = next(he, *(this->pmesh))) {
if (k == 0) a = (FT) ((5.0/n) + 1); if (k == 0) a = (FT) ((5.0/n) + 1);
else a = (FT) (3+2*std::cos(2*k*CGAL_PI/n))/n; else a = (FT) (3+2*std::cos(2*k*CGAL_PI/n))/n;
cv = cv + (get(this->vpm, target(he, *(this->pmesh)))-CGAL::ORIGIN)*a; cv = cv + (get(this->vpm, target(he, *(this->pmesh)))-CGAL::ORIGIN)*a;