VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkTessellatedBoxSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTessellatedBoxSource.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 =========================================================================*/
15 
37 #ifndef __vtkTessellatedBoxSource_h
38 #define __vtkTessellatedBoxSource_h
39 
40 #include "vtkFiltersSourcesModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 class VTKFILTERSSOURCES_EXPORT vtkTessellatedBoxSource : public vtkPolyDataAlgorithm
44 {
45 public:
46  static vtkTessellatedBoxSource *New();
47  vtkTypeMacro(vtkTessellatedBoxSource,vtkPolyDataAlgorithm);
48  virtual void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
53  vtkSetVector6Macro(Bounds, double);
55 
57 
62  vtkGetVector6Macro(Bounds, double);
64 
66 
68  vtkSetMacro(Level,int);
70 
72 
74  vtkGetMacro(Level,int);
76 
78 
82  vtkSetMacro(DuplicateSharedPoints, int);
83  vtkGetMacro(DuplicateSharedPoints, int);
84  vtkBooleanMacro(DuplicateSharedPoints, int);
86 
88 
90  vtkSetMacro(Quads, int);
91  vtkGetMacro(Quads, int);
92  vtkBooleanMacro(Quads, int);
94 
95 protected:
98 
100 
101  virtual int RequestInformation(vtkInformation *request,
102  vtkInformationVector **inputVector,
103  vtkInformationVector *outputVector);
105 
107 
109  virtual int RequestData(vtkInformation *request,
110  vtkInformationVector **inputVector,
111  vtkInformationVector *outpuVector);
113 
114 
115  void DuplicateSharedPointsMethod(double *bounds,
116  vtkPoints *points,
117  vtkCellArray *polys);
118 
119  void MinimalPointsMethod(double *bounds,
120  vtkPoints *points,
121  vtkCellArray *polys);
122 
124 
127  vtkIdType LocalFacePointCoordinatesToPointId(int f,
128  int i,
129  int j);
131 
133 
138  void BuildFace(vtkPoints *points,
139  vtkCellArray *polys,
140  vtkIdType firstPointId,
141  double facePoints[3][3],
142  int changed);
144 
145  double Bounds[6];
146  int Level;
148  int Quads;
149 
150 private:
151  vtkTessellatedBoxSource(const vtkTessellatedBoxSource&); // Not implemented.
152  void operator=(const vtkTessellatedBoxSource&); // Not implemented.
153 };
154 
155 #endif
Create a polygonal representation of a box with a given level of subdivision.