VTK  9.3.20240327
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:
160  ~vtkArcPlotter() override;
161 
163  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
164  double offset, double* range, double val);
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
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:52
void SetPlotModeToPlotTCoords()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:83
vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints *inPts, double n[3], vtkPoints *newPts, double offset, double *range, double val)
~vtkArcPlotter() override
void SetPlotModeToPlotFieldData()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:85
vtkMTimeType GetMTime() override
New GetMTime because of camera dependency.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetCamera(vtkCamera *)
Specify a camera used to orient the plot along the arc.
void SetPlotModeToPlotNormals()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:82
static vtkArcPlotter * New()
Instantiate with no default camera and plot mode set to VTK_SCALARS.
void SetPlotModeToPlotScalars()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:80
vtkTypeBool UseDefaultNormal
vtkCamera * Camera
int ProcessComponents(vtkIdType numPts, vtkPointData *pd)
void SetPlotModeToPlotVectors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:81
void SetPlotModeToPlotTensors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:84
a virtual camera for 3D rendering
Definition: vtkCamera.h:150
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:154
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Definition: vtkPointData.h:139
represent and manipulate 3D points
Definition: vtkPoints.h:138
Superclass for algorithms that produce only polydata as output.
@ range
Definition: vtkX3D.h:238
@ offset
Definition: vtkX3D.h:438
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:39
#define VTK_PLOT_SCALARS
Definition: vtkArcPlotter.h:38
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:43
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:41
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:42
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:40
int vtkIdType
Definition: vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_INT_MAX
Definition: vtkType.h:144
#define VTK_FLOAT_MAX
Definition: vtkType.h:152