1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkEmptyCell.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 // .NAME vtkEmptyCell - an empty cell used as a place-holder during processing
16 // .SECTION Description
17 // vtkEmptyCell is a concrete implementation of vtkCell. It is used
18 // during processing to represented a deleted element.
19 
20 #ifndef vtkEmptyCell_h
21 #define vtkEmptyCell_h
22 
23 #include "vtkCommonDataModelModule.h" // For export macro
24 #include "vtkCell.h"
25 
26 class VTKCOMMONDATAMODEL_EXPORT vtkEmptyCell : public vtkCell
27 {
28 public:
29   static vtkEmptyCell *New();
30   vtkTypeMacro(vtkEmptyCell,vtkCell);
31   void PrintSelf(ostream& os, vtkIndent indent);
32 
33   // Description:
34   // See the vtkCell API for descriptions of these methods.
GetCellType()35   int GetCellType() {return VTK_EMPTY_CELL;};
GetCellDimension()36   int GetCellDimension() {return 0;};
GetNumberOfEdges()37   int GetNumberOfEdges() {return 0;};
GetNumberOfFaces()38   int GetNumberOfFaces() {return 0;};
GetEdge(int)39   vtkCell *GetEdge(int) {return 0;};
GetFace(int)40   vtkCell *GetFace(int) {return 0;};
41   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
42   void Contour(double value, vtkDataArray *cellScalars,
43                vtkIncrementalPointLocator *locator, vtkCellArray *verts1,
44                vtkCellArray *lines, vtkCellArray *verts2,
45                vtkPointData *inPd, vtkPointData *outPd,
46                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
47   void Clip(double value, vtkDataArray *cellScalars,
48             vtkIncrementalPointLocator *locator, vtkCellArray *pts,
49             vtkPointData *inPd, vtkPointData *outPd,
50             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
51             int insideOut);
52 
53   int EvaluatePosition(double x[3], double* closestPoint,
54                        int& subId, double pcoords[3],
55                        double& dist2, double *weights);
56   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
57                         double *weights);
58   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
59                         double x[3], double pcoords[3], int& subId);
60   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
61   void Derivatives(int subId, double pcoords[3], double *values,
62                    int dim, double *derivs);
63 
64   // Description:
65   // Compute the interpolation functions/derivatives
66   // (aka shape functions/derivatives)
67   virtual void InterpolateFunctions(double pcoords[3], double *weights);
68   virtual void InterpolateDerivs(double pcoords[3], double *derivs);
69 
70 protected:
vtkEmptyCell()71   vtkEmptyCell() {}
~vtkEmptyCell()72   ~vtkEmptyCell() {}
73 
74 private:
75   vtkEmptyCell(const vtkEmptyCell&);  // Not implemented.
76   void operator=(const vtkEmptyCell&);  // Not implemented.
77 };
78 
79 #endif
80 
81 
82