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 =========================================================================*/
41 #ifndef vtkArcPlotter_h
42 #define vtkArcPlotter_h
43 
44 #include "vtkRenderingAnnotationModule.h" // For export macro
45 #include "vtkPolyDataAlgorithm.h"
46 
47 #define VTK_PLOT_SCALARS 1
48 #define VTK_PLOT_VECTORS 2
49 #define VTK_PLOT_NORMALS 3
50 #define VTK_PLOT_TCOORDS 4
51 #define VTK_PLOT_TENSORS 5
52 #define VTK_PLOT_FIELD_DATA 6
53 
54 class vtkCamera;
55 class vtkDataArray;
56 class vtkPointData;
57 class vtkPoints;
58 
59 class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
60 {
61 public:
66  static vtkArcPlotter *New();
67 
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
72 
76  virtual void SetCamera(vtkCamera*);
77  vtkGetObjectMacro(Camera,vtkCamera);
79 
81 
86  vtkSetMacro(PlotMode, int);
87  vtkGetMacro(PlotMode, int);
88  void SetPlotModeToPlotScalars() {this->SetPlotMode(VTK_PLOT_SCALARS);};
89  void SetPlotModeToPlotVectors() {this->SetPlotMode(VTK_PLOT_VECTORS);};
90  void SetPlotModeToPlotNormals() {this->SetPlotMode(VTK_PLOT_NORMALS);};
91  void SetPlotModeToPlotTCoords() {this->SetPlotMode(VTK_PLOT_TCOORDS);};
92  void SetPlotModeToPlotTensors() {this->SetPlotMode(VTK_PLOT_TENSORS);};
94  {this->SetPlotMode(VTK_PLOT_FIELD_DATA);};
96 
98 
103  vtkSetMacro(PlotComponent,int);
104  vtkGetMacro(PlotComponent,int);
106 
108 
111  vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
112  vtkGetMacro(Radius,double);
114 
116 
120  vtkSetClampMacro(Height,double,0.0,VTK_FLOAT_MAX);
121  vtkGetMacro(Height,double);
123 
125 
129  vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
130  vtkGetMacro(Offset, double);
132 
134 
139  vtkSetMacro(UseDefaultNormal,vtkTypeBool);
140  vtkGetMacro(UseDefaultNormal,vtkTypeBool);
141  vtkBooleanMacro(UseDefaultNormal,vtkTypeBool);
143 
145 
149  vtkSetVector3Macro(DefaultNormal,float);
150  vtkGetVectorMacro(DefaultNormal,float,3);
152 
154 
158  vtkSetClampMacro(FieldDataArray,int,0,VTK_INT_MAX);
159  vtkGetMacro(FieldDataArray,int);
161 
165  vtkMTimeType GetMTime() override;
166 
167 protected:
168  vtkArcPlotter();
169  ~vtkArcPlotter() override;
170 
172  int OffsetPoint(vtkIdType ptId, vtkPoints *inPts, double n[3],
173  vtkPoints *newPts, double offset,
174  double *range, double val);
175  int ProcessComponents(vtkIdType numPts, vtkPointData *pd);
176 
178  int PlotMode;
180  double Radius;
181  double Height;
182  double Offset;
183  float DefaultNormal[3];
186 
187 private:
188  vtkDataArray *Data;
189  double *DataRange;
190  double *Tuple;
191  int NumberOfComponents;
192  int ActiveComponent;
193  int StartComp;
194  int EndComp;
195 
196 private:
197  vtkArcPlotter(const vtkArcPlotter&) = delete;
198  void operator=(const vtkArcPlotter&) = delete;
199 };
200 
201 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:31
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:157
void SetPlotModeToPlotTCoords()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:91
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:50
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:52
int vtkIdType
Definition: vtkType.h:345
void SetPlotModeToPlotFieldData()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:93
vtkCamera * Camera
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:48
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeBool UseDefaultNormal
#define VTK_FLOAT_MAX
Definition: vtkType.h:165
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:59
void SetPlotModeToPlotVectors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:89
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual vtkMTimeType GetMTime()
Return this object's modified time.
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:51
void SetPlotModeToPlotTensors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:92
void SetPlotModeToPlotNormals()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:90
Store zero or more vtkInformation instances.
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:49
void SetPlotModeToPlotScalars()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:88
represent and manipulate 3D points
Definition: vtkPoints.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_PLOT_SCALARS
Definition: vtkArcPlotter.h:47