VTK
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 =========================================================================*/
30 #ifndef vtkCubeSource_h
31 #define vtkCubeSource_h
32 
33 #include "vtkFiltersSourcesModule.h" // For export macro
34 #include "vtkPolyDataAlgorithm.h"
35 
36 class VTKFILTERSSOURCES_EXPORT vtkCubeSource : public vtkPolyDataAlgorithm
37 {
38 public:
39  static vtkCubeSource *New();
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
44 
47  vtkSetClampMacro(XLength,double,0.0,VTK_DOUBLE_MAX);
48  vtkGetMacro(XLength,double);
50 
52 
55  vtkSetClampMacro(YLength,double,0.0,VTK_DOUBLE_MAX);
56  vtkGetMacro(YLength,double);
58 
60 
63  vtkSetClampMacro(ZLength,double,0.0,VTK_DOUBLE_MAX);
64  vtkGetMacro(ZLength,double);
66 
68 
71  vtkSetVector3Macro(Center,double);
72  vtkGetVectorMacro(Center,double,3);
74 
76 
79  void SetBounds(double xMin, double xMax,
80  double yMin, double yMax,
81  double zMin, double zMax);
82  void SetBounds(const double bounds[6]);
84 
86 
91  vtkSetMacro(OutputPointsPrecision,int);
92  vtkGetMacro(OutputPointsPrecision,int);
94 
95 protected:
96  vtkCubeSource(double xL=1.0, double yL=1.0, double zL=1.0);
97  ~vtkCubeSource() VTK_OVERRIDE {}
98 
100  double XLength;
101  double YLength;
102  double ZLength;
103  double Center[3];
105 private:
106  vtkCubeSource(const vtkCubeSource&) VTK_DELETE_FUNCTION;
107  void operator=(const vtkCubeSource&) VTK_DELETE_FUNCTION;
108 };
109 
110 #endif
create a polygonal representation of a cube
Definition: vtkCubeSource.h:37
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])
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 method allows creation of cube by specifying bounding box.
~vtkCubeSource() override
Definition: vtkCubeSource.h:97
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163