fw4spl
SMaterial.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __VISUVTKADAPTOR_SMATERIAL_HPP__
8 #define __VISUVTKADAPTOR_SMATERIAL_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwRenderVTK/IAdaptor.hpp>
13 
14 class VISUVTKADAPTOR_CLASS_API vtkProperty;
15 
16 namespace fwData
17 {
18 class Material;
19 }
20 
21 namespace visuVTKAdaptor
22 {
23 
37 class VISUVTKADAPTOR_CLASS_API SMaterial : public ::fwRenderVTK::IAdaptor
38 {
39 
40 public:
41 
42  static const ::fwServices::IService::KeyType s_MATERIAL_INPUT;
43 
45 
46  VISUVTKADAPTOR_API SMaterial() noexcept;
47 
48  VISUVTKADAPTOR_API virtual ~SMaterial() noexcept;
49 
50  VISUVTKADAPTOR_API void setVtkProperty(vtkProperty* property);
51 
52  VISUVTKADAPTOR_API vtkProperty* getVtkProperty() const;
53 
60  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
61 
62 protected:
63 
64  VISUVTKADAPTOR_API void configuring() override;
65  VISUVTKADAPTOR_API void starting() override;
66  VISUVTKADAPTOR_API void updating() override;
67  VISUVTKADAPTOR_API void stopping() override;
68 
69  void updateMaterial( CSPTR(::fwData::Material) material );
70 
71  vtkProperty* m_property;
72  bool m_manageProperty;
73  bool m_lighting;
74 
75 };
76 
77 } //namespace visuVTKAdaptor
78 
79 #endif // __VISUVTKADAPTOR_SMATERIAL_HPP__
#define CSPTR(_cls_)
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
Manage material representation of meshes.
Definition: SMaterial.hpp:37
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains the representation of the data objects used in the framework.