VTK  9.3.20240424
vtkCubeSource.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
127#ifndef vtkCubeSource_h
128#define vtkCubeSource_h
129
130#include "vtkFiltersSourcesModule.h" // For export macro
131#include "vtkPolyDataAlgorithm.h"
132
133VTK_ABI_NAMESPACE_BEGIN
134class VTKFILTERSSOURCES_EXPORT vtkCubeSource : public vtkPolyDataAlgorithm
135{
136public:
139 void PrintSelf(ostream& os, vtkIndent indent) override;
140
142
145 vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
146 vtkGetMacro(XLength, double);
148
150
153 vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
154 vtkGetMacro(YLength, double);
156
158
161 vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
162 vtkGetMacro(ZLength, double);
164
166
169 vtkSetVector3Macro(Center, double);
170 vtkGetVectorMacro(Center, double, 3);
172
174
177 void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
178 void SetBounds(const double bounds[6]);
179 void GetBounds(double bounds[6]);
181
183
188 vtkSetMacro(OutputPointsPrecision, int);
189 vtkGetMacro(OutputPointsPrecision, int);
191
192protected:
193 vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
194 ~vtkCubeSource() override = default;
195
197 double XLength;
198 double YLength;
199 double ZLength;
200 double Center[3];
202
203private:
204 vtkCubeSource(const vtkCubeSource&) = delete;
205 void operator=(const vtkCubeSource&) = delete;
206};
207
208VTK_ABI_NAMESPACE_END
209#endif
create a polygonal representation of a cube
~vtkCubeSource() override=default
void GetBounds(double bounds[6])
Convenience methods allows creation of cube by specifying bounding box.
static vtkCubeSource * New()
vtkCubeSource(double xL=1.0, double yL=1.0, double zL=1.0)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetBounds(const double bounds[6])
Convenience methods allows creation of cube by specifying bounding box.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
Convenience methods allows creation of cube by specifying bounding box.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
#define VTK_DOUBLE_MAX
Definition vtkType.h:154