[vtkusers] How to display vtkMappedUnstructuredGrid with my Implementation class
allison.vacanti at kitware.com
Tue Aug 7 13:19:02 EDT 2018
The rendering engine is shortcircuiting because the dataset has no
coordinate information (the `x` array is never used by the mapped grid
implementation -- `mesh->GetPoints()` is returning nullptr). Adding
`mesh->SetPoints(points);` to the test script will complete the dataset and
let the renderer progress.
Be warned, however, that the mapped unstructured grid stuff is not widely
used and there may be some further issues lurking as you go farther with
it. They may be a need to debug/patch VTK itself if you want to use it.
I should also point out that the mapped unstructured grid is not used
directly in the rendering -- it is first converted to a `vtkPolyData` by a
`vtkDataSetSurfaceFilter` inside of the `vtkDataSetMapper`. If you
encounter a lot of issues with the mapped grid, you may find it easier to
just build a `vtkPolyData` directly from your application's data. The
mapped grids were intended to be used on extremely large simulation
datasets that could not be physically copied without running out of memory
on an HPC node -- if that's not your usecase, directly building the
`vtkPolyData` will likely save you a lot of hassle.
On Tue, Aug 7, 2018 at 1:45 AM, dsbabkov <dsbabkov at gmail.com> wrote:
> Hello, everyone!
> I'm new to VTK and would like to use it in my project instead of my own
> OpenGL rendering system;
> I think, I need to keep data structures as it is and it seems I have to use
> vtkMappedUnstructuredGrid class.
> I found an example UGrid, which demonstrates, how to work with
> To examine vtkMappedUnstructuredGrid I decided to modify this example. I
> have implemented required by manual Implementation class methods and
> replaced usage of vtkUnstructuredGrid to vtkMappedUnstructuredGrid with my
> Implementation. But nothing is displayed... I was trying to set breakpoints
> to vtkMappedUnstructuredGrid template methods to understand, what I have
> missed, but it seems no methods called to request data information. Only
> constructor, destructor and GetMTime, which seems not required to be
> implemented in Implementation class.
> Here is my c++ code: main.cpp
> And CMake project file: CMakeLists.txt
> Please, help me to understand this template class and find my fault.
> My OS is arch linux and VTK vtk-8.1.0 installed.
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers