#ifndef __CPM__VTK__POINTPICKERREPRESENTATION__H__ #define __CPM__VTK__POINTPICKERREPRESENTATION__H__ #include #include #include #include namespace cpm { namespace VTK { template< class M > class PointPickerRepresentation : public vtkWidgetRepresentation { public: typedef PointPickerRepresentation Self; typedef M TMesh; typedef MeshMapper< M > TMapper; public: vtkTypeMacro( PointPickerRepresentation, vtkWidgetRepresentation ); public: static Self* New( ) { return( new Self( ) ); } void SetMesh( M* mesh ) { this->m_Mesh = mesh; this->m_MeshMapper = vtkSmartPointer< TMapper >::New( ); this->m_MeshMapper->SetInputData( this->m_Mesh ); this->m_MeshActor = vtkSmartPointer< vtkActor >::New( ); this->m_MeshActor->SetMapper( this->m_MeshMapper ); this->Modified( ); } virtual void BuildRepresentation( ) { std::cout << "PointPickerRepresentation BuildRepresentation" << std::endl; std::exit( 1 ); } virtual void PlaceWidget( double* bounds[ 6 ] ) { std::cout << "PointPickerRepresentation PlaceWidget" << std::endl; std::exit( 1 ); } virtual void StartWidgetInteraction( double eventPos[ 2 ] ) { std::cout << "PointPickerRepresentation StartWidgetInteraction" << std::endl; std::exit( 1 ); } virtual void WidgetInteraction( double newEventPos[ 2 ] ) { std::cout << "PointPickerRepresentation WidgetInteraction" << std::endl; std::exit( 1 ); } virtual void EndWidgetInteraction( double newEventPos[ 2 ] ) { std::cout << "PointPickerRepresentation EndWidgetInteraction" << std::endl; std::exit( 1 ); } virtual int ComputeInteractionState( int X, int Y, int modify = 0 ) { std::cout << "PointPickerRepresentation ComputeInteractionState" << std::endl; std::exit( 1 ); } virtual int GetInteractionState( ) { std::cout << "PointPickerRepresentation GetInteractionState" << std::endl; std::exit( 1 ); } virtual void Highlight(int highlightOn ) { std::cout << "PointPickerRepresentation Highlight" << std::endl; std::exit( 1 ); } protected: PointPickerRepresentation( ) : Superclass( ) { } virtual ~PointPickerRepresentation( ) { } private: // Purposely not implemented PointPickerRepresentation( const Self& ); void operator=( const Self& ); protected: typename M::Pointer m_Mesh; vtkSmartPointer< TMapper > m_MeshMapper; vtkSmartPointer< vtkActor > m_MeshActor; }; } // ecapseman } // ecapseman #endif // __CPM__VTK__POINTPICKERREPRESENTATION__H__ // eof - $RCSfile$