VTK  9.2.6
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
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
57class vtkCamera;
58class vtkDataArray;
59class vtkPointData;
60class vtkPoints;
61
62class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
63{
64public:
69 static vtkArcPlotter* New();
70
72 void PrintSelf(ostream& os, vtkIndent indent) override;
73
75
79 virtual void SetCamera(vtkCamera*);
80 vtkGetObjectMacro(Camera, vtkCamera);
82
84
89 vtkSetMacro(PlotMode, int);
90 vtkGetMacro(PlotMode, int);
91 void SetPlotModeToPlotScalars() { this->SetPlotMode(VTK_PLOT_SCALARS); }
92 void SetPlotModeToPlotVectors() { this->SetPlotMode(VTK_PLOT_VECTORS); }
93 void SetPlotModeToPlotNormals() { this->SetPlotMode(VTK_PLOT_NORMALS); }
94 void SetPlotModeToPlotTCoords() { this->SetPlotMode(VTK_PLOT_TCOORDS); }
95 void SetPlotModeToPlotTensors() { this->SetPlotMode(VTK_PLOT_TENSORS); }
96 void SetPlotModeToPlotFieldData() { this->SetPlotMode(VTK_PLOT_FIELD_DATA); }
98
100
105 vtkSetMacro(PlotComponent, int);
106 vtkGetMacro(PlotComponent, int);
108
110
113 vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
114 vtkGetMacro(Radius, double);
116
118
122 vtkSetClampMacro(Height, double, 0.0, VTK_FLOAT_MAX);
123 vtkGetMacro(Height, double);
125
127
131 vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
132 vtkGetMacro(Offset, double);
134
136
141 vtkSetMacro(UseDefaultNormal, vtkTypeBool);
142 vtkGetMacro(UseDefaultNormal, vtkTypeBool);
143 vtkBooleanMacro(UseDefaultNormal, vtkTypeBool);
145
147
151 vtkSetVector3Macro(DefaultNormal, float);
152 vtkGetVectorMacro(DefaultNormal, float, 3);
154
156
160 vtkSetClampMacro(FieldDataArray, int, 0, VTK_INT_MAX);
161 vtkGetMacro(FieldDataArray, int);
163
168
169protected:
171 ~vtkArcPlotter() override;
172
174 vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
175 double offset, double* range, double val);
177
181 double Radius;
182 double Height;
183 double Offset;
184 float DefaultNormal[3];
187
188private:
189 vtkDataArray* Data;
190 double* DataRange;
191 double* Tuple;
192 int NumberOfComponents;
193 int ActiveComponent;
194 int StartComp;
195 int EndComp;
196
197private:
198 vtkArcPlotter(const vtkArcPlotter&) = delete;
199 void operator=(const vtkArcPlotter&) = delete;
200};
201
202#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:52
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:40
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:40
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition vtkABI.h:69
#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:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_INT_MAX
Definition vtkType.h:155
#define VTK_FLOAT_MAX
Definition vtkType.h:163