1 #ifndef __cpExtensions__QT__RendererWidget__h__
2 #define __cpExtensions__QT__RendererWidget__h__
4 #include <cpExtensions/Config.h>
6 #ifdef cpExtensions_QT4
8 #include <vtkSmartPointer.h>
13 // -------------------------------------------------------------------------
15 class vtkInteractorStyle;
16 class vtkOrientationMarkerWidget;
18 class vtkPropCollection;
20 // -------------------------------------------------------------------------
21 namespace cpExtensions
27 class cpExtensions_EXPORT RendererWidget
28 : public cpExtensions_QVTKWidget
33 typedef RendererWidget Self;
34 typedef cpExtensions_QVTKWidget Superclass;
36 typedef std::set< vtkSmartPointer< vtkProp > > TProps;
37 typedef std::map< std::string, TProps > TPropCollection;
40 explicit RendererWidget(
41 QWidget* parent = NULL, Qt::WindowFlags f = 0
43 virtual ~RendererWidget( );
45 int GetQuadrant( ) const;
46 void SetQuadrant( int q );
48 vtkRenderer* GetRenderer( );
49 const vtkRenderer* GetRenderer( ) const;
51 vtkInteractorStyle* GetStyle( );
52 const vtkInteractorStyle* GetStyle( ) const;
53 void SetStyle( vtkInteractorStyle* style );
55 vtkCamera* GetActiveCamera( );
56 const vtkCamera* GetActiveCamera( ) const;
58 void AddViewProp( vtkProp* prop, const std::string& name = "" );
60 vtkPropCollection* props, const std::string& name = ""
62 void AddAuxViewProp( vtkProp* prop, const std::string& name = "" );
64 vtkPropCollection* props, const std::string& name = ""
67 TProps& GetViewProps( const std::string& name );
68 const TProps& GetViewProps( const std::string& name ) const;
69 TProps& GetAuxViewProps( const std::string& name );
70 const TProps& GetAuxViewProps( const std::string& name ) const;
72 void RemoveViewProps( const std::string& name );
73 void RemoveViewProps( );
75 virtual void HideViewProps( const std::string& name );
76 virtual void ShowViewProps( const std::string& name );
78 virtual void ResetCamera( );
79 virtual void Render( );
82 vtkSmartPointer< vtkRenderer > m_Renderer;
83 vtkSmartPointer< vtkOrientationMarkerWidget > m_Marker;
86 TPropCollection m_ViewProps;
87 TPropCollection m_AuxViewProps;
94 #endif // cpExtensions_QT4
96 #endif // __cpExtensions__QT__RendererWidget__h__