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