VTK
|
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 "vtkInteractionWidgetsModule.h" // For export macro 00034 #include "vtkWidgetRepresentation.h" 00035 00036 class vtkActor; 00037 class vtkPolyData; 00038 class vtkPolyDataMapper; 00039 class vtkGenericCell; 00040 00041 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorProbeRepresentation : 00042 public vtkWidgetRepresentation 00043 { 00044 public: 00046 00047 vtkTypeMacro(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 00081 00082 virtual void GetActors(vtkPropCollection *); 00083 virtual void ReleaseGraphicsResources(vtkWindow *); 00085 00086 protected: 00087 vtkTensorProbeRepresentation(); 00088 ~vtkTensorProbeRepresentation(); 00089 00090 void FindClosestPointOnPolyline( 00091 double displayPos[2], double closestWorldPos[3], vtkIdType &cellId, 00092 int maxSpeed = 10 ); 00093 00094 vtkActor * TrajectoryActor; 00095 vtkPolyDataMapper * TrajectoryMapper; 00096 vtkPolyData * Trajectory; 00097 double ProbePosition[3]; 00098 vtkIdType ProbeCellId; 00099 00100 private: 00101 vtkTensorProbeRepresentation( 00102 const vtkTensorProbeRepresentation&); //Not implemented 00103 void operator=(const vtkTensorProbeRepresentation&); //Not implemented 00104 00105 }; 00106 00107 #endif 00108