[vtkusers] Can't modify the color of the actor even with 'SetColor' fucntion

Nour Mestiri nourmestiri at yahoo.fr
Wed Nov 19 14:19:49 EST 2008


Hi all vtk users,
Can someone tell me how to modify the color of a polydata?
In fact, i have a polydata (a VRML object) which i should display on a window. When i read this file, the object is grey but i want to change its color on white. 
 
I use this the code below but i have a 'blue' object for each value of 'SetColor()':
vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
mapper->SetInput(myPolydata);
vtkActor *actor = vtkActor::New();
actor->SetMapper(mapper);
actor->GetProperty()->SetColor(1,1,1);
 
Is there something to modify in this code or the code source of the VRML file?
Thank you for your help.
 
 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081119/10877b69/attachment.htm>


More information about the vtkusers mailing list