mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Fixed seg fault on start with >= VTK9.1, MACOSX: fixed bundle with homebrew
This commit is contained in:
@@ -82,7 +82,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <vtkOpenGLRenderer.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if VTK_MAJOR_VERSION >= 8
|
||||
#include <vtkGenericOpenGLRenderWindow.h>
|
||||
#endif
|
||||
@@ -140,11 +139,8 @@ CloudViewer::CloudViewer(QWidget *parent, CloudViewerInteractorStyle * style) :
|
||||
_intensityAbsMax(100.0f),
|
||||
_coordinateFrameScale(1.0)
|
||||
{
|
||||
UDEBUG("");
|
||||
this->setMinimumSize(200, 200);
|
||||
|
||||
vtkObject::GlobalWarningDisplayOff();
|
||||
|
||||
int argc = 0;
|
||||
UASSERT(style!=0);
|
||||
style->setCloudViewer(this);
|
||||
@@ -208,12 +204,13 @@ CloudViewer::CloudViewer(QWidget *parent, CloudViewerInteractorStyle * style) :
|
||||
this->SetRenderWindow(_visualizer->getRenderWindow());
|
||||
#endif
|
||||
|
||||
// Replaced by the second line, to avoid a crash in Mac OS X on close, as well as
|
||||
// the "Invalid drawable" warning when the view is not visible.
|
||||
//_visualizer->setupInteractor(this->GetInteractor(), this->GetRenderWindow());
|
||||
// Replaced by the second line, to avoid a crash in Mac OS X on close, as well as
|
||||
// the "Invalid drawable" warning when the view is not visible.
|
||||
#if VTK_MAJOR_VERSION > 8
|
||||
//_visualizer->setupInteractor(this->interactor(), this->renderWindow());
|
||||
this->interactor()->SetInteractorStyle (_visualizer->getInteractorStyle());
|
||||
#else
|
||||
//_visualizer->setupInteractor(this->GetInteractor(), this->GetRenderWindow());
|
||||
this->GetInteractor()->SetInteractorStyle (_visualizer->getInteractorStyle());
|
||||
#endif
|
||||
// setup a simple point picker
|
||||
@@ -1502,11 +1499,11 @@ bool CloudViewer::addTextureMesh (
|
||||
// Save the viewpoint transformation matrix to the global actor map
|
||||
(*_visualizer->getCloudActorMap())[id].viewpoint_transformation_ = transformation;
|
||||
#endif
|
||||
|
||||
|
||||
#if VTK_MAJOR_VERSION >= 7
|
||||
actor->GetProperty()->SetAmbient(0.1);
|
||||
#else
|
||||
actor->GetProperty()->SetAmbient(0.5);
|
||||
actor->GetProperty()->SetAmbient(0.1);
|
||||
#else
|
||||
actor->GetProperty()->SetAmbient(0.5);
|
||||
#endif
|
||||
actor->GetProperty()->SetLighting(_aSetLighting->isChecked());
|
||||
actor->GetProperty()->SetInterpolation(_aSetFlatShading->isChecked()?VTK_FLAT:VTK_PHONG);
|
||||
|
||||
Reference in New Issue
Block a user