VTK  9.3.0
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
18#ifndef vtkCubeSource_h
19#define vtkCubeSource_h
20
21#include "vtkFiltersSourcesModule.h" // For export macro
23
24VTK_ABI_NAMESPACE_BEGIN
25class VTKFILTERSSOURCES_EXPORT vtkCubeSource : public vtkPolyDataAlgorithm
26{
27public:
28 static vtkCubeSource* New();
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
33
36 vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
37 vtkGetMacro(XLength, double);
39
41
44 vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
45 vtkGetMacro(YLength, double);
47
49
52 vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
53 vtkGetMacro(ZLength, double);
55
57
60 vtkSetVector3Macro(Center, double);
61 vtkGetVectorMacro(Center, double, 3);
63
65
68 void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
69 void SetBounds(const double bounds[6]);
70 void GetBounds(double bounds[6]);
72
74
79 vtkSetMacro(OutputPointsPrecision, int);
80 vtkGetMacro(OutputPointsPrecision, int);
82
83protected:
84 vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
85 ~vtkCubeSource() override = default;
86
88 double XLength;
89 double YLength;
90 double ZLength;
91 double Center[3];
93
94private:
95 vtkCubeSource(const vtkCubeSource&) = delete;
96 void operator=(const vtkCubeSource&) = delete;
97};
98
99VTK_ABI_NAMESPACE_END
100#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()
int OutputPointsPrecision
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:29
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