[vtkusers] Enumerating of VTK class output
Alex Farber
alexf2062 at yahoo.com
Fri Nov 4 07:45:13 EST 2005
Thank you, I will try this.
Sylvain Jaume <sylvain.jaume at kitware.com> wrote: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 {
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.
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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
>
>
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051104/6e124999/attachment.htm>
More information about the vtkusers
mailing list