mirror of
https://gitlab.ethz.ch/gfattori/glocalize.git
synced 2026-05-03 21:54:23 +02:00
refactoring
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <vtkImageData.h>
|
||||
#include <vtkMarchingCubes.h>
|
||||
#include <vtkNew.h>
|
||||
#include <vtkPointData.h>
|
||||
#include <vtkPointDataToCellData.h>
|
||||
#include <vtkPoints.h>
|
||||
#include <vtkPolyData.h>
|
||||
#include <vtkPolyDataConnectivityFilter.h>
|
||||
@@ -30,7 +32,7 @@ struct Surf
|
||||
Point3d centroid;
|
||||
};
|
||||
|
||||
static Point3d centroidFromPoints(const vtkPoints* pts)
|
||||
static Point3d centroidFromPoints(vtkPoints* pts)
|
||||
{
|
||||
Point3d c;
|
||||
if (!pts) return c;
|
||||
@@ -41,6 +43,7 @@ static Point3d centroidFromPoints(const vtkPoints* pts)
|
||||
double p[3];
|
||||
for (vtkIdType i = 0; i < n; ++i)
|
||||
{
|
||||
// vtkPoints::GetPoint is non-const in VTK 9.x, so keep pts non-const here.
|
||||
pts->GetPoint(i, p);
|
||||
sx += p[0];
|
||||
sy += p[1];
|
||||
|
||||
Reference in New Issue
Block a user