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

vtkNonLinearCell.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkNonLinearCell.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 =========================================================================*/
00035 #ifndef __vtkNonLinearCell_h
00036 #define __vtkNonLinearCell_h
00037 
00038 #include "vtkCell.h"
00039 
00040 #include "vtkPointLocator.h" // Needed for inline method
00041 #include "vtkPoints.h" // Needed for inline method
00042 
00043 class vtkPolyData;
00044 class vtkDataSet;
00045 class vtkUnstructuredGrid;
00046 
00047 class VTK_FILTERING_EXPORT vtkNonLinearCell : public vtkCell
00048 {
00049 public:
00050   vtkTypeRevisionMacro(vtkNonLinearCell,vtkCell);  
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00056   vtkSetClampMacro(Error,double,0.001,1.0);
00057   vtkGetMacro(Error,double);
00059 
00063   virtual int IsLinear() {return 0;}
00064   
00066 
00076   virtual void Tessellate(vtkIdType cellId, 
00077                           vtkDataSet *input, vtkPolyData *output, 
00078                           vtkPointLocator *locator=NULL);
00080   
00082 
00092   virtual void Tessellate(vtkIdType cellId, 
00093                           vtkDataSet *input, vtkUnstructuredGrid *output, 
00094                           vtkPointLocator *locator=NULL);
00096   
00097 
00098 protected:
00099   vtkNonLinearCell();
00100   ~vtkNonLinearCell() {}
00101 
00102   double Error;
00103 
00104   // inline helper for tessellation- used by subclasses
00105   vtkIdType InsertPoint(vtkPointLocator *locator, vtkPoints *pts, double *x)
00106     {
00107       if ( locator != NULL ) 
00108         {
00109         vtkIdType p;
00110         locator->InsertUniquePoint(x,p);
00111         return p;
00112         }
00113       else
00114         {
00115         return pts->InsertNextPoint(x);
00116         }
00117     }
00118   
00119 private:
00120   vtkNonLinearCell(const vtkNonLinearCell&);  // Not implemented.
00121   void operator=(const vtkNonLinearCell&);  // Not implemented.
00122 };
00123 
00124 #endif
00125 
00126 

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