Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkArcPlotter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkArcPlotter.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 =========================================================================*/
00055 #ifndef __vtkArcPlotter_h
00056 #define __vtkArcPlotter_h
00057 
00058 #include "vtkPolyDataToPolyDataFilter.h"
00059 
00060 #define VTK_PLOT_SCALARS    1
00061 #define VTK_PLOT_VECTORS    2
00062 #define VTK_PLOT_NORMALS    3
00063 #define VTK_PLOT_TCOORDS    4
00064 #define VTK_PLOT_TENSORS    5
00065 #define VTK_PLOT_FIELD_DATA 6
00066 
00067 class vtkCamera;
00068 class vtkDataArray;
00069 class vtkPointData;
00070 class vtkPoints;
00071 
00072 class VTK_HYBRID_EXPORT vtkArcPlotter : public vtkPolyDataToPolyDataFilter 
00073 {
00074 public:
00076   static vtkArcPlotter *New();
00077 
00078   vtkTypeRevisionMacro(vtkArcPlotter,vtkPolyDataToPolyDataFilter);
00079   void PrintSelf(ostream& os, vtkIndent indent);
00080 
00082 
00084   virtual void SetCamera(vtkCamera*);
00085   vtkGetObjectMacro(Camera,vtkCamera);
00087 
00089 
00093   vtkSetMacro(PlotMode, int);
00094   vtkGetMacro(PlotMode, int);
00095   void SetPlotModeToPlotScalars() {this->SetPlotMode(VTK_PLOT_SCALARS);};
00096   void SetPlotModeToPlotVectors() {this->SetPlotMode(VTK_PLOT_VECTORS);};
00097   void SetPlotModeToPlotNormals() {this->SetPlotMode(VTK_PLOT_NORMALS);};
00098   void SetPlotModeToPlotTCoords() {this->SetPlotMode(VTK_PLOT_TCOORDS);};
00099   void SetPlotModeToPlotTensors() {this->SetPlotMode(VTK_PLOT_TENSORS);};
00100   void SetPlotModeToPlotFieldData()
00101             {this->SetPlotMode(VTK_PLOT_FIELD_DATA);};
00103 
00105 
00108   vtkSetMacro(PlotComponent,int);
00109   vtkGetMacro(PlotComponent,int);
00111 
00113 
00114   vtkSetClampMacro(Radius,double,0.0,VTK_LARGE_FLOAT);
00115   vtkGetMacro(Radius,double);
00117 
00119 
00121   vtkSetClampMacro(Height,double,0.0,VTK_LARGE_FLOAT);
00122   vtkGetMacro(Height,double);
00124 
00126 
00129   vtkSetClampMacro(Offset, double, 0.0, VTK_LARGE_FLOAT);
00130   vtkGetMacro(Offset, double);
00132 
00134 
00137   vtkSetMacro(UseDefaultNormal,int);
00138   vtkGetMacro(UseDefaultNormal,int);
00139   vtkBooleanMacro(UseDefaultNormal,int);
00141 
00143 
00145   vtkSetVector3Macro(DefaultNormal,float);
00146   vtkGetVectorMacro(DefaultNormal,float,3);
00148 
00150 
00152   vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
00153   vtkGetMacro(FieldDataArray,int);
00155 
00157   unsigned long GetMTime();
00158 
00159 protected:
00160   vtkArcPlotter();
00161   ~vtkArcPlotter();
00162 
00163   void Execute();
00164   int  OffsetPoint(vtkIdType ptId, vtkPoints *inPts, double n[3],
00165                    vtkPoints *newPts, double offset, 
00166                    double *range, double val);
00167   int  ProcessComponents(vtkIdType numPts, vtkPointData *pd);
00168 
00169   vtkCamera *Camera;
00170   int       PlotMode;
00171   int       PlotComponent;
00172   double     Radius;
00173   double     Height;
00174   double     Offset;
00175   float     DefaultNormal[3];
00176   int       UseDefaultNormal;
00177   int       FieldDataArray;
00178   
00179 private:
00180   vtkDataArray *Data;
00181   double    *DataRange;
00182   double   *Tuple;
00183   int       NumberOfComponents;
00184   int       ActiveComponent;
00185   int       StartComp;
00186   int       EndComp;
00187   
00188 private:
00189   vtkArcPlotter(const vtkArcPlotter&);  // Not implemented.
00190   void operator=(const vtkArcPlotter&);  // Not implemented.
00191 };
00192 
00193 #endif