VTK  9.0.20200601
vtkCubeSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCubeSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkCubeSource_h
25 #define vtkCubeSource_h
26 
27 #include "vtkFiltersSourcesModule.h" // For export macro
28 #include "vtkPolyDataAlgorithm.h"
29 
30 class VTKFILTERSSOURCES_EXPORT vtkCubeSource : public vtkPolyDataAlgorithm
31 {
32 public:
33  static vtkCubeSource* New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
41  vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
42  vtkGetMacro(XLength, double);
44 
46 
49  vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
50  vtkGetMacro(YLength, double);
52 
54 
57  vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
58  vtkGetMacro(ZLength, double);
60 
62 
65  vtkSetVector3Macro(Center, double);
66  vtkGetVectorMacro(Center, double, 3);
68 
70 
73  void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
74  void SetBounds(const double bounds[6]);
75  void GetBounds(double bounds[6]);
77 
79 
84  vtkSetMacro(OutputPointsPrecision, int);
85  vtkGetMacro(OutputPointsPrecision, int);
87 
88 protected:
89  vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
90  ~vtkCubeSource() override = default;
91 
93  double XLength;
94  double YLength;
95  double ZLength;
96  double Center[3];
98 
99 private:
100  vtkCubeSource(const vtkCubeSource&) = delete;
101  void operator=(const vtkCubeSource&) = delete;
102 };
103 
104 #endif
vtkCubeSource::ZLength
double ZLength
Definition: vtkCubeSource.h:95
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCubeSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkCubeSource.h:97
vtkPolyDataAlgorithm.h
vtkCubeSource::XLength
double XLength
Definition: vtkCubeSource.h:93
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkBlockSortHelper::GetBounds
void GetBounds(T a, double bds[6])
Definition: vtkBlockSortHelper.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCubeSource::YLength
double YLength
Definition: vtkCubeSource.h:94
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkCubeSource
create a polygonal representation of a cube
Definition: vtkCubeSource.h:30
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:157
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41