VTK  9.3.20240911
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
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
46VTK_ABI_NAMESPACE_BEGIN
47class vtkCamera;
48class vtkDataArray;
49class vtkPointData;
50class vtkPoints;
51
52class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkArcPlotter : public vtkPolyDataAlgorithm
53{
54public:
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
158
159protected:
161 ~vtkArcPlotter() override;
162
164 vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
165 double offset, double* range, double val);
167
171 double Radius;
172 double Height;
173 double Offset;
174 float DefaultNormal[3];
177
178private:
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
191VTK_ABI_NAMESPACE_END
192#endif
plot data along an arbitrary polyline
void SetPlotModeToPlotTCoords()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
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.
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.
void SetPlotModeToPlotScalars()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
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.
static vtkArcPlotter * New()
Instantiate with no default camera and plot mode set to VTK_SCALARS.
void SetPlotModeToPlotTensors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data.
a virtual camera for 3D rendering
Definition vtkCamera.h:151
abstract superclass for arrays of numeric data
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
represent and manipulate 3D points
Definition vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_PLOT_VECTORS
#define VTK_PLOT_SCALARS
#define VTK_PLOT_FIELD_DATA
#define VTK_PLOT_TCOORDS
#define VTK_PLOT_TENSORS
#define VTK_PLOT_NORMALS
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
#define VTK_MARSHALAUTO