It would be nice to have a place to host all tricks, hacks, best practices and maybe even dark arts type shenanigans possible in VTK C++. Very much like the one at discourse.paraview.org
I’d envision it to contain code snippets/methodologies targeted to intermediate/advanced C++ developers new to VTK.
Some trivial but greatly helpful stuff I can think of when writing this post,
- Get pointer access to cell structure (w/o invoking a copy)
- Invoke
CopyStructureonvtkDataSets when possible. (I didn’t know this existed until I poked around VTK’s source) - Thread-safe cell traversal
- Thread-safe point retrieval
- Best practices - filter development
- Usage of
SafeDownCastto develop generic apps (vtkAlgorithm/vtkXMLUnstructuredDataReader derived) - Similar…
FastDownCastforvtkDataArraywhen the data type is known.
I’m sure there are many more in the rendering side of things. Ideally, these posts could be limited to the core C++ VTK library and avoid general C++, wrappers to VTK