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 
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 class vtkCamera;
58 class vtkDataArray;
59 class vtkPointData;
60 class vtkPoints;
61 
62 class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
63 {
64 public:
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 
167  vtkMTimeType GetMTime() override;
168 
169 protected:
170  vtkArcPlotter();
171  ~vtkArcPlotter() override;
172 
174  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
175  double offset, double* range, double val);
176  int ProcessComponents(vtkIdType numPts, vtkPointData* pd);
177 
179  int PlotMode;
181  double Radius;
182  double Height;
183  double Offset;
184  float DefaultNormal[3];
187 
188 private:
189  vtkDataArray* Data;
190  double* DataRange;
191  double* Tuple;
192  int NumberOfComponents;
193  int ActiveComponent;
194  int StartComp;
195  int EndComp;
196 
197 private:
198  vtkArcPlotter(const vtkArcPlotter&) = delete;
199  void operator=(const vtkArcPlotter&) = delete;
200 };
201 
202 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:41
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:155
void SetPlotModeToPlotTCoords()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:94
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:53
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:55
int vtkIdType
Definition: vtkType.h:332
void SetPlotModeToPlotFieldData()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:96
vtkCamera * Camera
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:51
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeBool UseDefaultNormal
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:62
void SetPlotModeToPlotVectors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:92
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
virtual vtkMTimeType GetMTime()
Return this object's modified time.
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:54
void SetPlotModeToPlotTensors()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:95
void SetPlotModeToPlotNormals()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:93
Store zero or more vtkInformation instances.
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:52
void SetPlotModeToPlotScalars()
Specify which data to plot: scalars, vectors, normals, texture coords, tensors, or field data...
Definition: vtkArcPlotter.h:91
represent and manipulate 3D points
Definition: vtkPoints.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_PLOT_SCALARS
Definition: vtkArcPlotter.h:50