Hello,<br><br>I am trying to make a C++ reader for a point set file containing time steps.<br>The output of the reader is a vtkPolyData.<br><br>The file format is similar to: <br>x1,y1,z1,prop1,prop2,...,time<br><br>I would like to import the field "time" as time steps, in order to animate using "snap to time steps" mode. <br>
<br>The code looks like:<br><br> vtkPolyData *output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));<br><br> Loop:<br> time = readTime();<br> coords = readCoords();<br>
<br> vtkIdType id = outPoints->InsertNextPoint(coords[0], coords[1], coords[2]);<br> outCells->InsertNextCell(1);<br> outCells->InsertCellPoint(id); <br> <br>
output->SetPoints(outPoints);<br> output->SetVerts(outCells);<br>
<br>Assuming time is an integer, how do I insert the time steps into the output ?<br><br>I tried to import the time as an "int property" instead of time steps and animate using threshold, but I can't display one time step at a time because only one slider is animated. I tried a threshold on a threshold to animate 2 sliders but couldn't get the exact effect that "snap to time steps" would give if I had time steps. <br>
<br>Thank you,<br><br>Nehme <br>