VTK
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 =========================================================================*/
48 #ifndef vtkPlaneSource_h
49 #define vtkPlaneSource_h
50 
51 #include "vtkFiltersSourcesModule.h" // For export macro
52 #include "vtkPolyDataAlgorithm.h"
53 
54 class VTKFILTERSSOURCES_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm
55 {
56 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
64  static vtkPlaneSource *New();
65 
67 
70  vtkSetMacro(XResolution,int);
71  vtkGetMacro(XResolution,int);
73 
75 
78  vtkSetMacro(YResolution,int);
79  vtkGetMacro(YResolution,int);
81 
83 
86  void SetResolution(const int xR, const int yR);
87  void GetResolution(int& xR,int& yR) {
88  xR=this->XResolution; yR=this->YResolution;};
90 
92 
95  vtkSetVector3Macro(Origin,double);
96  vtkGetVectorMacro(Origin,double,3);
98 
100 
103  void SetPoint1(double x, double y, double z);
104  void SetPoint1(double pnt[3]);
105  vtkGetVectorMacro(Point1,double,3);
107 
109 
112  void SetPoint2(double x, double y, double z);
113  void SetPoint2(double pnt[3]);
114  vtkGetVectorMacro(Point2,double,3);
116 
118 
123  void SetCenter(double x, double y, double z);
124  void SetCenter(double center[3]);
125  vtkGetVectorMacro(Center,double,3);
127 
129 
134  void SetNormal(double nx, double ny, double nz);
135  void SetNormal(double n[3]);
136  vtkGetVectorMacro(Normal,double,3);
138 
144  void Push(double distance);
145 
147 
152  vtkSetMacro(OutputPointsPrecision,int);
153  vtkGetMacro(OutputPointsPrecision,int);
155 
156 protected:
157  vtkPlaneSource();
158  ~vtkPlaneSource() override {}
159 
161 
164  double Origin[3];
165  double Point1[3];
166  double Point2[3];
167  double Normal[3];
168  double Center[3];
170 
171  int UpdatePlane(double v1[3], double v2[3]);
172 private:
173  vtkPlaneSource(const vtkPlaneSource&) = delete;
174  void operator=(const vtkPlaneSource&) = delete;
175 };
176 
177 #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:33
create an array of quadrilaterals located in a plane
Store zero or more vtkInformation instances.
~vtkPlaneSource() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.