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

Amy Squillacote ahs at cfdrc.com
Wed Nov 19 14:22:28 EST 2008


Try calling mapper->ScalarVisibilityOff();

- Amy

Nour Mestiri wrote:
> 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.
>  
>  
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list