[vtkusers] Polygon colouring
Gib Bogle
g.bogle at auckland.ac.nz
Sun Oct 19 01:22:15 EDT 2014
Great! Thanks
Gib
________________________________
From: David Gobbi [david.gobbi at gmail.com]
Sent: Sunday, 19 October 2014 3:27 p.m.
To: Gib Bogle
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Polygon colouring
polyData->GetCellData()->SetScalars(array);
On Sat, Oct 18, 2014 at 8:18 PM, Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>> wrote:
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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141019/af9cef39/attachment.html>
More information about the vtkusers
mailing list