7 #include "fwRenderVTK/OffScreenInteractorManager.hpp" 9 #include <fwRenderVTK/registry/macros.hpp> 11 #include <vtkObjectFactory.h> 12 #include <vtkRenderer.h> 13 #include <vtkRenderWindow.h> 14 #include <vtkRenderWindowInteractor.h> 57 OffScreenInteractorManager::OffScreenInteractorManager()
63 OffScreenInteractorManager::~OffScreenInteractorManager()
71 SLM_FATAL(
"This interactor doesn't need a container, use installInteractor(width, height).");
78 m_renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
79 m_renderWindow->SetOffScreenRendering( 1 );
80 m_renderWindow->SetSize(static_cast<int>(width), static_cast<int>(height));
82 m_interactor = vtkSmartPointer<vtkOffscreenRenderWindowInteractor>::New();
83 m_interactor->SetRenderWindow(m_renderWindow);
90 m_renderWindow =
nullptr;
91 m_interactor =
nullptr;
virtual FWRENDERVTK_API void installInteractor(::fwGui::container::fwContainer::sptr _parent) override
Do NOT use, this interactor doens't need container. You must use installInteractor(width, height) instead.
virtual FWRENDERVTK_API::vtkRenderWindowInteractor * getInteractor() override
Return a pointer on interactor.
#define SLM_FATAL(message)
The namespace fwRenderVTK contains classes for rendering with VTK.
virtual FWRENDERVTK_API void uninstallInteractor() override
Deletes interactor and manage correctly the window (removing layout).
Defines a class to redefine a vtkRenderWindowInteractor that can be used in a off screen window...