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 =========================================================================*/
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  xR=this->XResolution; yR=this->YResolution;};
96 
98 
101  vtkSetVector3Macro(Origin,double);
102  vtkGetVectorMacro(Origin,double,3);
104 
106 
109  void SetPoint1(double x, double y, double z);
110  void SetPoint1(double pnt[3]);
111  vtkGetVectorMacro(Point1,double,3);
113 
115 
118  void SetPoint2(double x, double y, double z);
119  void SetPoint2(double pnt[3]);
120  vtkGetVectorMacro(Point2,double,3);
122 
124 
129  void SetCenter(double x, double y, double z);
130  void SetCenter(double center[3]);
131  vtkGetVectorMacro(Center,double,3);
133 
135 
140  void SetNormal(double nx, double ny, double nz);
141  void SetNormal(double n[3]);
142  vtkGetVectorMacro(Normal,double,3);
144 
150  void Push(double distance);
151 
153 
158  vtkSetMacro(OutputPointsPrecision,int);
159  vtkGetMacro(OutputPointsPrecision,int);
161 
162 protected:
164  ~vtkPlaneSource() override {}
165 
167 
170  double Origin[3];
171  double Point1[3];
172  double Point2[3];
173  double Normal[3];
174  double Center[3];
176 
177  int UpdatePlane(double v1[3], double v2[3]);
178 private:
179  vtkPlaneSource(const vtkPlaneSource&) = delete;
180  void operator=(const vtkPlaneSource&) = delete;
181 };
182 
183 #endif
vtkPlaneSource::SetPoint1
void SetPoint1(double x, double y, double z)
Specify a point defining the first axis of the plane.
vtkPlaneSource::YResolution
int YResolution
Definition: vtkPlaneSource.h:169
vtkPlaneSource::SetNormal
void SetNormal(double n[3])
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkPlaneSource::SetResolution
void SetResolution(const int xR, const int yR)
Set the number of x-y subdivisions in the plane.
vtkPlaneSource
create an array of quadrilaterals located in a plane
Definition: vtkPlaneSource.h:61
vtkX3D::Normal
@ Normal
Definition: vtkX3D.h:45
vtkPlaneSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlaneSource::SetNormal
void SetNormal(double nx, double ny, double nz)
Set/Get the plane normal.
vtkPlaneSource::Push
void Push(double distance)
Translate the plane in the direction of the normal by the distance specified.
vtkX3D::center
@ center
Definition: vtkX3D.h:230
vtkPlaneSource::GetResolution
void GetResolution(int &xR, int &yR)
Definition: vtkPlaneSource.h:93
vtkPlaneSource::SetPoint1
void SetPoint1(double pnt[3])
vtkPolyDataAlgorithm.h
vtkPlaneSource::SetPoint2
void SetPoint2(double x, double y, double z)
Specify a point defining the second axis of the plane.
vtkPlaneSource::vtkPlaneSource
vtkPlaneSource()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPlaneSource::SetCenter
void SetCenter(double x, double y, double z)
Set/Get the center of the plane.
vtkPlaneSource::SetCenter
void SetCenter(double center[3])
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkPlaneSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkPlaneSource::UpdatePlane
int UpdatePlane(double v1[3], double v2[3])
vtkPlaneSource::New
static vtkPlaneSource * New()
Construct plane perpendicular to z-axis, resolution 1x1, width and height 1.0, and centered at the or...
vtkPlaneSource::XResolution
int XResolution
Definition: vtkPlaneSource.h:168
vtkPlaneSource::SetPoint2
void SetPoint2(double pnt[3])
vtkPlaneSource::~vtkPlaneSource
~vtkPlaneSource() override
Definition: vtkPlaneSource.h:164
vtkPlaneSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkPlaneSource.h:175
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45