Hello,
I am trying to render some isolated lines in vtk js. I have a collection of point pairs, each of which I would like to connect with lines.
The only example I have seen is something like the following;
const pointPolydata = vtkPolyData.newInstance();
pointPolydata.getPoints().setData(Float32Array.from(points), 3);
const lines = new Uint32Array(points.length + 1);
for (let i = 0; i < points.length; i++) {
lines[i] = i;
}
pointPolydata.getLines().setData(lines);
However what I end up with is one line connecting all of the points, which is not what I want.
I could repeat the above for each of the point pairs, but I believe that would require adding multiple actors to the scene, which feels like overkill?
Any help would be much appreciated
Thanks