VTK  9.0.1
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:
167  vtkArcPlotter();
168  ~vtkArcPlotter() override;
169 
171  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints* inPts, double n[3], vtkPoints* newPts,
172  double offset, double* range, double val);
173  int ProcessComponents(vtkIdType numPts, vtkPointData* pd);
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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkArcPlotter
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:59
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkArcPlotter::PlotComponent
int PlotComponent
Definition: vtkArcPlotter.h:177
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:31
vtkIdType
int vtkIdType
Definition: vtkType.h:338
VTK_PLOT_FIELD_DATA
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:52
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkArcPlotter::SetPlotModeToPlotVectors
void SetPlotModeToPlotVectors()
Definition: vtkArcPlotter.h:89
vtkX3D::range
@ range
Definition: vtkX3D.h:244
VTK_PLOT_TCOORDS
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:50
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkArcPlotter::Offset
double Offset
Definition: vtkArcPlotter.h:180
vtkArcPlotter::SetPlotModeToPlotTCoords
void SetPlotModeToPlotTCoords()
Definition: vtkArcPlotter.h:91
vtkPolyDataAlgorithm.h
VTK_PLOT_VECTORS
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:48
vtkX3D::offset
@ offset
Definition: vtkX3D.h:444
vtkArcPlotter::Camera
vtkCamera * Camera
Definition: vtkArcPlotter.h:175
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkArcPlotter::SetPlotModeToPlotNormals
void SetPlotModeToPlotNormals()
Definition: vtkArcPlotter.h:90
vtkArcPlotter::SetPlotModeToPlotTensors
void SetPlotModeToPlotTensors()
Definition: vtkArcPlotter.h:92
vtkArcPlotter::FieldDataArray
int FieldDataArray
Definition: vtkArcPlotter.h:183
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkArcPlotter::Radius
double Radius
Definition: vtkArcPlotter.h:178
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:45
vtkArcPlotter::SetPlotModeToPlotScalars
void SetPlotModeToPlotScalars()
Definition: vtkArcPlotter.h:88
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
VTK_PLOT_NORMALS
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:49
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkArcPlotter::SetPlotModeToPlotFieldData
void SetPlotModeToPlotFieldData()
Definition: vtkArcPlotter.h:93
VTK_PLOT_SCALARS
#define VTK_PLOT_SCALARS
Definition: vtkArcPlotter.h:47
vtkArcPlotter::UseDefaultNormal
vtkTypeBool UseDefaultNormal
Definition: vtkArcPlotter.h:182
vtkArcPlotter::PlotMode
int PlotMode
Definition: vtkArcPlotter.h:176
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
VTK_PLOT_TENSORS
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:51
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkArcPlotter::Height
double Height
Definition: vtkArcPlotter.h:179
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41