vtkPoints and other similar objects, when should I use
Allocate and when should I use
They pretty much do the same stuff.
SetNumberOfTuples who calls
SetNumberOfPoints is easier to read so I would stick with that.
Allocate just allocate the memory but leave the number of points to 0. So after that, you can use the
SetNumberOfPoints allocate and set the number of points, so after, you need to call
SetPoint(index, x, y, z).
What’s the unit of
I would assume it is the number of values in the given vtkDataArray.
So for points you will do
points->Allocate(nbPoints * 3).