VTK  9.3.0
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
51#ifndef vtkPlaneSource_h
52#define vtkPlaneSource_h
53
54#include "vtkFiltersSourcesModule.h" // For export macro
56
57VTK_ABI_NAMESPACE_BEGIN
58class VTKFILTERSSOURCES_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm
59{
60public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
63
69
71
74 vtkSetMacro(XResolution, int);
75 vtkGetMacro(XResolution, int);
77
79
82 vtkSetMacro(YResolution, int);
83 vtkGetMacro(YResolution, int);
85
87
90 void SetResolution(int xR, int yR);
91 void GetResolution(int& xR, int& yR)
92 {
93 xR = this->XResolution;
94 yR = this->YResolution;
95 }
97
99
102 vtkSetVector3Macro(Origin, double);
103 vtkGetVectorMacro(Origin, double, 3);
105
107
110 void SetPoint1(double x, double y, double z);
111 void SetPoint1(double pnt[3]);
112 vtkGetVectorMacro(Point1, double, 3);
114
116
119 void SetPoint2(double x, double y, double z);
120 void SetPoint2(double pnt[3]);
121 vtkGetVectorMacro(Point2, double, 3);
123
125
130 void GetAxis1(double a1[3]);
131 void GetAxis2(double a2[3]);
133
135
140 void SetCenter(double x, double y, double z);
141 void SetCenter(double center[3]);
142 vtkGetVectorMacro(Center, double, 3);
144
146
151 void SetNormal(double nx, double ny, double nz);
152 void SetNormal(double n[3]);
153 vtkGetVectorMacro(Normal, double, 3);
155
161 void Push(double distance);
162
168 void Rotate(double angle, double rotationAxis[3]);
169
171
176 vtkSetMacro(OutputPointsPrecision, int);
177 vtkGetMacro(OutputPointsPrecision, int);
179
180protected:
182 ~vtkPlaneSource() override = default;
183
185
188 double Origin[3];
189 double Point1[3];
190 double Point2[3];
191 double Normal[3];
192 double Center[3];
194
195 int UpdatePlane(double v1[3], double v2[3]);
196
197private:
198 vtkPlaneSource(const vtkPlaneSource&) = delete;
199 void operator=(const vtkPlaneSource&) = delete;
200};
201
202VTK_ABI_NAMESPACE_END
203#endif
a simple class to control print indentation
Definition vtkIndent.h:38
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 SetResolution(int xR, int yR)
Set the number of x-y subdivisions in 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 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.