VTK  9.1.0
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=========================================================================*/
57#ifndef vtkPlaneSource_h
58#define vtkPlaneSource_h
59
60#include "vtkFiltersSourcesModule.h" // For export macro
62
63class VTKFILTERSSOURCES_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm
64{
65public:
66 void PrintSelf(ostream& os, vtkIndent indent) override;
68
74
76
79 vtkSetMacro(XResolution, int);
80 vtkGetMacro(XResolution, int);
82
84
87 vtkSetMacro(YResolution, int);
88 vtkGetMacro(YResolution, int);
90
92
95 void SetResolution(const int xR, const int yR);
96 void GetResolution(int& xR, int& yR)
97 {
98 xR = this->XResolution;
99 yR = this->YResolution;
100 }
102
104
107 vtkSetVector3Macro(Origin, double);
108 vtkGetVectorMacro(Origin, double, 3);
110
112
115 void SetPoint1(double x, double y, double z);
116 void SetPoint1(double pnt[3]);
117 vtkGetVectorMacro(Point1, double, 3);
119
121
124 void SetPoint2(double x, double y, double z);
125 void SetPoint2(double pnt[3]);
126 vtkGetVectorMacro(Point2, double, 3);
128
130
135 void GetAxis1(double a1[3]);
136 void GetAxis2(double a2[3]);
138
140
145 void SetCenter(double x, double y, double z);
146 void SetCenter(double center[3]);
147 vtkGetVectorMacro(Center, double, 3);
149
151
156 void SetNormal(double nx, double ny, double nz);
157 void SetNormal(double n[3]);
158 vtkGetVectorMacro(Normal, double, 3);
160
166 void Push(double distance);
167
173 void Rotate(double angle, double rotationAxis[3]);
174
176
181 vtkSetMacro(OutputPointsPrecision, int);
182 vtkGetMacro(OutputPointsPrecision, int);
184
185protected:
187 ~vtkPlaneSource() override = default;
188
190
193 double Origin[3];
194 double Point1[3];
195 double Point2[3];
196 double Normal[3];
197 double Center[3];
199
200 int UpdatePlane(double v1[3], double v2[3]);
201
202private:
203 vtkPlaneSource(const vtkPlaneSource&) = delete;
204 void operator=(const vtkPlaneSource&) = delete;
205};
206
207#endif
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create an array of quadrilaterals located in a plane
void SetNormal(double nx, double ny, double nz)
Set/Get the plane normal.
void SetPoint1(double pnt[3])
Specify a point defining the first axis of the plane.
void GetResolution(int &xR, int &yR)
Set the number of x-y subdivisions in the plane.
void Rotate(double angle, double rotationAxis[3])
Rotate plane at center around a given axis If the absolute value of the angle is inferior to the defi...
void Push(double distance)
Translate the plane in the direction of the normal by the distance specified.
void SetPoint2(double pnt[3])
Specify a point defining the second axis of the plane.
~vtkPlaneSource() override=default
void SetCenter(double x, double y, double z)
Set/Get the center of the plane.
void GetAxis1(double a1[3])
Convenience methods to retrieve the axes of the plane; that is axis a1 is the vector (Point1-Origin),...
int UpdatePlane(double v1[3], double v2[3])
static vtkPlaneSource * New()
Construct plane perpendicular to z-axis, resolution 1x1, width and height 1.0, and centered at the or...
void SetNormal(double n[3])
Set/Get the plane normal.
void SetCenter(double center[3])
Set/Get the center of the plane.
void SetPoint1(double x, double y, double z)
Specify a point defining the first axis of the plane.
void SetPoint2(double x, double y, double z)
Specify a point defining the second axis of the plane.
void GetAxis2(double a2[3])
Convenience methods to retrieve the axes of the plane; that is axis a1 is the vector (Point1-Origin),...
void SetResolution(const int xR, const int yR)
Set the number of x-y subdivisions in the plane.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
@ Normal
Definition: vtkX3D.h:51
@ center
Definition: vtkX3D.h:236