VTK  9.2.6
vtkPlaneSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlaneSource.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 =========================================================================*/
54 #ifndef vtkPlaneSource_h
55 #define vtkPlaneSource_h
56 
57 #include "vtkFiltersSourcesModule.h" // For export macro
58 #include "vtkPolyDataAlgorithm.h"
59 
60 class VTKFILTERSSOURCES_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm
61 {
62 public:
63  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70  static vtkPlaneSource* New();
71 
73 
76  vtkSetMacro(XResolution, int);
77  vtkGetMacro(XResolution, int);
79 
81 
84  vtkSetMacro(YResolution, int);
85  vtkGetMacro(YResolution, int);
87 
89 
92  void SetResolution(const int xR, const int yR);
93  void GetResolution(int& xR, int& yR)
94  {
95  xR = this->XResolution;
96  yR = this->YResolution;
97  }
99 
101 
104  vtkSetVector3Macro(Origin, double);
105  vtkGetVectorMacro(Origin, double, 3);
107 
109 
112  void SetPoint1(double x, double y, double z);
113  void SetPoint1(double pnt[3]);
114  vtkGetVectorMacro(Point1, double, 3);
116 
118 
121  void SetPoint2(double x, double y, double z);
122  void SetPoint2(double pnt[3]);
123  vtkGetVectorMacro(Point2, double, 3);
125 
127 
132  void GetAxis1(double a1[3]);
133  void GetAxis2(double a2[3]);
135 
137 
142  void SetCenter(double x, double y, double z);
143  void SetCenter(double center[3]);
144  vtkGetVectorMacro(Center, double, 3);
146 
148 
153  void SetNormal(double nx, double ny, double nz);
154  void SetNormal(double n[3]);
155  vtkGetVectorMacro(Normal, double, 3);
157 
163  void Push(double distance);
164 
170  void Rotate(double angle, double rotationAxis[3]);
171 
173 
178  vtkSetMacro(OutputPointsPrecision, int);
179  vtkGetMacro(OutputPointsPrecision, int);
181 
182 protected:
183  vtkPlaneSource();
184  ~vtkPlaneSource() override = default;
185 
187 
190  double Origin[3];
191  double Point1[3];
192  double Point2[3];
193  double Normal[3];
194  double Center[3];
196 
197  int UpdatePlane(double v1[3], double v2[3]);
198 
199 private:
200  vtkPlaneSource(const vtkPlaneSource&) = delete;
201  void operator=(const vtkPlaneSource&) = delete;
202 };
203 
204 #endif
void GetResolution(int &xR, int &yR)
Set the number of x-y subdivisions in the plane.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
create an array of quadrilaterals located in a plane
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.