VTK
dox/Rendering/Annotation/vtkArcPlotter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkArcPlotter.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 =========================================================================*/
00043 #ifndef __vtkArcPlotter_h
00044 #define __vtkArcPlotter_h
00045 
00046 #include "vtkRenderingAnnotationModule.h" // For export macro
00047 #include "vtkPolyDataAlgorithm.h"
00048 
00049 #define VTK_PLOT_SCALARS    1
00050 #define VTK_PLOT_VECTORS    2
00051 #define VTK_PLOT_NORMALS    3
00052 #define VTK_PLOT_TCOORDS    4
00053 #define VTK_PLOT_TENSORS    5
00054 #define VTK_PLOT_FIELD_DATA 6
00055 
00056 class vtkCamera;
00057 class vtkDataArray;
00058 class vtkPointData;
00059 class vtkPoints;
00060 
00061 class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
00062 {
00063 public:
00065   static vtkArcPlotter *New();
00066 
00067   vtkTypeMacro(vtkArcPlotter,vtkPolyDataAlgorithm);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069 
00071 
00073   virtual void SetCamera(vtkCamera*);
00074   vtkGetObjectMacro(Camera,vtkCamera);
00076 
00078 
00082   vtkSetMacro(PlotMode, int);
00083   vtkGetMacro(PlotMode, int);
00084   void SetPlotModeToPlotScalars() {this->SetPlotMode(VTK_PLOT_SCALARS);};
00085   void SetPlotModeToPlotVectors() {this->SetPlotMode(VTK_PLOT_VECTORS);};
00086   void SetPlotModeToPlotNormals() {this->SetPlotMode(VTK_PLOT_NORMALS);};
00087   void SetPlotModeToPlotTCoords() {this->SetPlotMode(VTK_PLOT_TCOORDS);};
00088   void SetPlotModeToPlotTensors() {this->SetPlotMode(VTK_PLOT_TENSORS);};
00089   void SetPlotModeToPlotFieldData()
00090             {this->SetPlotMode(VTK_PLOT_FIELD_DATA);};
00092 
00094 
00097   vtkSetMacro(PlotComponent,int);
00098   vtkGetMacro(PlotComponent,int);
00100 
00102 
00103   vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
00104   vtkGetMacro(Radius,double);
00106 
00108 
00110   vtkSetClampMacro(Height,double,0.0,VTK_FLOAT_MAX);
00111   vtkGetMacro(Height,double);
00113 
00115 
00118   vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
00119   vtkGetMacro(Offset, double);
00121 
00123 
00126   vtkSetMacro(UseDefaultNormal,int);
00127   vtkGetMacro(UseDefaultNormal,int);
00128   vtkBooleanMacro(UseDefaultNormal,int);
00130 
00132 
00134   vtkSetVector3Macro(DefaultNormal,float);
00135   vtkGetVectorMacro(DefaultNormal,float,3);
00137 
00139 
00141   vtkSetClampMacro(FieldDataArray,int,0,VTK_INT_MAX);
00142   vtkGetMacro(FieldDataArray,int);
00144 
00146   unsigned long GetMTime();
00147 
00148 protected:
00149   vtkArcPlotter();
00150   ~vtkArcPlotter();
00151 
00152   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00153   int  OffsetPoint(vtkIdType ptId, vtkPoints *inPts, double n[3],
00154                    vtkPoints *newPts, double offset,
00155                    double *range, double val);
00156   int  ProcessComponents(vtkIdType numPts, vtkPointData *pd);
00157 
00158   vtkCamera *Camera;
00159   int       PlotMode;
00160   int       PlotComponent;
00161   double     Radius;
00162   double     Height;
00163   double     Offset;
00164   float     DefaultNormal[3];
00165   int       UseDefaultNormal;
00166   int       FieldDataArray;
00167 
00168 private:
00169   vtkDataArray *Data;
00170   double    *DataRange;
00171   double   *Tuple;
00172   int       NumberOfComponents;
00173   int       ActiveComponent;
00174   int       StartComp;
00175   int       EndComp;
00176 
00177 private:
00178   vtkArcPlotter(const vtkArcPlotter&);  // Not implemented.
00179   void operator=(const vtkArcPlotter&);  // Not implemented.
00180 };
00181 
00182 #endif