#include <vtkSmartPointer.h>
#include <map>
#include <set>
+#include <string>
// -------------------------------------------------------------------------
class vtkCamera;
class vtkOrientationMarkerWidget;
class vtkProp;
class vtkPropCollection;
-class vtkRenderer;
// -------------------------------------------------------------------------
namespace cpExtensions
typedef RendererWidget Self;
typedef cpExtensions_QVTKWidget Superclass;
- typedef
- std::map< std::string, vtkSmartPointer< vtkPropCollection > >
- TProps;
+ typedef std::set< vtkSmartPointer< vtkProp > > TProps;
+ typedef std::map< std::string, TProps > TPropCollection;
public:
- explicit RendererWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
+ explicit RendererWidget(
+ QWidget* parent = NULL, Qt::WindowFlags f = 0
+ );
virtual ~RendererWidget( );
int GetQuadrant( ) const;
vtkCamera* GetActiveCamera( );
const vtkCamera* GetActiveCamera( ) const;
- void AddViewProp( vtkProp* prop, const std::string& name );
- void AddViewProps( vtkPropCollection* props, const std::string& name );
- void AddAuxViewProp( vtkProp* prop, const std::string& name );
- void AddAuxViewProps( vtkPropCollection* props, const std::string& name );
+ void AddViewProp( vtkProp* prop, const std::string& name = "" );
+ void AddViewProps(
+ vtkPropCollection* props, const std::string& name = ""
+ );
+ void AddAuxViewProp( vtkProp* prop, const std::string& name = "" );
+ void AddAuxViewProps(
+ vtkPropCollection* props, const std::string& name = ""
+ );
- vtkPropCollection* GetViewProps( const std::string& name );
- const vtkPropCollection* GetViewProps( const std::string& name ) const;
- vtkPropCollection* GetAuxViewProps( const std::string& name );
- const vtkPropCollection* GetAuxViewProps( const std::string& name ) const;
+ TProps& GetViewProps( const std::string& name );
+ const TProps& GetViewProps( const std::string& name ) const;
+ TProps& GetAuxViewProps( const std::string& name );
+ const TProps& GetAuxViewProps( const std::string& name ) const;
void RemoveViewProps( const std::string& name );
void RemoveViewProps( );
virtual void Render( );
protected:
- vtkSmartPointer< vtkRenderer > m_Renderer;
+ vtkSmartPointer< vtkRenderer > m_Renderer;
vtkSmartPointer< vtkOrientationMarkerWidget > m_Marker;
int m_Quadrant;
- TProps m_ViewProps;
- TProps m_AuxViewProps;
+ TPropCollection m_ViewProps;
+ TPropCollection m_AuxViewProps;
};
} // ecapseman