[vtkusers] How to set different color to each point

Gwenaël Guillard gwenael.guillard at enst-bretagne.fr
Fri Nov 7 05:23:58 EST 2003


Hi,

You have to use

yourPolydata->GetPointData()->SetScalars(yourArray);
youPolyDataMapper->ScalarVisibiltyOn();
youPolyDataMapper->SetScalarModeToUsePointData();

Verfiy that the index of your array corresponds with the index of polydata points.

HTH, Gwen






"Jia, Ming (Research, Shanghai)" a écrit :

> > Hi, All,
> >
> > For some reason, I want display point data with different color. But vtkPoint has no such attribute. So how to do?
> >
> > Thanks.
> >
> > Ming Jia
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list