[vtkusers] Polygon colouring

Gib Bogle g.bogle at auckland.ac.nz
Sat Oct 18 22:18:40 EDT 2014


I'm rendering a shape using vtkPolyData, i.e. as a collection of polygons.  Is there a way to colour each polygon separately?

polygonPolyData = vtkSmartPointer<vtkPolyData>::New();
polygonPolyData->SetPoints(points);
polygonPolyData->SetPolys(polygons);
hexmapper = vtkSmartPointer<vtkPolyDataMapper>::New();
hexmapper->SetInput(polygonPolyData);
hexactor = vtkSmartPointer<vtkActor>::New();
hexactor->SetMapper(hexmapper);

ren->AddActor(hexactor);

Thanks
Gib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141019/f828b3ae/attachment.html>


More information about the vtkusers mailing list