Vtk9 support (#722)

* Fixed build with VTK9

* Fixed VTK9 build with OctoMap dependency (vtkRenderingVolumeOpenGL2 missing)
This commit is contained in:
matlabbe
2021-05-15 19:43:47 -04:00
committed by GitHub
parent 8c336e1e39
commit e9d7fcd7ae
3 changed files with 86 additions and 22 deletions

View File

@@ -34,7 +34,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "rtabmap/core/StereoCameraModel.h"
#include "rtabmap/gui/CloudViewerInteractorStyle.h"
#if VTK_MAJOR_VERSION > 8
#ifndef slots
#define slots Q_SLOTS
#endif
#include <QVTKOpenGLNativeWidget.h>
using PCLQVTKWidget = QVTKOpenGLNativeWidget;
#else
#include <QVTKWidget.h>
using PCLQVTKWidget = QVTKWidget;
#endif
#include <pcl/pcl_base.h>
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
@@ -66,7 +75,7 @@ namespace rtabmap {
class OctoMap;
class RTABMAPGUI_EXP CloudViewer : public QVTKWidget
class RTABMAPGUI_EXP CloudViewer : public PCLQVTKWidget
{
Q_OBJECT