VTK  9.0.3
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 =========================================================================*/
41 #ifndef vtkArcPlotter_h
42 #define vtkArcPlotter_h
43 
44 #include "vtkPolyDataAlgorithm.h"
45 #include "vtkRenderingAnnotationModule.h" // For export macro
46 
47 #define VTK_PLOT_SCALARS 1
48 #define VTK_PLOT_VECTORS 2
49 #define VTK_PLOT_NORMALS 3
50 #define VTK_PLOT_TCOORDS 4
51 #define VTK_PLOT_TENSORS 5
52 #define VTK_PLOT_FIELD_DATA 6
53 
54 class vtkCamera;
55 class vtkDataArray;
56 class vtkPointData;
57 class vtkPoints;
58 
59 class VTKRENDERINGANNOTATION_EXPORT vtkArcPlotter : public vtkPolyDataAlgorithm
60 {
61 public:
66  static vtkArcPlotter* New();
67 
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
72 
76  virtual void SetCamera(vtkCamera*);
77  vtkGetObjectMacro(Camera, vtkCamera);
79 
81 
86  vtkSetMacro(PlotMode, int);
87  vtkGetMacro(PlotMode, int);
88  void SetPlotModeToPlotScalars() { this->SetPlotMode(VTK_PLOT_SCALARS); }
89  void SetPlotModeToPlotVectors() { this->SetPlotMode(VTK_PLOT_VECTORS); }
90  void SetPlotModeToPlotNormals() { this->SetPlotMode(VTK_PLOT_NORMALS); }
91  void SetPlotModeToPlotTCoords() { this->SetPlotMode(VTK_PLOT_TCOORDS); }
92  void SetPlotModeToPlotTensors() { this->SetPlotMode(VTK_PLOT_TENSORS); }
93  void SetPlotModeToPlotFieldData() { this->SetPlotMode(VTK_PLOT_FIELD_DATA); }
95 
97 
102  vtkSetMacro(PlotComponent, int);
103  vtkGetMacro(PlotComponent, int);
105 
107 
110  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
111  vtkGetMacro(Radius, double);
113 
115 
119  vtkSetClampMacro(Height, double, 0.0, VTK_FLOAT_MAX);
120  vtkGetMacro(Height, double);
122 
124 
128  vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
129  vtkGetMacro(Offset, double);
131 
133 
138  vtkSetMacro(UseDefaultNormal, vtkTypeBool);
139  vtkGetMacro(UseDefaultNormal, vtkTypeBool);
140  vtkBooleanMacro(UseDefaultNormal, vtkTypeBool);
142 
144 
148  vtkSetVector3Macro(DefaultNormal, float);
149  vtkGetVectorMacro(DefaultNormal, float, 3);
151 
153 
157  vtkSetClampMacro(FieldDataArray, int, 0, VTK_INT_MAX);
158  vtkGetMacro(FieldDataArray, int);
160 
164  vtkMTimeType GetMTime() override;
165 
166 protected:
168  ~vtkArcPlotter() override;
169 
171  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
172  double offset, double* range, double val);
174 
176  int PlotMode;
178  double Radius;
179  double Height;
180  double Offset;
181  float DefaultNormal[3];
184 
185 private:
186  vtkDataArray* Data;
187  double* DataRange;
188  double* Tuple;
189  int NumberOfComponents;
190  int ActiveComponent;
191  int StartComp;
192  int EndComp;
193 
194 private:
195  vtkArcPlotter(const vtkArcPlotter&) = delete;
196  void operator=(const vtkArcPlotter&) = delete;
197 };
198 
199 #endif
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:60
void SetPlotModeToPlotTCoords()
Definition: vtkArcPlotter.h:91
vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints *inPts, double n[3], vtkPoints *newPts, double offset, double *range, double val)
~vtkArcPlotter() override
void SetPlotModeToPlotFieldData()
Definition: vtkArcPlotter.h:93
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()
Definition: vtkArcPlotter.h:90
static vtkArcPlotter * New()
Instantiate with no default camera and plot mode set to VTK_SCALARS.
void SetPlotModeToPlotScalars()
Definition: vtkArcPlotter.h:88
vtkTypeBool UseDefaultNormal
vtkCamera * Camera
int ProcessComponents(vtkIdType numPts, vtkPointData *pd)
void SetPlotModeToPlotVectors()
Definition: vtkArcPlotter.h:89
void SetPlotModeToPlotTensors()
Definition: vtkArcPlotter.h:92
a virtual camera for 3D rendering
Definition: vtkCamera.h:46
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Definition: vtkPointData.h:32
represent and manipulate 3D points
Definition: vtkPoints.h:34
Superclass for algorithms that produce only polydata as output.
@ range
Definition: vtkX3D.h:244
@ offset
Definition: vtkX3D.h:444
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:48
#define VTK_PLOT_SCALARS
Definition: vtkArcPlotter.h:47
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:52
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:50
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:51
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:49
int vtkIdType
Definition: vtkType.h:338
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163