own implementation of centerOfMass for vtkPolydata