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

Common/vtkGenericCell.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGenericCell.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 =========================================================================*/
00032 #ifndef __vtkGenericCell_h
00033 #define __vtkGenericCell_h
00034 
00035 #include "vtkCell.h"
00036 
00037 class VTK_COMMON_EXPORT vtkGenericCell : public vtkCell
00038 {
00039 public:
00041   static vtkGenericCell *New();
00042 
00043   vtkTypeRevisionMacro(vtkGenericCell,vtkCell);
00044 
00046 
00047   void ShallowCopy(vtkCell *c);
00048   void DeepCopy(vtkCell *c);
00049   int GetCellType();
00050   int GetCellDimension();
00051   int IsLinear();
00052   int RequiresInitialization();
00053   void Initialize();
00054   int GetNumberOfEdges();
00055   int GetNumberOfFaces();
00056   vtkCell *GetEdge(int edgeId);
00057   vtkCell *GetFace(int faceId);
00058   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00059   int EvaluatePosition(double x[3], double* closestPoint, 
00060                        int& subId, double pcoords[3], 
00061                        double& dist2, double *weights);
00062   void EvaluateLocation(int& subId, double pcoords[3], 
00063                         double x[3], double *weights);
00064   void Contour(double value, vtkDataArray *cellScalars, 
00065                vtkPointLocator *locator, vtkCellArray *verts, 
00066                vtkCellArray *lines, vtkCellArray *polys, 
00067                vtkPointData *inPd, vtkPointData *outPd,
00068                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00069   void Clip(double value, vtkDataArray *cellScalars, 
00070             vtkPointLocator *locator, vtkCellArray *connectivity,
00071             vtkPointData *inPd, vtkPointData *outPd,
00072             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 
00073             int insideOut);
00074   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00075                         double x[3], double pcoords[3], int& subId);
00076   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00077   void Derivatives(int subId, double pcoords[3], double *values, 
00078                    int dim, double *derivs);
00079   int GetParametricCenter(double pcoords[3]);
00080   double *GetParametricCoords();
00081   int IsPrimaryCell();
00083 
00085 
00090   void SetCellType(int cellType);
00091   void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
00092   void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
00093   void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
00094   void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
00095   void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
00096   void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
00097   void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
00098   void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
00099   void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
00100   void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
00101   void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
00102   void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
00103   void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
00104   void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
00105   void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
00106   void SetCellTypeToConvexPointSet() {this->SetCellType(VTK_CONVEX_POINT_SET);}
00107   void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
00108   void SetCellTypeToQuadraticTriangle() {this->SetCellType(VTK_QUADRATIC_TRIANGLE);}
00109   void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
00110   void SetCellTypeToQuadraticTetra() {this->SetCellType(VTK_QUADRATIC_TETRA);}
00111   void SetCellTypeToQuadraticHexahedron() {this->SetCellType(VTK_QUADRATIC_HEXAHEDRON);}
00113 
00114 protected:
00115   vtkGenericCell();
00116   ~vtkGenericCell();
00117 
00118   vtkCell *Cell;
00119   
00120 private:
00121   vtkGenericCell(const vtkGenericCell&);  // Not implemented.
00122   void operator=(const vtkGenericCell&);  // Not implemented.
00123 };
00124 
00125 #endif
00126 
00127