<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><font size="2" color="000000">I'm rendering a shape using
</font><span style=" color:#800080;"><font size="2" color="000000">vtkPolyData, i.e. as a collection of polygons. Is there a way to colour each polygon separately?</font><br>
</span><span style=" color:#c0c0c0;"></span><br>
<font color="000000">polygonPolyData = vtkSmartPointer<vtkPolyData>::New();<br>
polygonPolyData-><span style="font-style: italic;">SetPoints</span>(points);<br>
polygonPolyData->SetPolys(polygons);<br>
<font size="2">hexmapper = vtkSmartPointer<vtkPolyDataMapper>::New();<br>
hexmapper->SetInput(polygonPolyData);<br>
hexactor = vtkSmartPointer<vtkActor>::New(); <br>
hexactor-><span style="font-style: italic;">SetMapper</span>(hexmapper); </font></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="2" color="000000" face="Tahoma">ren->AddActor(hexactor);</font></pre>
<font size="2" color="000000"></font><br>
<font size="2">Thanks<font color="000000"><font face="Tahoma"><font color="000000"><br>
Gib</font></font></font></font><br>
</div>
</body>
</html>