mirror of https://github.com/CGAL/cgal
Make the point computation more CGAL like
This commit is contained in:
parent
204495706b
commit
5b35530823
|
|
@ -87,13 +87,12 @@ public:
|
|||
void facet_node(Facet_handle facet, Point& pt) {
|
||||
Halfedge_around_facet_circulator hcir = facet->facet_begin();
|
||||
int n = 0;
|
||||
FT p[] = {0,0,0};
|
||||
Point p(0,0,0);
|
||||
do {
|
||||
Point t = hcir->vertex()->point();
|
||||
p[0] += t[0], p[1] += t[1], p[2] += t[2];
|
||||
p = p + (hcir->vertex()->point() - ORIGIN);
|
||||
++n;
|
||||
} while (++hcir != facet->facet_begin());
|
||||
pt = Point(p[0]/n, p[1]/n, p[2]/n);
|
||||
pt = ORIGIN + (p - ORIGIN)/FT(n);
|
||||
}
|
||||
//
|
||||
void edge_node(Halfedge_handle edge, Point& pt) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue