VTK  9.5.20251114
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
133
134VTK_ABI_NAMESPACE_BEGIN
135class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkCubeSource : public vtkPolyDataAlgorithm
136{
137public:
140 void PrintSelf(ostream& os, vtkIndent indent) override;
141
143
146 vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
147 vtkGetMacro(XLength, double);
149
151
154 vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
155 vtkGetMacro(YLength, double);
157
159
162 vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
163 vtkGetMacro(ZLength, double);
165
167
170 vtkSetVector3Macro(Center, double);
171 vtkGetVectorMacro(Center, double, 3);
173
175
178 void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
179 void SetBounds(const double bounds[6]);
180 void GetBounds(double bounds[6]);
182
184
189 vtkSetMacro(OutputPointsPrecision, int);
190 vtkGetMacro(OutputPointsPrecision, int);
192
193protected:
194 vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
195 ~vtkCubeSource() override = default;
196
198 double XLength;
199 double YLength;
200 double ZLength;
201 double Center[3];
203
204private:
205 vtkCubeSource(const vtkCubeSource&) = delete;
206 void operator=(const vtkCubeSource&) = delete;
207};
208
209VTK_ABI_NAMESPACE_END
210#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:206
#define VTK_MARSHALAUTO