VTK  9.1.0
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=========================================================================*/
133#ifndef vtkCubeSource_h
134#define vtkCubeSource_h
135
136#include "vtkFiltersSourcesModule.h" // For export macro
137#include "vtkPolyDataAlgorithm.h"
138
139class VTKFILTERSSOURCES_EXPORT vtkCubeSource : public vtkPolyDataAlgorithm
140{
141public:
144 void PrintSelf(ostream& os, vtkIndent indent) override;
145
147
150 vtkSetClampMacro(XLength, double, 0.0, VTK_DOUBLE_MAX);
151 vtkGetMacro(XLength, double);
153
155
158 vtkSetClampMacro(YLength, double, 0.0, VTK_DOUBLE_MAX);
159 vtkGetMacro(YLength, double);
161
163
166 vtkSetClampMacro(ZLength, double, 0.0, VTK_DOUBLE_MAX);
167 vtkGetMacro(ZLength, double);
169
171
174 vtkSetVector3Macro(Center, double);
175 vtkGetVectorMacro(Center, double, 3);
177
179
182 void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
183 void SetBounds(const double bounds[6]);
184 void GetBounds(double bounds[6]);
186
188
193 vtkSetMacro(OutputPointsPrecision, int);
194 vtkGetMacro(OutputPointsPrecision, int);
196
197protected:
198 vtkCubeSource(double xL = 1.0, double yL = 1.0, double zL = 1.0);
199 ~vtkCubeSource() override = default;
200
202 double XLength;
203 double YLength;
204 double ZLength;
205 double Center[3];
207
208private:
209 vtkCubeSource(const vtkCubeSource&) = delete;
210 void operator=(const vtkCubeSource&) = delete;
211};
212
213#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:113
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