Hello,

I am trying to make a C++ reader for a point set file containing time steps.
The output of the reader is a vtkPolyData.

The file format is similar to:
x1,y1,z1,prop1,prop2,...,time

I would like to import the field "time" as time steps, in order to animate
using "snap to time steps" mode.

The code looks like:

    vtkPolyData *output =
vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));

    Loop:
            time = readTime();
            coords = readCoords();

            vtkIdType id = outPoints->InsertNextPoint(coords[0], coords[1],
coords[2]);
            outCells->InsertNextCell(1);
            outCells->InsertCellPoint(id);

    output->SetPoints(outPoints);
    output->SetVerts(outCells);

Assuming time is an integer, how do I insert the time steps into the output
?

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.

Thank you,

Nehme
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to