VTK  9.7.1
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
22 #include "vtkPolyDataAlgorithm.h"
23 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkCubeSource : public vtkPolyDataAlgorithm
27 {
28 public:
29  static vtkCubeSource* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
37  vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
38  vtkGetMacro(XLength, double);
40 
42 
45  vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
46  vtkGetMacro(YLength, double);
48 
50 
53  vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
54  vtkGetMacro(ZLength, double);
56 
58 
61  vtkSetVector3Macro(Center, double);
62  vtkGetVectorMacro(Center, double, 3);
64 
66 
69  void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
70  void SetBounds(const double bounds[6]);
71  void GetBounds(double bounds[6]);
73 
75 
80  vtkSetMacro(OutputPointsPrecision, int);
81  vtkGetMacro(OutputPointsPrecision, int);
83 
84 protected:
85  vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
86  ~vtkCubeSource() override = default;
87 
89  double XLength;
90  double YLength;
91  double ZLength;
92  double Center[3];
94 
95 private:
96  vtkCubeSource(const vtkCubeSource&) = delete;
97  void operator=(const vtkCubeSource&) = delete;
98 };
99 
100 VTK_ABI_NAMESPACE_END
101 #endif
void GetBounds(T a, double bds[6])
#define VTK_DOUBLE_MAX
Definition: vtkType.h:202
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
static vtkPolyDataAlgorithm * New()
create a polygonal representation of a cube
Definition: vtkCubeSource.h:26
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
int OutputPointsPrecision
Definition: vtkCubeSource.h:93
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.