VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
38 
39 #define VTK_PLOT_SCALARS 1
40 #define VTK_PLOT_VECTORS 2
41 #define VTK_PLOT_NORMALS 3
42 #define VTK_PLOT_TCOORDS 4
43 #define VTK_PLOT_TENSORS 5
44 #define VTK_PLOT_FIELD_DATA 6
45 
46 VTK_ABI_NAMESPACE_BEGIN
47 class vtkCamera;
48 class vtkDataArray;
49 class vtkPointData;
50 class vtkPoints;
51 
52 class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkArcPlotter : public vtkPolyDataAlgorithm
53 {
54 public:
59  static vtkArcPlotter* New();
60 
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
65 
69  virtual void SetCamera(vtkCamera*);
70  vtkGetObjectMacro(Camera, vtkCamera);
72 
74 
79  vtkSetMacro(PlotMode, int);
80  vtkGetMacro(PlotMode, int);
81  void SetPlotModeToPlotScalars() { this->SetPlotMode(VTK_PLOT_SCALARS); }
82  void SetPlotModeToPlotVectors() { this->SetPlotMode(VTK_PLOT_VECTORS); }
83  void SetPlotModeToPlotNormals() { this->SetPlotMode(VTK_PLOT_NORMALS); }
84  void SetPlotModeToPlotTCoords() { this->SetPlotMode(VTK_PLOT_TCOORDS); }
85  void SetPlotModeToPlotTensors() { this->SetPlotMode(VTK_PLOT_TENSORS); }
86  void SetPlotModeToPlotFieldData() { this->SetPlotMode(VTK_PLOT_FIELD_DATA); }
88 
90 
95  vtkSetMacro(PlotComponent, int);
96  vtkGetMacro(PlotComponent, int);
98 
100 
103  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
104  vtkGetMacro(Radius, double);
106 
108 
112  vtkSetClampMacro(Height, double, 0.0, VTK_FLOAT_MAX);
113  vtkGetMacro(Height, double);
115 
117 
121  vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
122  vtkGetMacro(Offset, double);
124 
126 
131  vtkSetMacro(UseDefaultNormal, vtkTypeBool);
132  vtkGetMacro(UseDefaultNormal, vtkTypeBool);
133  vtkBooleanMacro(UseDefaultNormal, vtkTypeBool);
135 
137 
141  vtkSetVector3Macro(DefaultNormal, float);
142  vtkGetVectorMacro(DefaultNormal, float, 3);
144 
146 
150  vtkSetClampMacro(FieldDataArray, int, 0, VTK_INT_MAX);
151  vtkGetMacro(FieldDataArray, int);
153 
157  vtkMTimeType GetMTime() override;
158 
159 protected:
160  vtkArcPlotter();
161  ~vtkArcPlotter() override;
162 
164  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
165  double offset, double* range, double val);
166  int ProcessComponents(vtkIdType numPts, vtkPointData* pd);
167 
169  int PlotMode;
171  double Radius;
172  double Height;
173  double Offset;
174  float DefaultNormal[3];
177 
178 private:
179  vtkDataArray* Data;
180  double* DataRange;
181  double* Tuple;
182  int NumberOfComponents;
183  int ActiveComponent;
184  int StartComp;
185  int EndComp;
186 
187  vtkArcPlotter(const vtkArcPlotter&) = delete;
188  void operator=(const vtkArcPlotter&) = delete;
189 };
190 
191 VTK_ABI_NAMESPACE_END
192 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:30
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:192
void SetPlotModeToPlotTCoords()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:84
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:42
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:44
int vtkIdType
Definition: vtkType.h:363
void SetPlotModeToPlotFieldData()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:86
vtkCamera * Camera
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:40
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeBool UseDefaultNormal
#define VTK_FLOAT_MAX
Definition: vtkType.h:200
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:41
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:52
void SetPlotModeToPlotVectors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:82
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:43
void SetPlotModeToPlotTensors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:85
void SetPlotModeToPlotNormals()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:83
Store zero or more vtkInformation instances.
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:41
#define VTK_MARSHALAUTO
void SetPlotModeToPlotScalars()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:81
represent and manipulate 3D points
Definition: vtkPoints.h:30
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:39