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=========================================================================*/
63#ifndef vtkPlaneSource_h
64#define vtkPlaneSource_h
65
66#include "vtkFiltersSourcesModule.h" // For export macro
68
69class VTKFILTERSSOURCES_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm
70{
71public:
72 void PrintSelf(ostream& os, vtkIndent indent) override;
74
80
82
85 vtkSetMacro(XResolution, int);
86 vtkGetMacro(XResolution, int);
88
90
93 vtkSetMacro(YResolution, int);
94 vtkGetMacro(YResolution, int);
96
98
101 void SetResolution(const int xR, const int yR);
102 void GetResolution(int& xR, int& yR)
103 {
104 xR = this->XResolution;
105 yR = this->YResolution;
106 }
108
110
113 vtkSetVector3Macro(Origin, double);
114 vtkGetVectorMacro(Origin, double, 3);
116
118
121 void SetPoint1(double x, double y, double z);
122 void SetPoint1(double pnt[3]);
123 vtkGetVectorMacro(Point1, double, 3);
125
127
130 void SetPoint2(double x, double y, double z);
131 void SetPoint2(double pnt[3]);
132 vtkGetVectorMacro(Point2, double, 3);
134
136
141 void GetAxis1(double a1[3]);
142 void GetAxis2(double a2[3]);
144
146
151 void SetCenter(double x, double y, double z);
152 void SetCenter(double center[3]);
153 vtkGetVectorMacro(Center, double, 3);
155
157
162 void SetNormal(double nx, double ny, double nz);
163 void SetNormal(double n[3]);
164 vtkGetVectorMacro(Normal, double, 3);
166
172 void Push(double distance);
173
179 void Rotate(double angle, double rotationAxis[3]);
180
182
187 vtkSetMacro(OutputPointsPrecision, int);
188 vtkGetMacro(OutputPointsPrecision, int);
190
191protected:
193 ~vtkPlaneSource() override = default;
194
196
199 double Origin[3];
200 double Point1[3];
201 double Point2[3];
202 double Normal[3];
203 double Center[3];
205
206 int UpdatePlane(double v1[3], double v2[3]);
207
208private:
209 vtkPlaneSource(const vtkPlaneSource&) = delete;
210 void operator=(const vtkPlaneSource&) = delete;
211};
212
213#endif
a simple class to control print indentation
Definition vtkIndent.h:49
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.