Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 =========================================================================*/
00045 #ifndef __vtkNonLinearCell_h
00046 #define __vtkNonLinearCell_h
00047 
00048 #include "vtkCell.h"
00049 
00050 #include "vtkPointLocator.h" // Needed for inline method
00051 #include "vtkPoints.h" // Needed for inline method
00052 
00053 class vtkPolyData;
00054 class vtkDataSet;
00055 class vtkUnstructuredGrid;
00056 
00057 class VTK_FILTERING_EXPORT vtkNonLinearCell : public vtkCell
00058 {
00059 public:
00060   vtkTypeRevisionMacro(vtkNonLinearCell,vtkCell);  
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064 
00066   vtkSetClampMacro(Error,double,0.001,1.0);
00067   vtkGetMacro(Error,double);
00069 
00073   virtual int IsLinear() {return 0;}
00074   
00076 
00086   virtual void Tessellate(vtkIdType cellId, 
00087                           vtkDataSet *input, vtkPolyData *output, 
00088                           vtkPointLocator *locator=NULL);
00090   
00092 
00102   virtual void Tessellate(vtkIdType cellId, 
00103                           vtkDataSet *input, vtkUnstructuredGrid *output, 
00104                           vtkPointLocator *locator=NULL);
00106   
00107 
00108 protected:
00109   vtkNonLinearCell();
00110   ~vtkNonLinearCell() {}
00111 
00112   double Error;
00113 
00114   // inline helper for tessellation- used by subclasses
00115   vtkIdType InsertPoint(vtkPointLocator *locator, vtkPoints *pts, double *x)
00116     {
00117       if ( locator != NULL ) 
00118         {
00119         vtkIdType p;
00120         locator->InsertUniquePoint(x,p);
00121         return p;
00122         }
00123       else
00124         {
00125         return pts->InsertNextPoint(x);
00126         }
00127     }
00128   
00129 private:
00130   vtkNonLinearCell(const vtkNonLinearCell&);  // Not implemented.
00131   void operator=(const vtkNonLinearCell&);  // Not implemented.
00132 };
00133 
00134 #endif
00135 
00136