VTK  9.7.1
vtkPlaneSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
42 #ifndef vtkPlaneSource_h
43 #define vtkPlaneSource_h
44 
45 #include "vtkFiltersSourcesModule.h" // For export macro
46 #include "vtkPolyDataAlgorithm.h"
47 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
48 
49 VTK_ABI_NAMESPACE_BEGIN
50 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkPlaneSource : public vtkPolyDataAlgorithm
51 {
52 public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
60  static vtkPlaneSource* New();
61 
63 
66  vtkSetMacro(XResolution, int);
67  vtkGetMacro(XResolution, int);
69 
71 
74  vtkSetMacro(YResolution, int);
75  vtkGetMacro(YResolution, int);
77 
79 
82  void SetResolution(int xR, int yR);
83  void GetResolution(int& xR, int& yR)
84  {
85  xR = this->XResolution;
86  yR = this->YResolution;
87  }
89 
91 
94  vtkSetVector3Macro(Origin, double);
95  vtkGetVectorMacro(Origin, double, 3);
97 
99 
102  void SetPoint1(double x, double y, double z);
103  void SetPoint1(double pnt[3]);
104  vtkGetVectorMacro(Point1, double, 3);
106 
108 
111  void SetPoint2(double x, double y, double z);
112  void SetPoint2(double pnt[3]);
113  vtkGetVectorMacro(Point2, double, 3);
115 
117 
122  void GetAxis1(double a1[3]);
123  void GetAxis2(double a2[3]);
125 
127 
132  void SetCenter(double x, double y, double z);
133  void SetCenter(double center[3]);
134  vtkGetVectorMacro(Center, double, 3);
136 
138 
143  void SetNormal(double nx, double ny, double nz);
144  void SetNormal(double n[3]);
145  vtkGetVectorMacro(Normal, double, 3);
147 
153  void Push(double distance);
154 
160  void Rotate(double angle, double rotationAxis[3]);
161 
163 
168  vtkSetMacro(OutputPointsPrecision, int);
169  vtkGetMacro(OutputPointsPrecision, int);
171 
172 protected:
173  vtkPlaneSource();
174  ~vtkPlaneSource() override = default;
175 
177 
180  double Origin[3];
181  double Point1[3];
182  double Point2[3];
183  double Normal[3];
184  double Center[3];
186 
187  int UpdatePlane(double v1[3], double v2[3]);
188 
189 private:
190  vtkPlaneSource(const vtkPlaneSource&) = delete;
191  void operator=(const vtkPlaneSource&) = delete;
192 };
193 
194 VTK_ABI_NAMESPACE_END
195 #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:28
create an array of quadrilaterals located in a plane
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.