VTK  9.0.1
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 "vtkPolyDataAlgorithm.h"
45 #include "vtkRenderingAnnotationModule.h" // For export macro
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); }
93  void SetPlotModeToPlotFieldData() { this->SetPlotMode(VTK_PLOT_FIELD_DATA); }
95 
97 
102  vtkSetMacro(PlotComponent, int);
103  vtkGetMacro(PlotComponent, int);
105 
107 
110  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
111  vtkGetMacro(Radius, double);
113 
115 
119  vtkSetClampMacro(Height, double, 0.0, VTK_FLOAT_MAX);
120  vtkGetMacro(Height, double);
122 
124 
128  vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
129  vtkGetMacro(Offset, double);
131 
133 
138  vtkSetMacro(UseDefaultNormal, vtkTypeBool);
139  vtkGetMacro(UseDefaultNormal, vtkTypeBool);
140  vtkBooleanMacro(UseDefaultNormal, vtkTypeBool);
142 
144 
148  vtkSetVector3Macro(DefaultNormal, float);
149  vtkGetVectorMacro(DefaultNormal, float, 3);
151 
153 
157  vtkSetClampMacro(FieldDataArray, int, 0, VTK_INT_MAX);
158  vtkGetMacro(FieldDataArray, int);
160 
164  vtkMTimeType GetMTime() override;
165 
166 protected:
167  vtkArcPlotter();
168  ~vtkArcPlotter() override;
169 
171  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
172  double offset, double* range, double val);
173  int ProcessComponents(vtkIdType numPts, vtkPointData* pd);
174 
176  int PlotMode;
178  double Radius;
179  double Height;
180  double Offset;
181  float DefaultNormal[3];
184 
185 private:
186  vtkDataArray* Data;
187  double* DataRange;
188  double* Tuple;
189  int NumberOfComponents;
190  int ActiveComponent;
191  int StartComp;
192  int EndComp;
193 
194 private:
195  vtkArcPlotter(const vtkArcPlotter&) = delete;
196  void operator=(const vtkArcPlotter&) = delete;
197 };
198 
199 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:31
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:155
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:338
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:163
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:45
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:49
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