VTK
vtkArcPlotter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkArcPlotter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
43 #ifndef __vtkArcPlotter_h
44 #define __vtkArcPlotter_h
45 
46 #include "vtkPolyDataAlgorithm.h"
47 
48 #define VTK_PLOT_SCALARS 1
49 #define VTK_PLOT_VECTORS 2
50 #define VTK_PLOT_NORMALS 3
51 #define VTK_PLOT_TCOORDS 4
52 #define VTK_PLOT_TENSORS 5
53 #define VTK_PLOT_FIELD_DATA 6
54 
55 class vtkCamera;
56 class vtkDataArray;
57 class vtkPointData;
58 class vtkPoints;
59 
61 {
62 public:
64  static vtkArcPlotter *New();
65 
67  void PrintSelf(ostream& os, vtkIndent indent);
68 
70 
72  virtual void SetCamera(vtkCamera*);
73  vtkGetObjectMacro(Camera,vtkCamera);
75 
77 
81  vtkSetMacro(PlotMode, int);
82  vtkGetMacro(PlotMode, int);
83  void SetPlotModeToPlotScalars() {this->SetPlotMode(VTK_PLOT_SCALARS);};
84  void SetPlotModeToPlotVectors() {this->SetPlotMode(VTK_PLOT_VECTORS);};
85  void SetPlotModeToPlotNormals() {this->SetPlotMode(VTK_PLOT_NORMALS);};
86  void SetPlotModeToPlotTCoords() {this->SetPlotMode(VTK_PLOT_TCOORDS);};
87  void SetPlotModeToPlotTensors() {this->SetPlotMode(VTK_PLOT_TENSORS);};
88  void SetPlotModeToPlotFieldData()
89  {this->SetPlotMode(VTK_PLOT_FIELD_DATA);};
91 
93 
96  vtkSetMacro(PlotComponent,int);
97  vtkGetMacro(PlotComponent,int);
99 
101 
102  vtkSetClampMacro(Radius,double,0.0,VTK_LARGE_FLOAT);
103  vtkGetMacro(Radius,double);
105 
107 
109  vtkSetClampMacro(Height,double,0.0,VTK_LARGE_FLOAT);
110  vtkGetMacro(Height,double);
112 
114 
117  vtkSetClampMacro(Offset, double, 0.0, VTK_LARGE_FLOAT);
118  vtkGetMacro(Offset, double);
120 
122 
125  vtkSetMacro(UseDefaultNormal,int);
126  vtkGetMacro(UseDefaultNormal,int);
127  vtkBooleanMacro(UseDefaultNormal,int);
129 
131 
133  vtkSetVector3Macro(DefaultNormal,float);
134  vtkGetVectorMacro(DefaultNormal,float,3);
136 
138 
140  vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
141  vtkGetMacro(FieldDataArray,int);
143 
145  unsigned long GetMTime();
146 
147 protected:
148  vtkArcPlotter();
149  ~vtkArcPlotter();
150 
152  int OffsetPoint(vtkIdType ptId, vtkPoints *inPts, double n[3],
153  vtkPoints *newPts, double offset,
154  double *range, double val);
155  int ProcessComponents(vtkIdType numPts, vtkPointData *pd);
156 
158  int PlotMode;
160  double Radius;
161  double Height;
162  double Offset;
163  float DefaultNormal[3];
166 
167 private:
168  vtkDataArray *Data;
169  double *DataRange;
170  double *Tuple;
171  int NumberOfComponents;
172  int ActiveComponent;
173  int StartComp;
174  int EndComp;
175 
176 private:
177  vtkArcPlotter(const vtkArcPlotter&); // Not implemented.
178  void operator=(const vtkArcPlotter&); // Not implemented.
179 };
180 
181 #endif