VTK
dox/Graphics/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 "vtkPolyDataAlgorithm.h"
00041 
00042 class VTK_GRAPHICS_EXPORT vtkTessellatedBoxSource : public vtkPolyDataAlgorithm
00043 {
00044 public:
00045   static vtkTessellatedBoxSource *New();
00046   vtkTypeMacro(vtkTessellatedBoxSource,vtkPolyDataAlgorithm);
00047   virtual void PrintSelf(ostream& os, vtkIndent indent);
00048   
00050 
00052   vtkSetVector6Macro(Bounds, double);
00054   
00056 
00061   vtkGetVector6Macro(Bounds, double);
00063   
00065 
00067   vtkSetMacro(Level,int);
00069   
00071 
00073   vtkGetMacro(Level,int);
00075   
00077 
00081   vtkSetMacro(DuplicateSharedPoints, int);
00082   vtkGetMacro(DuplicateSharedPoints, int);
00083   vtkBooleanMacro(DuplicateSharedPoints, int);
00085   
00087 
00089   vtkSetMacro(Quads, int);
00090   vtkGetMacro(Quads, int);
00091   vtkBooleanMacro(Quads, int);
00093   
00094 protected:
00095    vtkTessellatedBoxSource();
00096   ~vtkTessellatedBoxSource();
00097   
00099 
00100   virtual int RequestInformation(vtkInformation *request,
00101                                  vtkInformationVector **inputVector,
00102                                  vtkInformationVector *outputVector);
00104   
00106 
00108   virtual int RequestData(vtkInformation *request,
00109                           vtkInformationVector **inputVector,
00110                           vtkInformationVector *outpuVector);
00112   
00113   
00114   void DuplicateSharedPointsMethod(double *bounds,
00115                                    vtkPoints *points,
00116                                    vtkCellArray *polys);
00117   
00118   void MinimalPointsMethod(double *bounds,
00119                            vtkPoints *points,
00120                            vtkCellArray *polys);
00121   
00123 
00126   vtkIdType LocalFacePointCoordinatesToPointId(int f,
00127                                                int i,
00128                                                int j);
00130   
00132 
00137   void BuildFace(vtkPoints *points,
00138                  vtkCellArray *polys,
00139                  vtkIdType firstPointId,
00140                  double facePoints[3][3],
00141                  int changed);
00143   
00144   double Bounds[6];
00145   int Level;
00146   int DuplicateSharedPoints;
00147   int Quads;
00148   
00149 private:
00150   vtkTessellatedBoxSource(const vtkTessellatedBoxSource&);  // Not implemented.
00151   void operator=(const vtkTessellatedBoxSource&);  // Not implemented.
00152 };
00153 
00154 #endif