00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDistanceRepresentation2D.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 __vtkDistanceRepresentation2D_h 00031 #define __vtkDistanceRepresentation2D_h 00032 00033 #include "vtkDistanceRepresentation.h" 00034 00035 class vtkAxisActor2D; 00036 class vtkProperty2D; 00037 00038 00039 class VTK_WIDGETS_EXPORT vtkDistanceRepresentation2D : public vtkDistanceRepresentation 00040 { 00041 public: 00043 static vtkDistanceRepresentation2D *New(); 00044 00046 00047 vtkTypeRevisionMacro(vtkDistanceRepresentation2D,vtkDistanceRepresentation); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 00053 virtual double GetDistance() 00054 {return this->Distance;} 00056 00058 00061 void GetPoint1WorldPosition(double pos[3]); 00062 void GetPoint2WorldPosition(double pos[3]); 00063 void SetPoint1DisplayPosition(double pos[3]); 00064 void SetPoint2DisplayPosition(double pos[3]); 00065 void GetPoint1DisplayPosition(double pos[3]); 00066 void GetPoint2DisplayPosition(double pos[3]); 00068 00071 vtkAxisActor2D *GetAxis(); 00072 00074 virtual void BuildRepresentation(); 00075 00077 00078 virtual void ReleaseGraphicsResources(vtkWindow *w); 00079 virtual int RenderOverlay(vtkViewport *viewport); 00080 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00082 00083 protected: 00084 vtkDistanceRepresentation2D(); 00085 ~vtkDistanceRepresentation2D(); 00086 00087 // Add a line to the mix 00088 vtkAxisActor2D *AxisActor; 00089 vtkProperty2D *AxisProperty; 00090 00091 // The distance between the two points 00092 double Distance; 00093 00094 private: 00095 vtkDistanceRepresentation2D(const vtkDistanceRepresentation2D&); //Not implemented 00096 void operator=(const vtkDistanceRepresentation2D&); //Not implemented 00097 }; 00098 00099 #endif