Commit Graph

5 Commits

Author SHA1 Message Date
Kenneth Moreland
11996f133f Remove virtual methods from ColorTable
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.
2020-09-14 13:26:16 -06:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Kenneth Moreland
33db6655fc Make the building of static color table presets is thread safe
If multiple threads call a function with a static function
simultaneously for the first time, C++ does not guarantee that the
static member will be constructed correctly. Make sure that it happens
correctly.
2018-11-14 09:19:07 -06:00
Kenneth Moreland
8984e74e8c Hold preset information in simple struct
Creating all the presets as vtkm::cont::ColorTable objects and passing
them back was problematic. It caused state to be shared and caused
issues when deallocating after the device deallocation methods were
finalized. Instead, make a simple struct and build new color tables on
the fly.
2018-11-11 17:30:11 -07:00
Kenneth Moreland
70e10459c7 Update presets for ColorTable
The ParaView project went through a rigourous selection process
for a short list of color tables. Let's replicate that for our
presets.
2018-11-09 09:02:10 -07:00