VTK  9.2.6
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 =========================================================================*/
39 #ifndef vtkCubeSource_h
40 #define vtkCubeSource_h
41 
42 #include "vtkFiltersSourcesModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 class VTKFILTERSSOURCES_EXPORT vtkCubeSource : public vtkPolyDataAlgorithm
46 {
47 public:
48  static vtkCubeSource* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
56  vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
57  vtkGetMacro(XLength, double);
59 
61 
64  vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
65  vtkGetMacro(YLength, double);
67 
69 
72  vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
73  vtkGetMacro(ZLength, double);
75 
77 
80  vtkSetVector3Macro(Center, double);
81  vtkGetVectorMacro(Center, double, 3);
83 
85 
88  void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
89  void SetBounds(const double bounds[6]);
90  void GetBounds(double bounds[6]);
92 
94 
99  vtkSetMacro(OutputPointsPrecision, int);
100  vtkGetMacro(OutputPointsPrecision, int);
102 
103 protected:
104  vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
105  ~vtkCubeSource() override = default;
106 
108  double XLength;
109  double YLength;
110  double ZLength;
111  double Center[3];
113 
114 private:
115  vtkCubeSource(const vtkCubeSource&) = delete;
116  void operator=(const vtkCubeSource&) = delete;
117 };
118 
119 #endif
create a polygonal representation of a cube
Definition: vtkCubeSource.h:46
~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:49
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:165