00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTensorProbeRepresentation.h 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 vtkGenericCell; 00039 00040 class VTK_WIDGETS_EXPORT vtkTensorProbeRepresentation : 00041 public vtkWidgetRepresentation 00042 { 00043 public: 00045 00046 vtkTypeMacro(vtkTensorProbeRepresentation,vtkWidgetRepresentation); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 00052 virtual void BuildRepresentation(); 00053 virtual int RenderOpaqueGeometry(vtkViewport *); 00055 00057 00058 vtkSetVector3Macro( ProbePosition, double ); 00059 vtkGetVector3Macro( ProbePosition, double ); 00060 vtkSetMacro( ProbeCellId, vtkIdType ); 00061 vtkGetMacro( ProbeCellId, vtkIdType ); 00063 00065 virtual void SetTrajectory( vtkPolyData * ); 00066 00068 void Initialize(); 00069 00072 virtual int SelectProbe( int pos[2] ) = 0; 00073 00077 virtual int Move( double motionVector[2] ); 00078 00080 00081 virtual void GetActors(vtkPropCollection *); 00082 virtual void ReleaseGraphicsResources(vtkWindow *); 00084 00085 protected: 00086 vtkTensorProbeRepresentation(); 00087 ~vtkTensorProbeRepresentation(); 00088 00089 void FindClosestPointOnPolyline( 00090 double displayPos[2], double closestWorldPos[3], vtkIdType &cellId, 00091 int maxSpeed = 10 ); 00092 00093 vtkActor * TrajectoryActor; 00094 vtkPolyDataMapper * TrajectoryMapper; 00095 vtkPolyData * Trajectory; 00096 double ProbePosition[3]; 00097 vtkIdType ProbeCellId; 00098 00099 private: 00100 vtkTensorProbeRepresentation( 00101 const vtkTensorProbeRepresentation&); //Not implemented 00102 void operator=(const vtkTensorProbeRepresentation&); //Not implemented 00103 00104 }; 00105 00106 #endif 00107