7 #ifndef __VTKSIMPLEMESH_SRENDERER_HPP__ 8 #define __VTKSIMPLEMESH_SRENDERER_HPP__ 10 #include "vtkSimpleMesh/config.hpp" 12 #include <fwRender/IRender.hpp> 14 #include <fwRenderVTK/IVtkRenderWindowInteractorManager.hpp> 16 #include <boost/shared_array.hpp> 18 #include <vtkCommand.h> 19 #include <vtkSmartPointer.h> 24 class vtkPolyDataMapper;
63 typedef ::boost::shared_array< double > SharedArray;
65 VTKSIMPLEMESH_API
static const ::fwCom::Slots::SlotKeyType s_UPDATE_CAM_POSITION_SLOT;
66 VTKSIMPLEMESH_API
static const ::fwCom::Slots::SlotKeyType s_INIT_PIPELINE_SLOT;
67 VTKSIMPLEMESH_API
static const ::fwCom::Slots::SlotKeyType s_UPDATE_PIPELINE_SLOT;
69 VTKSIMPLEMESH_API
static const ::fwCom::Signals::SignalKeyType s_CAM_UPDATED_SIG;
80 VTKSIMPLEMESH_API virtual ~
SRenderer() noexcept;
83 void notifyCamPositionUpdated();
102 VTKSIMPLEMESH_API virtual
void starting() override;
107 VTKSIMPLEMESH_API virtual
void configuring() override;
114 VTKSIMPLEMESH_API virtual
void stopping() override;
122 VTKSIMPLEMESH_API virtual
void updating() override;
125 vtkRenderer* m_render;
130 ::
fwRenderVTK::IVtkRenderWindowInteractorManager::sptr m_interactorManager;
133 void initVTKPipeline();
139 void updateVTKPipeline(
bool resetCamera = true);
142 void updateCamPosition(SharedArray positionValue,
143 SharedArray focalValue,
144 SharedArray viewUpValue);
150 void updatePipeline();
156 bool m_bPipelineIsInit;
161 CamUpdatedSignalType::sptr m_sigCamUpdated;
164 vtkSmartPointer<vtkPolyData> m_vtkPolyData;
167 vtkSmartPointer<vtkPolyDataMapper> m_mapper;
170 ::
fwCore::HiResTimer m_hiResTimer;
Service rendering a fwData::Mesh using VTK.
This class is a helper to define the connections of a service and its data.
This namespace fwCore provides common foundations for FW4SPL.
Defines the service interface managing the rendering service for object.
The namespace vtkSimpleMesh contains a service which renders one mesh (fwData::Mesh).
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace fwRenderVTK contains classes for rendering with VTK.