VTK  9.3.1
vtkArcPlotter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkArcPlotter_h
33 #define vtkArcPlotter_h
34 
35 #include "vtkPolyDataAlgorithm.h"
36 #include "vtkRenderingAnnotationModule.h" // For export macro
37 
38 #define VTK_PLOT_SCALARS 1
39 #define VTK_PLOT_VECTORS 2
40 #define VTK_PLOT_NORMALS 3
41 #define VTK_PLOT_TCOORDS 4
42 #define VTK_PLOT_TENSORS 5
43 #define VTK_PLOT_FIELD_DATA 6
44 
45 VTK_ABI_NAMESPACE_BEGIN
46 class vtkCamera;
47 class vtkDataArray;
48 class vtkPointData;
49 class vtkPoints;
50 
51 class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
52 {
53 public:
58  static vtkArcPlotter* New();
59 
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
68  virtual void SetCamera(vtkCamera*);
69  vtkGetObjectMacro(Camera, vtkCamera);
71 
73 
78  vtkSetMacro(PlotMode, int);
79  vtkGetMacro(PlotMode, int);
80  void SetPlotModeToPlotScalars() { this->SetPlotMode(VTK_PLOT_SCALARS); }
81  void SetPlotModeToPlotVectors() { this->SetPlotMode(VTK_PLOT_VECTORS); }
82  void SetPlotModeToPlotNormals() { this->SetPlotMode(VTK_PLOT_NORMALS); }
83  void SetPlotModeToPlotTCoords() { this->SetPlotMode(VTK_PLOT_TCOORDS); }
84  void SetPlotModeToPlotTensors() { this->SetPlotMode(VTK_PLOT_TENSORS); }
85  void SetPlotModeToPlotFieldData() { this->SetPlotMode(VTK_PLOT_FIELD_DATA); }
87 
89 
94  vtkSetMacro(PlotComponent, int);
95  vtkGetMacro(PlotComponent, int);
97 
99 
102  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
103  vtkGetMacro(Radius, double);
105 
107 
111  vtkSetClampMacro(Height, double, 0.0, VTK_FLOAT_MAX);
112  vtkGetMacro(Height, double);
114 
116 
120  vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
121  vtkGetMacro(Offset, double);
123 
125 
130  vtkSetMacro(UseDefaultNormal, vtkTypeBool);
131  vtkGetMacro(UseDefaultNormal, vtkTypeBool);
132  vtkBooleanMacro(UseDefaultNormal, vtkTypeBool);
134 
136 
140  vtkSetVector3Macro(DefaultNormal, float);
141  vtkGetVectorMacro(DefaultNormal, float, 3);
143 
145 
149  vtkSetClampMacro(FieldDataArray, int, 0, VTK_INT_MAX);
150  vtkGetMacro(FieldDataArray, int);
152 
156  vtkMTimeType GetMTime() override;
157 
158 protected:
159  vtkArcPlotter();
160  ~vtkArcPlotter() override;
161 
163  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
164  double offset, double* range, double val);
165  int ProcessComponents(vtkIdType numPts, vtkPointData* pd);
166 
168  int PlotMode;
170  double Radius;
171  double Height;
172  double Offset;
173  float DefaultNormal[3];
176 
177 private:
178  vtkDataArray* Data;
179  double* DataRange;
180  double* Tuple;
181  int NumberOfComponents;
182  int ActiveComponent;
183  int StartComp;
184  int EndComp;
185 
186  vtkArcPlotter(const vtkArcPlotter&) = delete;
187  void operator=(const vtkArcPlotter&) = delete;
188 };
189 
190 VTK_ABI_NAMESPACE_END
191 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:29
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:144
void SetPlotModeToPlotTCoords()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:83
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:41
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:43
int vtkIdType
Definition: vtkType.h:315
void SetPlotModeToPlotFieldData()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:85
vtkCamera * Camera
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:39
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeBool UseDefaultNormal
#define VTK_FLOAT_MAX
Definition: vtkType.h:152
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual camera for 3D rendering
Definition: vtkCamera.h:40
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:51
void SetPlotModeToPlotVectors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:81
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual vtkMTimeType GetMTime()
Return this object's modified time.
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:42
void SetPlotModeToPlotTensors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:84
void SetPlotModeToPlotNormals()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:82
Store zero or more vtkInformation instances.
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:40
void SetPlotModeToPlotScalars()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:80
represent and manipulate 3D points
Definition: vtkPoints.h:28
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:38