vtkCylinderSource and Gouraud Shading
Patric Weis
Patric.Weis at Mycrona.de
Tue Dec 14 08:23:41 EST 1999
Hi vtkUsers!
I would like to render a smoothly shaded cylinder and tried the
following:
...
vtkCylinderSource *pCylinder = vtkCylinderSource::New();
pCylinder->SetRadius(1.0);
pCylinder->SetResolution(10);
vtkPolyDataNormals *pNormals = vtkPolyDataNormals::New();
pNormals->SetInput(pCylinder->GetOutput());
vtkPolyDataMapper *pMapper = vtkPolyDataMapper::New();
pMapper->SetInput(pNormals->GetOutput());
vtkActor *pActor = vtkActor::New();
pActor->SetMapper(pMapper);
pActor->GetProperty()->SetInterpolationToGouraud();
...
What I get is a flat shaded cylinder. With polydata readers I do not
have such problems.
What do I do wrong? Maybe I do not exactly understand the concept of vtk
sources.
Thanks,
Patric Weis
MYCRONA
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list