[vtkusers] Changing cell color with vtkCellPicker
    Federico Milano 
    fmilano at gmail.com
       
    Tue Jul 19 11:25:03 EDT 2011
    
    
  
Hi, I'm trying to change the cell color (painting it green) using
vtkCellPicker. My callback on EndPickEvent is like this:
virtual void Execute(vtkObject* caller, unsigned long, void*) {
      vtkCellPicker *cellPicker = reinterpret_cast<vtkCellPicker*>(caller);
      vtkIdType cellId = cellPicker->GetCellId();
      if (cellId >= 0) {
         mPiece->GetCellData()->GetScalars()->SetTuple3(cellId, 0,
255, 0);
      }
   }
The problem is that I'm actually executing this code, but the cell
color doesn't seem to change on the rendering window. Should I do
something else?
Thanks in advance,
Federico
    
    
More information about the vtkusers
mailing list