00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTensorProbeRepresentation.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00030 #ifndef __vtkTensorProbeRepresentation_h 00031 #define __vtkTensorProbeRepresentation_h 00032 00033 #include "vtkWidgetRepresentation.h" 00034 00035 class vtkActor; 00036 class vtkPolyData; 00037 class vtkPolyDataMapper; 00038 class vtkCellLocator; 00039 class vtkGenericCell; 00040 00041 class VTK_WIDGETS_EXPORT vtkTensorProbeRepresentation : 00042 public vtkWidgetRepresentation 00043 { 00044 public: 00046 00047 vtkTypeRevisionMacro(vtkTensorProbeRepresentation,vtkWidgetRepresentation); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 00053 virtual void BuildRepresentation(); 00054 virtual int RenderOpaqueGeometry(vtkViewport *); 00056 00058 00059 vtkSetVector3Macro( ProbePosition, double ); 00060 vtkGetVector3Macro( ProbePosition, double ); 00061 vtkSetMacro( ProbeCellId, vtkIdType ); 00062 vtkGetMacro( ProbeCellId, vtkIdType ); 00064 00066 virtual void SetTrajectory( vtkPolyData * ); 00067 00069 void Initialize(); 00070 00073 virtual int SelectProbe( int pos[2] ) = 0; 00074 00078 virtual int Move( double motionVector[2] ); 00079 00080 protected: 00081 vtkTensorProbeRepresentation(); 00082 ~vtkTensorProbeRepresentation(); 00083 00084 void FindClosestPointOnPolyline( 00085 double displayPos[2], double closestWorldPos[3], vtkIdType &cellId, 00086 int maxSpeed = 10 ); 00087 00088 vtkActor * TrajectoryActor; 00089 vtkPolyDataMapper * TrajectoryMapper; 00090 vtkPolyData * Trajectory; 00091 vtkCellLocator * CellLocator; 00092 double ProbePosition[3]; 00093 vtkIdType ProbeCellId; 00094 00095 private: 00096 vtkTensorProbeRepresentation( 00097 const vtkTensorProbeRepresentation&); //Not implemented 00098 void operator=(const vtkTensorProbeRepresentation&); //Not implemented 00099 00100 }; 00101 00102 #endif 00103