VTK
dox/Filters/Sources/vtkTessellatedBoxSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTessellatedBoxSource.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00037 #ifndef __vtkTessellatedBoxSource_h
00038 #define __vtkTessellatedBoxSource_h
00039 
00040 #include "vtkFiltersSourcesModule.h" // For export macro
00041 #include "vtkPolyDataAlgorithm.h"
00042 
00043 class VTKFILTERSSOURCES_EXPORT vtkTessellatedBoxSource : public vtkPolyDataAlgorithm
00044 {
00045 public:
00046   static vtkTessellatedBoxSource *New();
00047   vtkTypeMacro(vtkTessellatedBoxSource,vtkPolyDataAlgorithm);
00048   virtual void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00053   vtkSetVector6Macro(Bounds, double);
00055 
00057 
00062   vtkGetVector6Macro(Bounds, double);
00064 
00066 
00068   vtkSetMacro(Level,int);
00070 
00072 
00074   vtkGetMacro(Level,int);
00076 
00078 
00082   vtkSetMacro(DuplicateSharedPoints, int);
00083   vtkGetMacro(DuplicateSharedPoints, int);
00084   vtkBooleanMacro(DuplicateSharedPoints, int);
00086 
00088 
00090   vtkSetMacro(Quads, int);
00091   vtkGetMacro(Quads, int);
00092   vtkBooleanMacro(Quads, int);
00094 
00095 protected:
00096    vtkTessellatedBoxSource();
00097   ~vtkTessellatedBoxSource();
00098 
00100 
00101   virtual int RequestInformation(vtkInformation *request,
00102                                  vtkInformationVector **inputVector,
00103                                  vtkInformationVector *outputVector);
00105 
00107 
00109   virtual int RequestData(vtkInformation *request,
00110                           vtkInformationVector **inputVector,
00111                           vtkInformationVector *outpuVector);
00113 
00114 
00115   void DuplicateSharedPointsMethod(double *bounds,
00116                                    vtkPoints *points,
00117                                    vtkCellArray *polys);
00118 
00119   void MinimalPointsMethod(double *bounds,
00120                            vtkPoints *points,
00121                            vtkCellArray *polys);
00122 
00124 
00127   vtkIdType LocalFacePointCoordinatesToPointId(int f,
00128                                                int i,
00129                                                int j);
00131 
00133 
00138   void BuildFace(vtkPoints *points,
00139                  vtkCellArray *polys,
00140                  vtkIdType firstPointId,
00141                  double facePoints[3][3],
00142                  int changed);
00144 
00145   double Bounds[6];
00146   int Level;
00147   int DuplicateSharedPoints;
00148   int Quads;
00149 
00150 private:
00151   vtkTessellatedBoxSource(const vtkTessellatedBoxSource&);  // Not implemented.
00152   void operator=(const vtkTessellatedBoxSource&);  // Not implemented.
00153 };
00154 
00155 #endif