Skip to content

Remove virtual methods from ColorTable

Kenneth Moreland requested to merge kmorel/vtk-m:color-table-no-virtual into master

Virtual methods are being deprecated, so remove their use from the ColorTable classes. Instead of using a virtual method to look up a value in the ColorTable, we essentially use a switch statement. This change also simplified the code quite a bit.

The execution object used to use pointers to handle the virtual objects. That is no longer necessary, so a simple vtkm::exec::ColorTable is returned for execution objects. (Note that this ColorTable contains pointers that are specific for the particular device.) This is a non- backward compabible change. However, the only place (outside of the ColorTable implementation itself) was a single worklet for converting scalars to colors (vtkm::worklet::colorconversion::TransferFunction). This is unlikely to affect anyone.

I also "fixed" some names in enum structs. There has been some inconsistencies in VTK-m on whether items in an enum struct are capitolized or camel case. We seem to moving toward camel case, so deprecate some old names.

Merge request reports

Loading