[vtkusers] Retrieving vertex/normals from vtkPolyData

Bernard blerat at hotmail.com
Sat Dec 24 08:52:19 EST 2005


Please, I really need help to solve this problem: how could I get vertices and normals contained in a vtkPolyData object ?

Here are the operations:
  // Read my own file format from HDD
  Amp3dFileReader* cowReader=Amp3dFileReader::New();
  cowReader->SetFileName(m_path);

  vtkTriangleFilter* triangleFilter=vtkTriangleFilter::New();
  triangleFilter->SetInput( cowReader->GetOutput() );

  // Create normals
  vtkPolyDataNormals* cowNormals=vtkPolyDataNormals::New();
  cowNormals->SetInput( triangleFilter->GetOutput() );

  // Accumulate clippers
  vtkClipPolyData* clipper0=createClipper(cowNormals->GetOutput(),m_planes[0]);
  vtkClipPolyData* clipper1=createClipper(clipper0->GetOutput(),m_planes[1]);
  vtkClipPolyData* clipper2=createClipper(clipper1->GetOutput(),m_planes[2]);
  vtkClipPolyData* clipper3=createClipper(clipper2->GetOutput(),m_planes[3]);
  vtkClipPolyData* clipper4=createClipper(clipper3->GetOutput(),m_planes[4]);

Now I have to put the result of clipper4 into my own renderer, but how ? Its christmas... please... you'll get free registration for my games... please... 

Best regards,
Bernard.
http://www.in-poculis.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051224/fd319741/attachment.htm>


More information about the vtkusers mailing list