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>
12 // -------------------------------------------------------------------------
14 class vtkInteractorStyle;
15 class vtkOrientationMarkerWidget;
17 class vtkPropCollection;
20 // -------------------------------------------------------------------------
21 namespace cpExtensions
27 class cpExtensions_EXPORT RendererWidget
28 : public cpExtensions_QVTKWidget
33 typedef RendererWidget Self;
34 typedef cpExtensions_QVTKWidget Superclass;
37 std::map< std::string, vtkSmartPointer< vtkPropCollection > >
41 explicit RendererWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
42 virtual ~RendererWidget( );
44 int GetQuadrant( ) const;
45 void SetQuadrant( int q );
47 vtkRenderer* GetRenderer( );
48 const vtkRenderer* GetRenderer( ) const;
50 vtkInteractorStyle* GetStyle( );
51 const vtkInteractorStyle* GetStyle( ) const;
52 void SetStyle( vtkInteractorStyle* style );
54 vtkCamera* GetActiveCamera( );
55 const vtkCamera* GetActiveCamera( ) const;
57 void AddViewProp( vtkProp* prop, const std::string& name );
58 void AddViewProps( vtkPropCollection* props, const std::string& name );
59 void AddAuxViewProp( vtkProp* prop, const std::string& name );
60 void AddAuxViewProps( vtkPropCollection* props, const std::string& name );
62 vtkPropCollection* GetViewProps( const std::string& name );
63 const vtkPropCollection* GetViewProps( const std::string& name ) const;
64 vtkPropCollection* GetAuxViewProps( const std::string& name );
65 const vtkPropCollection* GetAuxViewProps( const std::string& name ) const;
67 void RemoveViewProps( const std::string& name );
68 void RemoveViewProps( );
70 virtual void HideViewProps( const std::string& name );
71 virtual void ShowViewProps( const std::string& name );
73 virtual void ResetCamera( );
74 virtual void Render( );
77 vtkSmartPointer< vtkRenderer > m_Renderer;
78 vtkSmartPointer< vtkOrientationMarkerWidget > m_Marker;
82 TProps m_AuxViewProps;
89 #endif // cpExtensions_QT4
91 #endif // __cpExtensions__QT__RendererWidget__h__