VTK  9.2.20230527
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 =========================================================================*/
44 #ifndef vtkArcPlotter_h
45 #define vtkArcPlotter_h
46 
47 #include "vtkPolyDataAlgorithm.h"
48 #include "vtkRenderingAnnotationModule.h" // For export macro
49 
50 #define VTK_PLOT_SCALARS 1
51 #define VTK_PLOT_VECTORS 2
52 #define VTK_PLOT_NORMALS 3
53 #define VTK_PLOT_TCOORDS 4
54 #define VTK_PLOT_TENSORS 5
55 #define VTK_PLOT_FIELD_DATA 6
56 
57 VTK_ABI_NAMESPACE_BEGIN
58 class vtkCamera;
59 class vtkDataArray;
60 class vtkPointData;
61 class vtkPoints;
62 
63 class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
64 {
65 public:
70  static vtkArcPlotter* New();
71 
73  void PrintSelf(ostream& os, vtkIndent indent) override;
74 
76 
80  virtual void SetCamera(vtkCamera*);
81  vtkGetObjectMacro(Camera, vtkCamera);
83 
85 
90  vtkSetMacro(PlotMode, int);
91  vtkGetMacro(PlotMode, int);
92  void SetPlotModeToPlotScalars() { this->SetPlotMode(VTK_PLOT_SCALARS); }
93  void SetPlotModeToPlotVectors() { this->SetPlotMode(VTK_PLOT_VECTORS); }
94  void SetPlotModeToPlotNormals() { this->SetPlotMode(VTK_PLOT_NORMALS); }
95  void SetPlotModeToPlotTCoords() { this->SetPlotMode(VTK_PLOT_TCOORDS); }
96  void SetPlotModeToPlotTensors() { this->SetPlotMode(VTK_PLOT_TENSORS); }
97  void SetPlotModeToPlotFieldData() { this->SetPlotMode(VTK_PLOT_FIELD_DATA); }
99 
101 
106  vtkSetMacro(PlotComponent, int);
107  vtkGetMacro(PlotComponent, int);
109 
111 
114  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
115  vtkGetMacro(Radius, double);
117 
119 
123  vtkSetClampMacro(Height, double, 0.0, VTK_FLOAT_MAX);
124  vtkGetMacro(Height, double);
126 
128 
132  vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
133  vtkGetMacro(Offset, double);
135 
137 
142  vtkSetMacro(UseDefaultNormal, vtkTypeBool);
143  vtkGetMacro(UseDefaultNormal, vtkTypeBool);
144  vtkBooleanMacro(UseDefaultNormal, vtkTypeBool);
146 
148 
152  vtkSetVector3Macro(DefaultNormal, float);
153  vtkGetVectorMacro(DefaultNormal, float, 3);
155 
157 
161  vtkSetClampMacro(FieldDataArray, int, 0, VTK_INT_MAX);
162  vtkGetMacro(FieldDataArray, int);
164 
168  vtkMTimeType GetMTime() override;
169 
170 protected:
172  ~vtkArcPlotter() override;
173 
175  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
176  double offset, double* range, double val);
178 
180  int PlotMode;
182  double Radius;
183  double Height;
184  double Offset;
185  float DefaultNormal[3];
188 
189 private:
190  vtkDataArray* Data;
191  double* DataRange;
192  double* Tuple;
193  int NumberOfComponents;
194  int ActiveComponent;
195  int StartComp;
196  int EndComp;
197 
198  vtkArcPlotter(const vtkArcPlotter&) = delete;
199  void operator=(const vtkArcPlotter&) = delete;
200 };
201 
202 VTK_ABI_NAMESPACE_END
203 #endif
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:64
void SetPlotModeToPlotTCoords()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:95
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:97
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:94
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:92
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:93
void SetPlotModeToPlotTensors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
Definition: vtkArcPlotter.h:96
a virtual camera for 3D rendering
Definition: vtkCamera.h:162
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:166
a simple class to control print indentation
Definition: vtkIndent.h:120
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Definition: vtkPointData.h:151
represent and manipulate 3D points
Definition: vtkPoints.h:150
Superclass for algorithms that produce only polydata as output.
@ range
Definition: vtkX3D.h:250
@ offset
Definition: vtkX3D.h:450
int vtkTypeBool
Definition: vtkABI.h:71
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:51
#define VTK_PLOT_SCALARS
Definition: vtkArcPlotter.h:50
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:55
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:53
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:54
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:52
int vtkIdType
Definition: vtkType.h:327
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:282
#define VTK_INT_MAX
Definition: vtkType.h:156
#define VTK_FLOAT_MAX
Definition: vtkType.h:164