1 #ifndef __CPM__VTK__POINTPICKERREPRESENTATION__H__
2 #define __CPM__VTK__POINTPICKERREPRESENTATION__H__
5 #include <vtkSmartPointer.h>
6 #include <vtkWidgetRepresentation.h>
8 #include <cpm/VTK/MeshMapper.h>
15 class PointPickerRepresentation
16 : public vtkWidgetRepresentation
19 typedef PointPickerRepresentation Self;
22 typedef MeshMapper< M > TMapper;
25 vtkTypeMacro( PointPickerRepresentation, vtkWidgetRepresentation );
30 return( new Self( ) );
33 void SetMesh( M* mesh )
36 this->m_MeshMapper = vtkSmartPointer< TMapper >::New( );
37 this->m_MeshMapper->SetInputData( this->m_Mesh );
39 this->m_MeshActor = vtkSmartPointer< vtkActor >::New( );
40 this->m_MeshActor->SetMapper( this->m_MeshMapper );
45 virtual void BuildRepresentation( )
47 std::cout << "PointPickerRepresentation BuildRepresentation" << std::endl;
50 virtual void PlaceWidget( double* bounds[ 6 ] )
52 std::cout << "PointPickerRepresentation PlaceWidget" << std::endl;
55 virtual void StartWidgetInteraction( double eventPos[ 2 ] )
57 std::cout << "PointPickerRepresentation StartWidgetInteraction" << std::endl;
60 virtual void WidgetInteraction( double newEventPos[ 2 ] )
62 std::cout << "PointPickerRepresentation WidgetInteraction" << std::endl;
65 virtual void EndWidgetInteraction( double newEventPos[ 2 ] )
67 std::cout << "PointPickerRepresentation EndWidgetInteraction" << std::endl;
70 virtual int ComputeInteractionState( int X, int Y, int modify = 0 )
72 std::cout << "PointPickerRepresentation ComputeInteractionState" << std::endl;
75 virtual int GetInteractionState( )
77 std::cout << "PointPickerRepresentation GetInteractionState" << std::endl;
80 virtual void Highlight(int highlightOn )
82 std::cout << "PointPickerRepresentation Highlight" << std::endl;
87 PointPickerRepresentation( )
92 virtual ~PointPickerRepresentation( )
97 // Purposely not implemented
98 PointPickerRepresentation( const Self& );
99 void operator=( const Self& );
102 typename M::Pointer m_Mesh;
103 vtkSmartPointer< TMapper > m_MeshMapper;
104 vtkSmartPointer< vtkActor > m_MeshActor;
111 #endif // __CPM__VTK__POINTPICKERREPRESENTATION__H__