[vtkusers] vtkLookupTable not working for spheres?

tom fogal tfogal at apollo.sr.unh.edu
Fri Aug 6 13:49:39 EDT 2004


I'm trying to color a sphere a solid green without any success. I just
build a simple 2-element table with the color I want it to be:

   Table->SetNumberOfTableValues(2);
   Table->SetTableValue(0, CL_EARTH_R, CL_EARTH_G, CL_EARTH_B);
   Table->SetTableValue(1, CL_EARTH_R, CL_EARTH_G, CL_EARTH_B);
   Table->Build();
                                                               
   Map->SetInput(Sphere->GetOutput());
   Map->SetLookupTable(Table);

where 'Table' is a vtkLookupTable*, 'Map' is a vtkPolyDataMapper, and
'Sphere' is a vtkSphereSource*.

The sphere just stays white, as if I hadn't specified a lookup table at
all. The most confusing part is that I used the same setup to color
stream lines, and that is working fine.

Any hints / glaringly obvious problems with the above setup?

Thanks,

-tom



More information about the vtkusers mailing list