VTK  9.3.0
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
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
45VTK_ABI_NAMESPACE_BEGIN
46class vtkCamera;
47class vtkDataArray;
48class vtkPointData;
49class vtkPoints;
50
51class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
52{
53public:
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
157
158protected:
160 ~vtkArcPlotter() override;
161
163 vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
164 double offset, double* range, double val);
166
170 double Radius;
171 double Height;
172 double Offset;
173 float DefaultNormal[3];
176
177private:
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
190VTK_ABI_NAMESPACE_END
191#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:41
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:29
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:29
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