Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkNonLinearCell.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkNonLinearCell.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00050 #ifndef __vtkNonLinearCell_h
    00051 #define __vtkNonLinearCell_h
    00052
    00053 #include "vtkCell.h"
    00054
    00055 #include "vtkPointLocator.h" // Needed for inline method
    00056 #include "vtkPoints.h" // Needed for inline method
    00057
    00058 class vtkPolyData;
    00059 class vtkDataSet;
    00060 class vtkUnstructuredGrid;
    00061
    00062 class VTK_COMMON_EXPORT vtkNonLinearCell : public vtkCell
    00063 {
    00064 public:
    00065   vtkTypeRevisionMacro(vtkNonLinearCell,vtkCell);
    00066   void PrintSelf(ostream& os, vtkIndent indent);
    00067
    00069
    00071   vtkSetClampMacro(Error,float,0.001f,1.0f);
    00072   vtkGetMacro(Error,float);
    00074
    00078   virtual int IsLinear() {return 0;}
    00079
    00081
    00091   virtual void Tesselate(vtkIdType cellId,
    00092                          vtkDataSet *input, vtkPolyData *output,
    00093                          vtkPointLocator *locator=NULL);
    00095
    00097
    00107   virtual void Tesselate(vtkIdType cellId,
    00108                          vtkDataSet *input, vtkUnstructuredGrid *output,
    00109                          vtkPointLocator *locator=NULL);
    00111
    00112
    00113 protected:
    00114   vtkNonLinearCell();
    00115   ~vtkNonLinearCell() {}
    00116
    00117   float Error;
    00118
    00119   // inline helper for tesselation- used by subclasses
    00120   vtkIdType InsertPoint(vtkPointLocator *locator, vtkPoints *pts, float *x)
    00121     {
    00122       if ( locator != NULL )
    00123         {
    00124         vtkIdType p;
    00125         locator->InsertUniquePoint(x,p);
    00126         return p;
    00127         }
    00128       else
    00129         {
    00130         return pts->InsertNextPoint(x);
    00131         }
    00132     }
    00133
    00134 private:
    00135   vtkNonLinearCell(const vtkNonLinearCell&);  // Not implemented.
    00136   void operator=(const vtkNonLinearCell&);  // Not implemented.
    00137 };
    00138
    00139 #endif
    00140
    00141