Except cell scalar value as color,are there any other way to highlight/mark a cell when it is clicked?

Hello,I want to highlight a cell when it is clicked,and I knew that the scalar value can be used.The question is that if doing it like this,the two faces of same cell can’t have different colors which is is must-have feature in my current project.So question is:

Except cell scalar value as color,are there any other way to highlight/mark a cell when it is clicked?

You can create a new vtkPolyData containing the marked cells and display it on top. To ensure that it always placed nicely on top, you can set the following properties on the mapper for the overlay.

mapper->SetRelativeCoincidentTopologyLineOffsetParameters(0, -60000);
mapper->SetRelativeCoincidentTopologyPolygonOffsetParameters(0, -60000);
mapper->SetRelativeCoincidentTopologyPointOffsetParameter(-60000);

Thanks,you mean to create another actor like the official highlight example

Yes, it allows for more flexibility

Thanks,this solution will cause many design issues