[vtkusers] Enumerating of VTK class output
Sylvain Jaume
sylvain.jaume at kitware.com
Thu Nov 3 11:36:36 EST 2005
Hi Alex,
Try this:
int i, npts, *pts;
data->GetPolys()->InitTraversal();
while ( data->GetPolys()->GetNextCell(npts,pts) )
{
cout << "this cell has points";
for (i=0; i<npts; i++)
{
cout << " " << pts[i];
}
cout << "\n";
}
Best,
Sylvain
Alex Farber wrote:
> I want to enumerate VTK class output for some purposes (for example,
> to render this output using my own OpenGL code), instead of using VTK
> rendering classes. For example:
>
> vtkConeSource *cone = vtkConeSource::New();
> cone->SetHeight( 3.0 );
> cone->SetRadius( 1.0 );
> cone->SetResolution( 10 );
>
> vtkPolyData* data = cone->GetOutput();
>
> How can I enumerate through data cells and extract information from them?
>
> Thanks.
>
> ------------------------------------------------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
> <http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list