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

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 =========================================================================*/
00042 #ifndef __vtkGenericCell_h
00043 #define __vtkGenericCell_h
00044 
00045 #include "vtkCell.h"
00046 
00047 class VTK_FILTERING_EXPORT vtkGenericCell : public vtkCell
00048 {
00049 public:
00051   static vtkGenericCell *New();
00052 
00053   vtkTypeRevisionMacro(vtkGenericCell,vtkCell);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057 
00058   void ShallowCopy(vtkCell *c);
00059   void DeepCopy(vtkCell *c);
00060   int GetCellType();
00061   int GetCellDimension();
00062   int IsLinear();
00063   int RequiresInitialization();
00064   void Initialize();
00065   int GetNumberOfEdges();
00066   int GetNumberOfFaces();
00067   vtkCell *GetEdge(int edgeId);
00068   vtkCell *GetFace(int faceId);
00069   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00070   int EvaluatePosition(double x[3], double* closestPoint, 
00071                        int& subId, double pcoords[3], 
00072                        double& dist2, double *weights);
00073   void EvaluateLocation(int& subId, double pcoords[3], 
00074                         double x[3], double *weights);
00075   void Contour(double value, vtkDataArray *cellScalars, 
00076                vtkPointLocator *locator, vtkCellArray *verts, 
00077                vtkCellArray *lines, vtkCellArray *polys, 
00078                vtkPointData *inPd, vtkPointData *outPd,
00079                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00080   void Clip(double value, vtkDataArray *cellScalars, 
00081             vtkPointLocator *locator, vtkCellArray *connectivity,
00082             vtkPointData *inPd, vtkPointData *outPd,
00083             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 
00084             int insideOut);
00085   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00086                         double x[3], double pcoords[3], int& subId);
00087   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00088   void Derivatives(int subId, double pcoords[3], double *values, 
00089                    int dim, double *derivs);
00090   int GetParametricCenter(double pcoords[3]);
00091   double *GetParametricCoords();
00092   int IsPrimaryCell();
00094 
00096 
00101   void SetCellType(int cellType);
00102   void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
00103   void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
00104   void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
00105   void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
00106   void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
00107   void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
00108   void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
00109   void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
00110   void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
00111   void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
00112   void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
00113   void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
00114   void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
00115   void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
00116   void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
00117   void SetCellTypeToPentagonalPrism() {this->SetCellType(VTK_PENTAGONAL_PRISM);}
00118   void SetCellTypeToHexagonalPrism() {this->SetCellType(VTK_HEXAGONAL_PRISM);}
00119   void SetCellTypeToConvexPointSet() {this->SetCellType(VTK_CONVEX_POINT_SET);}
00120   void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
00121   void SetCellTypeToQuadraticTriangle() {this->SetCellType(VTK_QUADRATIC_TRIANGLE);}
00122   void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
00123   void SetCellTypeToQuadraticTetra() {this->SetCellType(VTK_QUADRATIC_TETRA);}
00124   void SetCellTypeToQuadraticHexahedron() {this->SetCellType(VTK_QUADRATIC_HEXAHEDRON);}
00125   void SetCellTypeToQuadraticWedge() {this->SetCellType(VTK_QUADRATIC_WEDGE);}
00126   void SetCellTypeToQuadraticPyramid() {this->SetCellType(VTK_QUADRATIC_PYRAMID);}
00128 
00129 protected:
00130   vtkGenericCell();
00131   ~vtkGenericCell();
00132 
00133   vtkCell *Cell;
00134   
00135 private:
00136   vtkGenericCell(const vtkGenericCell&);  // Not implemented.
00137   void operator=(const vtkGenericCell&);  // Not implemented.
00138 };
00139 
00140 #endif
00141 
00142