How to color cells of an unstructuredgrid.
I could color by point data.
I could color by actor.
But I could not apply color for each cell.
I used GetCellData of vtkUnstructuredGrid… and its showing as white.
How to color cells of an unstructuredgrid.
I could color by point data.
I could color by actor.
But I could not apply color for each cell.
I used GetCellData of vtkUnstructuredGrid… and its showing as white.
you need a cell data array for that and set the vtkCellData with the SetScalars method, you can check this example https://examples.vtk.org/site/Cxx/PolyData/ColorCells/