VTK: Rendering/Annotation/vtkArcPlotter.h Source File

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