00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00048 #ifndef __vtkGenericCell_h
00049 #define __vtkGenericCell_h
00050
00051 #include "vtkCell.h"
00052
00053 class VTK_COMMON_EXPORT vtkGenericCell : public vtkCell
00054 {
00055 public:
00057 static vtkGenericCell *New();
00058
00059 vtkTypeRevisionMacro(vtkGenericCell,vtkCell);
00060
00062
00063 void ShallowCopy(vtkCell *c);
00064 void DeepCopy(vtkCell *c);
00065 int GetCellType();
00066 int GetCellDimension();
00067 int IsLinear();
00068 int RequiresInitialization();
00069 void Initialize();
00070 int GetNumberOfEdges();
00071 int GetNumberOfFaces();
00072 vtkCell *GetEdge(int edgeId);
00073 vtkCell *GetFace(int faceId);
00074 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00075 int EvaluatePosition(float x[3], float* closestPoint,
00076 int& subId, float pcoords[3],
00077 float& dist2, float *weights);
00078 void EvaluateLocation(int& subId, float pcoords[3],
00079 float x[3], float *weights);
00080 void Contour(float value, vtkDataArray *cellScalars,
00081 vtkPointLocator *locator, vtkCellArray *verts,
00082 vtkCellArray *lines, vtkCellArray *polys,
00083 vtkPointData *inPd, vtkPointData *outPd,
00084 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00085 void Clip(float value, vtkDataArray *cellScalars,
00086 vtkPointLocator *locator, vtkCellArray *connectivity,
00087 vtkPointData *inPd, vtkPointData *outPd,
00088 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00089 int insideOut);
00090 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00091 float x[3], float pcoords[3], int& subId);
00092 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00093 void Derivatives(int subId, float pcoords[3], float *values,
00094 int dim, float *derivs);
00095 int GetParametricCenter(float pcoords[3]);
00097
00099
00104 void SetCellType(int cellType);
00105 void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
00106 void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
00107 void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
00108 void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
00109 void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
00110 void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
00111 void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
00112 void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
00113 void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
00114 void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
00115 void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
00116 void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
00117 void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
00118 void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
00119 void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
00120 void SetCellTypeToConvexPointSet() {this->SetCellType(VTK_CONVEX_POINT_SET);}
00121 void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
00122 void SetCellTypeToQuadraticTriangle() {this->SetCellType(VTK_QUADRATIC_TRIANGLE);}
00123 void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
00124 void SetCellTypeToQuadraticTetra() {this->SetCellType(VTK_QUADRATIC_TETRA);}
00125 void SetCellTypeToQuadraticHexahedron() {this->SetCellType(VTK_QUADRATIC_HEXAHEDRON);}
00127
00128 protected:
00129 vtkGenericCell();
00130 ~vtkGenericCell();
00131
00132 vtkCell *Cell;
00133
00134 private:
00135 vtkGenericCell(const vtkGenericCell&);
00136 void operator=(const vtkGenericCell&);
00137 };
00138
00139 #endif
00140
00141