vtkAbstractMapper provides a function,SetClippingPlanes, to cut the actor at hardware level,which might be several magnitudes faster. But I can’t set implicit function to it to get specific shape like below.
I post a gif below to to show the result that the implicit function with four planes cuts a piece of mass out of a sphere.
And I tested the function you provided with the same planes, nothing was left in the renderer, much the same with what I experienced before.
I guess you would need to give different scalar values to the inside and the outside regions
Edit:
I’m not sure you can achieve want you want with a a mapper.
Unless you are rendering a tetrahedral mesh maybe.
Maybe you want to use a vtkClipPolyData and a vtkAppendFilter, but I’m not sure if it will work at the end
That’s pretty hardcore for me. I’m looking for a solution to process cliping faster than vtkTableBasedClipDataSet with 10 milions of cells rendering together and dynamically updating the result after per cliping.