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
27 #ifndef vtkCubeSource_h
28 #define vtkCubeSource_h
29 
30 #include "vtkFiltersSourcesModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class VTKFILTERSSOURCES_EXPORT vtkCubeSource : public vtkPolyDataAlgorithm
35 {
36 public:
37  static vtkCubeSource* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
46  vtkGetMacro(XLength, double);
48 
50 
53  vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
54  vtkGetMacro(YLength, double);
56 
58 
61  vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
62  vtkGetMacro(ZLength, double);
64 
66 
69  vtkSetVector3Macro(Center, double);
70  vtkGetVectorMacro(Center, double, 3);
72 
74 
77  void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
78  void SetBounds(const double bounds[6]);
79  void GetBounds(double bounds[6]);
81 
83 
88  vtkSetMacro(OutputPointsPrecision, int);
89  vtkGetMacro(OutputPointsPrecision, int);
91 
92 protected:
93  vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
94  ~vtkCubeSource() override = default;
95 
97  double XLength;
98  double YLength;
99  double ZLength;
100  double Center[3];
102 
103 private:
104  vtkCubeSource(const vtkCubeSource&) = delete;
105  void operator=(const vtkCubeSource&) = delete;
106 };
107 
108 VTK_ABI_NAMESPACE_END
109 #endif
create a polygonal representation of a cube
Definition: vtkCubeSource.h:35
~vtkCubeSource() override=default
void GetBounds(double bounds[6])
Convenience methods allows creation of cube by specifying bounding box.
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.
static vtkCubeSource * New()
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:38
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