00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkAngleRepresentation3D.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 =========================================================================*/ 00033 #ifndef __vtkAngleRepresentation3D_h 00034 #define __vtkAngleRepresentation3D_h 00035 00036 #include "vtkAngleRepresentation.h" 00037 00038 class vtkActor; 00039 class vtkProperty; 00040 class vtkPolyDataMapper; 00041 class vtkLineSource; 00042 class vtkArcSource; 00043 class vtkFollower; 00044 class vtkVectorText; 00045 class vtkPolyDataMapper; 00046 class vtkTextProperty; 00047 00048 class VTK_WIDGETS_EXPORT vtkAngleRepresentation3D : public vtkAngleRepresentation 00049 { 00050 public: 00052 static vtkAngleRepresentation3D *New(); 00053 00055 00056 vtkTypeMacro(vtkAngleRepresentation3D,vtkAngleRepresentation); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00059 00061 virtual double GetAngle(); 00062 00064 00067 virtual void GetPoint1WorldPosition(double pos[3]); 00068 virtual void GetCenterWorldPosition(double pos[3]); 00069 virtual void GetPoint2WorldPosition(double pos[3]); 00070 virtual void SetPoint1WorldPosition(double pos[3]); 00071 virtual void SetPoint1DisplayPosition(double pos[3]); 00072 virtual void SetCenterWorldPosition(double pos[3]); 00073 virtual void SetCenterDisplayPosition(double pos[3]); 00074 virtual void SetPoint2WorldPosition(double pos[3]); 00075 virtual void SetPoint2DisplayPosition(double pos[3]); 00076 virtual void GetPoint1DisplayPosition(double pos[3]); 00077 virtual void GetCenterDisplayPosition(double pos[3]); 00078 virtual void GetPoint2DisplayPosition(double pos[3]); 00080 00082 00085 vtkGetObjectMacro(Ray1,vtkActor); 00086 vtkGetObjectMacro(Ray2,vtkActor); 00087 vtkGetObjectMacro(Arc,vtkActor); 00088 vtkGetObjectMacro(TextActor,vtkFollower); 00090 00092 00093 virtual void SetTextActorScale( double scale[3] ); 00094 virtual double * GetTextActorScale(); 00096 00098 void BuildRepresentation(); 00099 00101 00102 virtual void ReleaseGraphicsResources(vtkWindow *w); 00103 virtual int RenderOpaqueGeometry(vtkViewport*); 00104 virtual int RenderTranslucentPolygonalGeometry(vtkViewport*); 00105 virtual int HasTranslucentPolygonalGeometry(); 00107 00108 protected: 00109 vtkAngleRepresentation3D(); 00110 ~vtkAngleRepresentation3D(); 00111 00112 // The pieces that make up the angle representations 00113 vtkLineSource *Line1Source; 00114 vtkLineSource *Line2Source; 00115 vtkArcSource *ArcSource; 00116 vtkPolyDataMapper *Line1Mapper; 00117 vtkPolyDataMapper *Line2Mapper; 00118 vtkPolyDataMapper *ArcMapper; 00119 vtkActor *Ray1; 00120 vtkActor *Ray2; 00121 vtkActor *Arc; 00122 vtkFollower *TextActor; 00123 vtkPolyDataMapper *TextMapper; 00124 vtkVectorText *TextInput; 00125 double Angle; 00126 bool ScaleInitialized; 00127 double TextPosition[3]; 00128 00129 private: 00130 vtkAngleRepresentation3D(const vtkAngleRepresentation3D&); //Not implemented 00131 void operator=(const vtkAngleRepresentation3D&); //Not implemented 00132 }; 00133 00134 #endif