Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 
00058 #ifndef __vtkBoxClipDataSet_h
00059 #define __vtkBoxClipDataSet_h
00060 
00061 #include "vtkDataSetToUnstructuredGridFilter.h"
00062 
00063 class vtkGenericCell;            
00064 class vtkCell3D;                     
00065 class vtkDataArray;                    
00066 class vtkCellArray;                   
00067 class vtkPointData;                   
00068 class vtkCellData;                    
00069 class vtkPoints;                      
00070 class vtkIdList;                    
00071 class vtkPointLocator;
00072 
00073 class VTK_PARALLEL_EXPORT vtkBoxClipDataSet : public vtkDataSetToUnstructuredGridFilter
00074 {
00075 public:
00076   vtkTypeRevisionMacro(vtkBoxClipDataSet,vtkDataSetToUnstructuredGridFilter);
00077   void PrintSelf(ostream& os, vtkIndent indent);
00078 
00080   static vtkBoxClipDataSet *New();
00081 
00083 
00086   void SetBoxClip(double xmin,double xmax,double ymin,double ymax,double zmin,double zmax);
00087   void SetBoxClip(double *n0,double *o0,double *n1,double *o1,double *n2,double *o2,double *n3,double *o3,double *n4,double *o4,double *n5,double *o5);
00089   
00090 
00092 
00094   vtkSetMacro(GenerateClipScalars,int);
00095   vtkGetMacro(GenerateClipScalars,int);
00096   vtkBooleanMacro(GenerateClipScalars,int);
00098 
00100 
00102   vtkSetMacro(GenerateClippedOutput,int);
00103   vtkGetMacro(GenerateClippedOutput,int);
00104   vtkBooleanMacro(GenerateClippedOutput,int);
00106 
00116   vtkUnstructuredGrid *GetClippedOutput();
00117   virtual int GetNumberOfOutputs();
00119 
00121 
00123   void SetLocator(vtkPointLocator *locator);
00124   vtkGetObjectMacro(Locator,vtkPointLocator);
00126 
00129   void CreateDefaultLocator();
00130 
00132   unsigned long GetMTime();
00133 
00135 
00137   vtkGetStringMacro(InputScalarsSelection);
00138   void SelectInputScalars(const char *fieldName) 
00139     { this->SetInputScalarsSelection(fieldName); };
00141 
00142   vtkGetMacro(Orientation,unsigned int);
00143   vtkSetMacro(Orientation,unsigned int);
00144   
00145   void MinEdgeF(unsigned int *id_v, vtkIdType *cellIds, unsigned int *edgF );
00146   void PyramidToTetra(vtkIdType *pyramId, vtkIdType *cellIds, vtkCellArray *newCellArray);
00147   void WedgeToTetra(vtkIdType *wedgeId, vtkIdType *cellIds, vtkCellArray *newCellArray);
00148   void CellGrid(vtkIdType typeobj, vtkIdType npts, vtkIdType *cellIds, vtkCellArray *newCellArray);
00149   void CreateTetra(vtkIdType npts, vtkIdType *cellIds, vtkCellArray *newCellArray);
00150   void ClipBox(vtkPoints *newPoints,vtkGenericCell *cell, 
00151                vtkPointLocator *locator, vtkCellArray *tets,vtkPointData *inPD, 
00152                vtkPointData *outPD,vtkCellData *inCD,vtkIdType cellId,
00153                vtkCellData *outCD);
00154   void ClipHexahedron(vtkPoints *newPoints, vtkGenericCell *cell,
00155                       vtkPointLocator *locator, vtkCellArray *tets,
00156                       vtkPointData *inPD, vtkPointData *outPD,
00157                       vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD);
00158   void ClipBoxInOut(vtkPoints *newPoints, vtkGenericCell *cell, 
00159                     vtkPointLocator *locator, vtkCellArray **tets,
00160                     vtkPointData *inPD, vtkPointData *outPD,
00161                     vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
00162   void ClipHexahedronInOut(vtkPoints *newPoints,vtkGenericCell *cell,
00163                            vtkPointLocator *locator, vtkCellArray **tets,
00164                            vtkPointData *inPD, vtkPointData *outPD,
00165                            vtkCellData *inCD, vtkIdType cellId, 
00166                            vtkCellData **outCD);
00167   void ClipBox2D(vtkPoints *newPoints, vtkGenericCell *cell, 
00168                  vtkPointLocator *locator, vtkCellArray *tets, 
00169                  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
00170                  vtkIdType cellId, vtkCellData *outCD);
00171   void ClipBoxInOut2D(vtkPoints *newPoints,vtkGenericCell *cell, 
00172                       vtkPointLocator *locator, vtkCellArray **tets,
00173                       vtkPointData *inPD, vtkPointData *outPD, 
00174                       vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
00175   void ClipHexahedron2D(vtkPoints *newPoints,vtkGenericCell *cell,
00176                         vtkPointLocator *locator, vtkCellArray *tets,
00177                         vtkPointData *inPD, vtkPointData *outPD,
00178                         vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD);
00179   void ClipHexahedronInOut2D(vtkPoints *newPoints, vtkGenericCell *cell,
00180                              vtkPointLocator *locator, vtkCellArray **tets,
00181                              vtkPointData *inPD, vtkPointData *outPD,
00182                              vtkCellData *inCD,vtkIdType cellId,
00183                              vtkCellData **outCD);
00184 protected:
00185   vtkBoxClipDataSet();
00186   ~vtkBoxClipDataSet();
00187 
00188   void Execute();
00189   
00190   vtkPointLocator *Locator;
00191   int GenerateClipScalars;
00192 
00193   int GenerateClippedOutput;
00194 
00195   //double MergeTolerance;
00196 
00197   char *InputScalarsSelection;
00198   vtkSetStringMacro(InputScalarsSelection);
00199 
00200   double BoundBoxClip[3][2];
00201   unsigned int Orientation;
00202   double PlaneNormal[6][3]; //normal of each plane
00203   double PlanePoint[6][3]; //point on the plane 
00204 
00205 private:
00206   vtkBoxClipDataSet(const vtkBoxClipDataSet&);  // Not implemented.
00207   void operator=(const vtkBoxClipDataSet&);  // Not implemented.
00208 };
00209 
00210 #endif