VTK
dox/Interaction/Widgets/vtkAngleRepresentation3D.h
Go to the documentation of this file.
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 "vtkInteractionWidgetsModule.h" // For export macro
00037 #include "vtkAngleRepresentation.h"
00038 
00039 class vtkActor;
00040 class vtkProperty;
00041 class vtkPolyDataMapper;
00042 class vtkLineSource;
00043 class vtkArcSource;
00044 class vtkFollower;
00045 class vtkVectorText;
00046 class vtkPolyDataMapper;
00047 class vtkTextProperty;
00048 
00049 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation3D : public vtkAngleRepresentation
00050 {
00051 public:
00053   static vtkAngleRepresentation3D *New();
00054 
00056 
00057   vtkTypeMacro(vtkAngleRepresentation3D,vtkAngleRepresentation);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062   virtual double GetAngle();
00063 
00065 
00068   virtual void GetPoint1WorldPosition(double pos[3]);
00069   virtual void GetCenterWorldPosition(double pos[3]);
00070   virtual void GetPoint2WorldPosition(double pos[3]);
00071   virtual void SetPoint1WorldPosition(double pos[3]);
00072   virtual void SetPoint1DisplayPosition(double pos[3]);
00073   virtual void SetCenterWorldPosition(double pos[3]);
00074   virtual void SetCenterDisplayPosition(double pos[3]);
00075   virtual void SetPoint2WorldPosition(double pos[3]);
00076   virtual void SetPoint2DisplayPosition(double pos[3]);
00077   virtual void GetPoint1DisplayPosition(double pos[3]);
00078   virtual void GetCenterDisplayPosition(double pos[3]);
00079   virtual void GetPoint2DisplayPosition(double pos[3]);
00081 
00083 
00086   vtkGetObjectMacro(Ray1,vtkActor);
00087   vtkGetObjectMacro(Ray2,vtkActor);
00088   vtkGetObjectMacro(Arc,vtkActor);
00089   vtkGetObjectMacro(TextActor,vtkFollower);
00091 
00093 
00094   virtual void SetTextActorScale( double scale[3] );
00095   virtual double * GetTextActorScale();
00097 
00099   void BuildRepresentation();
00100 
00102 
00103   virtual void ReleaseGraphicsResources(vtkWindow *w);
00104   virtual int RenderOpaqueGeometry(vtkViewport*);
00105   virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
00106   virtual int HasTranslucentPolygonalGeometry();
00108 
00109 protected:
00110   vtkAngleRepresentation3D();
00111   ~vtkAngleRepresentation3D();
00112 
00113   // The pieces that make up the angle representations
00114   vtkLineSource     *Line1Source;
00115   vtkLineSource     *Line2Source;
00116   vtkArcSource      *ArcSource;
00117   vtkPolyDataMapper *Line1Mapper;
00118   vtkPolyDataMapper *Line2Mapper;
00119   vtkPolyDataMapper *ArcMapper;
00120   vtkActor          *Ray1;
00121   vtkActor          *Ray2;
00122   vtkActor          *Arc;
00123   vtkFollower       *TextActor;
00124   vtkPolyDataMapper *TextMapper;
00125   vtkVectorText     *TextInput;
00126   double             Angle;
00127   bool               ScaleInitialized;
00128   double             TextPosition[3];
00129 
00130 private:
00131   vtkAngleRepresentation3D(const vtkAngleRepresentation3D&);  //Not implemented
00132   void operator=(const vtkAngleRepresentation3D&);  //Not implemented
00133 };
00134 
00135 #endif