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 
00096 
00100   vtkSetMacro(OutputPointsPrecision,int);
00101   vtkGetMacro(OutputPointsPrecision,int);
00103 
00104 protected:
00105    vtkTessellatedBoxSource();
00106   ~vtkTessellatedBoxSource();
00107 
00109 
00110   virtual int RequestInformation(vtkInformation *request,
00111                                  vtkInformationVector **inputVector,
00112                                  vtkInformationVector *outputVector);
00114 
00116 
00118   virtual int RequestData(vtkInformation *request,
00119                           vtkInformationVector **inputVector,
00120                           vtkInformationVector *outpuVector);
00122 
00123 
00124   void DuplicateSharedPointsMethod(double *bounds,
00125                                    vtkPoints *points,
00126                                    vtkCellArray *polys);
00127 
00128   void MinimalPointsMethod(double *bounds,
00129                            vtkPoints *points,
00130                            vtkCellArray *polys);
00131 
00133 
00136   vtkIdType LocalFacePointCoordinatesToPointId(int f,
00137                                                int i,
00138                                                int j);
00140 
00142 
00147   void BuildFace(vtkPoints *points,
00148                  vtkCellArray *polys,
00149                  vtkIdType firstPointId,
00150                  double facePoints[3][3],
00151                  int changed);
00153 
00154   double Bounds[6];
00155   int Level;
00156   int DuplicateSharedPoints;
00157   int Quads;
00158   int OutputPointsPrecision;
00159 
00160 private:
00161   vtkTessellatedBoxSource(const vtkTessellatedBoxSource&);  // Not implemented.
00162   void operator=(const vtkTessellatedBoxSource&);  // Not implemented.
00163 };
00164 
00165 #endif