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 GetNumberOfEdges();
00056 int GetNumberOfFaces();
00057 vtkCell *GetEdge(int edgeId);
00058 vtkCell *GetFace(int faceId);
00059 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00060 int EvaluatePosition(double x[3], double* closestPoint,
00061 int& subId, double pcoords[3],
00062 double& dist2, double *weights);
00063 void EvaluateLocation(int& subId, double pcoords[3],
00064 double x[3], double *weights);
00065 void Contour(double value, vtkDataArray *cellScalars,
00066 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00067 vtkCellArray *lines, vtkCellArray *polys,
00068 vtkPointData *inPd, vtkPointData *outPd,
00069 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00070 void Clip(double value, vtkDataArray *cellScalars,
00071 vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
00072 vtkPointData *inPd, vtkPointData *outPd,
00073 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00074 int insideOut);
00075 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00076 double x[3], double pcoords[3], int& subId);
00077 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00078 void Derivatives(int subId, double pcoords[3], double *values,
00079 int dim, double *derivs);
00080 int GetParametricCenter(double pcoords[3]);
00081 double *GetParametricCoords();
00082 int IsPrimaryCell();
00084
00086
00088 virtual void InterpolateFunctions(double pcoords[3], double *weights);
00089 virtual void InterpolateDerivs(double pcoords[3], double *derivs);
00091
00093
00098 void SetCellType(int cellType);
00099 void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
00100 void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
00101 void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
00102 void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
00103 void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
00104 void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
00105 void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
00106 void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
00107 void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
00108 void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
00109 void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
00110 void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
00111 void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
00112 void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
00113 void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
00114 void SetCellTypeToPentagonalPrism() {this->SetCellType(VTK_PENTAGONAL_PRISM);}
00115 void SetCellTypeToHexagonalPrism() {this->SetCellType(VTK_HEXAGONAL_PRISM);}
00116 void SetCellTypeToConvexPointSet() {this->SetCellType(VTK_CONVEX_POINT_SET);}
00117 void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
00118 void SetCellTypeToCubicLine() {this->SetCellType(VTK_CUBIC_LINE);}
00119 void SetCellTypeToQuadraticTriangle() {this->SetCellType(VTK_QUADRATIC_TRIANGLE);}
00120 void SetCellTypeToBiQuadraticTriangle() {this->SetCellType(VTK_BIQUADRATIC_TRIANGLE);}
00121 void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
00122 void SetCellTypeToQuadraticTetra() {this->SetCellType(VTK_QUADRATIC_TETRA);}
00123 void SetCellTypeToQuadraticHexahedron() {this->SetCellType(VTK_QUADRATIC_HEXAHEDRON);}
00124 void SetCellTypeToQuadraticWedge() {this->SetCellType(VTK_QUADRATIC_WEDGE);}
00125 void SetCellTypeToQuadraticPyramid() {this->SetCellType(VTK_QUADRATIC_PYRAMID);}
00126 void SetCellTypeToQuadraticLinearQuad() {this->SetCellType(VTK_QUADRATIC_LINEAR_QUAD);}
00127 void SetCellTypeToBiQuadraticQuad() {this->SetCellType(VTK_BIQUADRATIC_QUAD);}
00128 void SetCellTypeToQuadraticLinearWedge() {this->SetCellType(VTK_QUADRATIC_LINEAR_WEDGE);}
00129 void SetCellTypeToBiQuadraticQuadraticWedge() {
00130 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);}
00131 void SetCellTypeToTriQuadraticHexahedron() {
00132 this->SetCellType(VTK_TRIQUADRATIC_HEXAHEDRON);}
00133 void SetCellTypeToBiQuadraticQuadraticHexahedron() {
00134 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);}
00136
00138 static vtkCell* InstantiateCell(int cellType);
00139
00140 protected:
00141 vtkGenericCell();
00142 ~vtkGenericCell();
00143
00144 vtkCell *Cell;
00145
00146 private:
00147 vtkGenericCell(const vtkGenericCell&);
00148 void operator=(const vtkGenericCell&);
00149 };
00150
00151 #endif
00152
00153