00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00032 #ifndef __vtkGenericCell_h
00033 #define __vtkGenericCell_h
00034
00035 #include "vtkCell.h"
00036
00037 class VTK_FILTERING_EXPORT vtkGenericCell : public vtkCell
00038 {
00039 public:
00041 static vtkGenericCell *New();
00042
00043 vtkTypeMacro(vtkGenericCell,vtkCell);
00044 void PrintSelf(ostream& os, vtkIndent indent);
00045
00047
00048 void ShallowCopy(vtkCell *c);
00049 void DeepCopy(vtkCell *c);
00050 int GetCellType();
00051 int GetCellDimension();
00052 int IsLinear();
00053 int RequiresInitialization();
00054 void Initialize();
00055 int RequiresExplicitFaceRepresentation();
00056 void SetFaces(vtkIdType *faces);
00057 vtkIdType *GetFaces();
00058 int GetNumberOfEdges();
00059 int GetNumberOfFaces();
00060 vtkCell *GetEdge(int edgeId);
00061 vtkCell *GetFace(int faceId);
00062 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00063 int EvaluatePosition(double x[3], double* closestPoint,
00064 int& subId, double pcoords[3],
00065 double& dist2, double *weights);
00066 void EvaluateLocation(int& subId, double pcoords[3],
00067 double x[3], double *weights);
00068 void Contour(double value, vtkDataArray *cellScalars,
00069 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00070 vtkCellArray *lines, vtkCellArray *polys,
00071 vtkPointData *inPd, vtkPointData *outPd,
00072 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00073 void Clip(double value, vtkDataArray *cellScalars,
00074 vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
00075 vtkPointData *inPd, vtkPointData *outPd,
00076 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00077 int insideOut);
00078 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00079 double x[3], double pcoords[3], int& subId);
00080 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00081 void Derivatives(int subId, double pcoords[3], double *values,
00082 int dim, double *derivs);
00083 int GetParametricCenter(double pcoords[3]);
00084 double *GetParametricCoords();
00085 int IsPrimaryCell();
00087
00089
00091 virtual void InterpolateFunctions(double pcoords[3], double *weights);
00092 virtual void InterpolateDerivs(double pcoords[3], double *derivs);
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 SetCellTypeToPolyhedron() {this->SetCellType(VTK_POLYHEDRON);}
00120 void SetCellTypeToConvexPointSet() {this->SetCellType(VTK_CONVEX_POINT_SET);}
00121 void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
00122 void SetCellTypeToCubicLine() {this->SetCellType(VTK_CUBIC_LINE);}
00123 void SetCellTypeToQuadraticTriangle() {this->SetCellType(VTK_QUADRATIC_TRIANGLE);}
00124 void SetCellTypeToBiQuadraticTriangle() {this->SetCellType(VTK_BIQUADRATIC_TRIANGLE);}
00125 void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
00126 void SetCellTypeToQuadraticTetra() {this->SetCellType(VTK_QUADRATIC_TETRA);}
00127 void SetCellTypeToQuadraticHexahedron() {this->SetCellType(VTK_QUADRATIC_HEXAHEDRON);}
00128 void SetCellTypeToQuadraticWedge() {this->SetCellType(VTK_QUADRATIC_WEDGE);}
00129 void SetCellTypeToQuadraticPyramid() {this->SetCellType(VTK_QUADRATIC_PYRAMID);}
00130 void SetCellTypeToQuadraticLinearQuad() {this->SetCellType(VTK_QUADRATIC_LINEAR_QUAD);}
00131 void SetCellTypeToBiQuadraticQuad() {this->SetCellType(VTK_BIQUADRATIC_QUAD);}
00132 void SetCellTypeToQuadraticLinearWedge() {this->SetCellType(VTK_QUADRATIC_LINEAR_WEDGE);}
00133 void SetCellTypeToBiQuadraticQuadraticWedge() {
00134 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);}
00135 void SetCellTypeToTriQuadraticHexahedron() {
00136 this->SetCellType(VTK_TRIQUADRATIC_HEXAHEDRON);}
00137 void SetCellTypeToBiQuadraticQuadraticHexahedron() {
00138 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);}
00140
00142 static vtkCell* InstantiateCell(int cellType);
00143
00144 protected:
00145 vtkGenericCell();
00146 ~vtkGenericCell();
00147
00148 vtkCell *Cell;
00149
00150 private:
00151 vtkGenericCell(const vtkGenericCell&);
00152 void operator=(const vtkGenericCell&);
00153 };
00154
00155 #endif
00156
00157