Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkBoxClipDataSet.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBoxClipDataSet.h,v $
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 /*----------------------------------------------------------------------------
00016  Copyright (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00019 
00050 #ifndef __vtkBoxClipDataSet_h
00051 #define __vtkBoxClipDataSet_h
00052 
00053 #include "vtkUnstructuredGridAlgorithm.h"
00054 
00055 class vtkGenericCell;            
00056 class vtkCell3D;                     
00057 class vtkDataArray;                    
00058 class vtkCellArray;                   
00059 class vtkPointData;                   
00060 class vtkCellData;                    
00061 class vtkPoints;                      
00062 class vtkIdList;                    
00063 class vtkPointLocator;
00064 
00065 class VTK_GRAPHICS_EXPORT vtkBoxClipDataSet : public vtkUnstructuredGridAlgorithm
00066 {
00067 public:
00068   vtkTypeRevisionMacro(vtkBoxClipDataSet,vtkUnstructuredGridAlgorithm);
00069   void PrintSelf(ostream& os, vtkIndent indent);
00070 
00072   static vtkBoxClipDataSet *New();
00073 
00075 
00078   void SetBoxClip(double xmin, double xmax,
00079                   double ymin, double ymax,
00080                   double zmin, double zmax);
00081   void SetBoxClip(const double *n0, const double *o0,
00082                   const double *n1, const double *o1,
00083                   const double *n2, const double *o2,
00084                   const double *n3, const double *o3,
00085                   const double *n4, const double *o4,
00086                   const double *n5, const double *o5);
00088   
00089 
00091 
00093   vtkSetMacro(GenerateClipScalars,int);
00094   vtkGetMacro(GenerateClipScalars,int);
00095   vtkBooleanMacro(GenerateClipScalars,int);
00097 
00099 
00101   vtkSetMacro(GenerateClippedOutput,int);
00102   vtkGetMacro(GenerateClippedOutput,int);
00103   vtkBooleanMacro(GenerateClippedOutput,int);
00105 
00115   vtkUnstructuredGrid *GetClippedOutput();
00116   virtual int GetNumberOfOutputs();
00118 
00120 
00122   void SetLocator(vtkPointLocator *locator);
00123   vtkGetObjectMacro(Locator,vtkPointLocator);
00125 
00128   void CreateDefaultLocator();
00129 
00131   unsigned long GetMTime();
00132 
00133   vtkGetMacro(Orientation,unsigned int);
00134   vtkSetMacro(Orientation,unsigned int);
00135   
00136   void MinEdgeF(const unsigned int *id_v, const vtkIdType *cellIds,
00137                 unsigned int *edgF );
00138   void PyramidToTetra(const vtkIdType *pyramId, const vtkIdType *cellIds,
00139                       vtkCellArray *newCellArray);
00140   void WedgeToTetra(const vtkIdType *wedgeId, const vtkIdType *cellIds,
00141                     vtkCellArray *newCellArray);
00142   void CellGrid(vtkIdType typeobj, vtkIdType npts, const vtkIdType *cellIds,
00143                 vtkCellArray *newCellArray);
00144   void CreateTetra(vtkIdType npts, const vtkIdType *cellIds,
00145                    vtkCellArray *newCellArray);
00146   void ClipBox(vtkPoints *newPoints,vtkGenericCell *cell, 
00147                vtkPointLocator *locator, vtkCellArray *tets,vtkPointData *inPD, 
00148                vtkPointData *outPD,vtkCellData *inCD,vtkIdType cellId,
00149                vtkCellData *outCD);
00150   void ClipHexahedron(vtkPoints *newPoints, vtkGenericCell *cell,
00151                       vtkPointLocator *locator, vtkCellArray *tets,
00152                       vtkPointData *inPD, vtkPointData *outPD,
00153                       vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD);
00154   void ClipBoxInOut(vtkPoints *newPoints, vtkGenericCell *cell, 
00155                     vtkPointLocator *locator, vtkCellArray **tets,
00156                     vtkPointData *inPD, vtkPointData *outPD,
00157                     vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
00158   void ClipHexahedronInOut(vtkPoints *newPoints,vtkGenericCell *cell,
00159                            vtkPointLocator *locator, vtkCellArray **tets,
00160                            vtkPointData *inPD, vtkPointData *outPD,
00161                            vtkCellData *inCD, vtkIdType cellId, 
00162                            vtkCellData **outCD);
00163 
00164   void ClipBox2D(vtkPoints *newPoints, vtkGenericCell *cell, 
00165                  vtkPointLocator *locator, vtkCellArray *tets, 
00166                  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
00167                  vtkIdType cellId, vtkCellData *outCD);
00168   void ClipBoxInOut2D(vtkPoints *newPoints,vtkGenericCell *cell, 
00169                       vtkPointLocator *locator, vtkCellArray **tets,
00170                       vtkPointData *inPD, vtkPointData *outPD, 
00171                       vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
00172   void ClipHexahedron2D(vtkPoints *newPoints,vtkGenericCell *cell,
00173                         vtkPointLocator *locator, vtkCellArray *tets,
00174                         vtkPointData *inPD, vtkPointData *outPD,
00175                         vtkCellData *inCD, vtkIdType cellId,
00176                         vtkCellData *outCD);
00177   void ClipHexahedronInOut2D(vtkPoints *newPoints, vtkGenericCell *cell,
00178                              vtkPointLocator *locator, vtkCellArray **tets,
00179                              vtkPointData *inPD, vtkPointData *outPD,
00180                              vtkCellData *inCD,vtkIdType cellId,
00181                              vtkCellData **outCD);
00182 
00183   void ClipBox1D(vtkPoints *newPoints, vtkGenericCell *cell,
00184                  vtkPointLocator *locator, vtkCellArray *lines,
00185                  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
00186                  vtkIdType cellId, vtkCellData *outCD);
00187   void ClipBoxInOut1D(vtkPoints *newPoints, vtkGenericCell *cell, 
00188                       vtkPointLocator *locator, vtkCellArray **lines,
00189                       vtkPointData *inPD, vtkPointData *outPD, 
00190                       vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
00191   void ClipHexahedron1D(vtkPoints *newPoints, vtkGenericCell *cell,
00192                         vtkPointLocator *locator, vtkCellArray *lines,
00193                         vtkPointData *inPD, vtkPointData *outPD,
00194                         vtkCellData *inCD, vtkIdType cellId,
00195                         vtkCellData *outCD);
00196   void ClipHexahedronInOut1D(vtkPoints *newPoints, vtkGenericCell *cell, 
00197                              vtkPointLocator *locator, vtkCellArray **lines,
00198                              vtkPointData *inPD, vtkPointData *outPD, 
00199                              vtkCellData *inCD, vtkIdType cellId,
00200                              vtkCellData **outCD);
00201 
00202   void ClipBox0D(vtkGenericCell *cell,
00203                  vtkPointLocator *locator, vtkCellArray *verts,
00204                  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
00205                  vtkIdType cellId, vtkCellData *outCD);
00206   void ClipBoxInOut0D(vtkGenericCell *cell,
00207                       vtkPointLocator *locator, vtkCellArray **verts,
00208                       vtkPointData *inPD, vtkPointData *outPD,
00209                       vtkCellData *inCD,
00210                       vtkIdType cellId, vtkCellData **outCD);
00211   void ClipHexahedron0D(vtkGenericCell *cell,
00212                         vtkPointLocator *locator, vtkCellArray *verts,
00213                         vtkPointData *inPD, vtkPointData *outPD,
00214                         vtkCellData *inCD,
00215                         vtkIdType cellId, vtkCellData *outCD);
00216   void ClipHexahedronInOut0D(vtkGenericCell *cell,
00217                              vtkPointLocator *locator, vtkCellArray **verts,
00218                              vtkPointData *inPD, vtkPointData *outPD,
00219                              vtkCellData *inCD,
00220                              vtkIdType cellId, vtkCellData **outCD);
00221 protected:
00222   vtkBoxClipDataSet();
00223   ~vtkBoxClipDataSet();
00224 
00225   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00226   virtual int FillInputPortInformation(int port, vtkInformation *info);
00227   
00228   vtkPointLocator *Locator;
00229   int GenerateClipScalars;
00230 
00231   int GenerateClippedOutput;
00232 
00233   //double MergeTolerance;
00234 
00235   double BoundBoxClip[3][2];
00236   unsigned int Orientation;
00237   double PlaneNormal[6][3]; //normal of each plane
00238   double PlanePoint[6][3]; //point on the plane 
00239 
00240 private:
00241   vtkBoxClipDataSet(const vtkBoxClipDataSet&);  // Not implemented.
00242   void operator=(const vtkBoxClipDataSet&);  // Not implemented.
00243 };
00244 
00245 #endif

Generated on Mon Jan 21 23:07:24 2008 for VTK by  doxygen 1.4.3-20050530