mirror of https://github.com/CGAL/cgal
Fix Doo Sabin subdivision for Gmpq-based kernels
This commit is contained in:
parent
47132b441b
commit
45696cd539
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue