Bug due to the usage of vtkCustomePolyDataMapper
The bug is appearing when trying to display meshes in project external to iMSTK (everything was working well inside iMSTK: the sandbox for example)
This issue was mainly due to the usage of vtkCustomePolyDataMapper
It can be fixed thanks to the modification (done by @alexis-girault) contained in the attached diff file (CustomPolyDataMapperFix.patch)
The main issue is fixed by this modification in imstkVTKRenderDelegate.h
:
VTKRenderDelegate()
{
m_actor = vtkSmartPointer<vtkActor>::New();
- m_mapper = vtkSmartPointer<VTKCustomPolyDataMapper>::New();
+ m_mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
m_transform = vtkSmartPointer<vtkTransform>::New();
m_actor->SetMapper(m_mapper);
m_actor->SetUserTransform(m_transform);
}
vtkSmartPointer<vtkActor> m_actor;
- vtkSmartPointer<VTKCustomPolyDataMapper> m_mapper;
+ vtkSmartPointer<vtkPolyDataMapper> m_mapper;
vtkSmartPointer<vtkTransform> m_transform;
};
}
For example, here is what could be observed with and without the bug (the lower mandibule displayed in both cases is a thetraedric mesh, which isn't affected by the bug):