[vtk-developers] Proposed CenterOfMass function for vtkPoints

David Doria daviddoria+vtk at gmail.com
Thu Apr 1 11:46:32 EDT 2010


On Thu, Apr 1, 2010 at 11:42 AM, Will Schroeder
<will.schroeder at kitware.com> wrote:
> My concern with the term centroid is to differentiate the centroid of
> the points from the centroid of the dataset, which can be different.
> Since the user generally asks a dataset for its points, it would be
> easy to make the mistake of assuming that the centroid of a dataset
> matches the centroid of the points. Maybe this is just a documentation
> issue, but it needs to be clear.

I agree that it should be made clear in documentation, but again since
this is called on the vtkPoints of a dataset, it shouldn't introduce
much confusion.

polydata->GetPoints()->GetCentroid() should be clear that it is the
centroid of the points.

If it was just polydata->GetCentroid(), then it would be ambiguous.

David



More information about the vtk-developers mailing list