VTK
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 "vtkRenderingAnnotationModule.h" // For export macro
48 #include "vtkPolyDataAlgorithm.h"
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);};
97  {this->SetPlotMode(VTK_PLOT_FIELD_DATA);};
99 
101 
106  vtkSetMacro(PlotComponent,int);
107  vtkGetMacro(PlotComponent,int);
109 
111 
114  vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
115  vtkGetMacro(Radius,double);
117 
119 
123  vtkSetClampMacro(Height,double,0.0,VTK_FLOAT_MAX);
124  vtkGetMacro(Height,double);
126 
128 
132  vtkSetClampMacro(Offset, double, 0.0, VTK_FLOAT_MAX);
133  vtkGetMacro(Offset, double);
135 
137 
142  vtkSetMacro(UseDefaultNormal,vtkTypeBool);
143  vtkGetMacro(UseDefaultNormal,vtkTypeBool);
144  vtkBooleanMacro(UseDefaultNormal,vtkTypeBool);
146 
148 
152  vtkSetVector3Macro(DefaultNormal,float);
153  vtkGetVectorMacro(DefaultNormal,float,3);
155 
157 
161  vtkSetClampMacro(FieldDataArray,int,0,VTK_INT_MAX);
162  vtkGetMacro(FieldDataArray,int);
164 
168  vtkMTimeType GetMTime() override;
169 
170 protected:
171  vtkArcPlotter();
172  ~vtkArcPlotter() override;
173 
175  vtkIdType OffsetPoint(vtkIdType ptId, vtkPoints *inPts, double n[3],
176  vtkPoints *newPts, double offset,
177  double *range, double val);
178  int ProcessComponents(vtkIdType numPts, vtkPointData *pd);
179 
181  int PlotMode;
183  double Radius;
184  double Height;
185  double Offset;
186  float DefaultNormal[3];
189 
190 private:
191  vtkDataArray *Data;
192  double *DataRange;
193  double *Tuple;
194  int NumberOfComponents;
195  int ActiveComponent;
196  int StartComp;
197  int EndComp;
198 
199 private:
200  vtkArcPlotter(const vtkArcPlotter&) = delete;
201  void operator=(const vtkArcPlotter&) = delete;
202 };
203 
204 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkArcPlotter
plot data along an arbitrary polyline
Definition: vtkArcPlotter.h:62
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:159
vtkArcPlotter::PlotComponent
int PlotComponent
Definition: vtkArcPlotter.h:182
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:347
VTK_PLOT_FIELD_DATA
#define VTK_PLOT_FIELD_DATA
Definition: vtkArcPlotter.h:55
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkArcPlotter::SetPlotModeToPlotVectors
void SetPlotModeToPlotVectors()
Definition: vtkArcPlotter.h:92
vtkX3D::range
Definition: vtkX3D.h:238
VTK_PLOT_TCOORDS
#define VTK_PLOT_TCOORDS
Definition: vtkArcPlotter.h:53
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
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:185
vtkArcPlotter::SetPlotModeToPlotTCoords
void SetPlotModeToPlotTCoords()
Definition: vtkArcPlotter.h:94
vtkPolyDataAlgorithm.h
VTK_PLOT_VECTORS
#define VTK_PLOT_VECTORS
Definition: vtkArcPlotter.h:51
vtkX3D::offset
Definition: vtkX3D.h:438
vtkArcPlotter::Camera
vtkCamera * Camera
Definition: vtkArcPlotter.h:180
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:93
vtkArcPlotter::SetPlotModeToPlotTensors
void SetPlotModeToPlotTensors()
Definition: vtkArcPlotter.h:95
vtkArcPlotter::FieldDataArray
int FieldDataArray
Definition: vtkArcPlotter.h:188
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkArcPlotter::Radius
double Radius
Definition: vtkArcPlotter.h:183
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
vtkArcPlotter::SetPlotModeToPlotScalars
void SetPlotModeToPlotScalars()
Definition: vtkArcPlotter.h:91
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:167
VTK_PLOT_NORMALS
#define VTK_PLOT_NORMALS
Definition: vtkArcPlotter.h:52
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkArcPlotter::SetPlotModeToPlotFieldData
void SetPlotModeToPlotFieldData()
Definition: vtkArcPlotter.h:96
VTK_PLOT_SCALARS
#define VTK_PLOT_SCALARS
Definition: vtkArcPlotter.h:50
vtkArcPlotter::UseDefaultNormal
vtkTypeBool UseDefaultNormal
Definition: vtkArcPlotter.h:187
vtkArcPlotter::PlotMode
int PlotMode
Definition: vtkArcPlotter.h:181
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
VTK_PLOT_TENSORS
#define VTK_PLOT_TENSORS
Definition: vtkArcPlotter.h:54
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkArcPlotter::Height
double Height
Definition: vtkArcPlotter.h:184
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44