00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00045 #ifndef __vtkQuadraticTriangle_h
00046 #define __vtkQuadraticTriangle_h
00047
00048 #include "vtkNonLinearCell.h"
00049
00050 class vtkPolyData;
00051 class vtkQuadraticEdge;
00052 class vtkTriangle;
00053 class vtkDoubleArray;
00054
00055 class VTK_FILTERING_EXPORT vtkQuadraticTriangle : public vtkNonLinearCell
00056 {
00057 public:
00058 static vtkQuadraticTriangle *New();
00059 vtkTypeRevisionMacro(vtkQuadraticTriangle,vtkNonLinearCell);
00060 void PrintSelf(ostream& os, vtkIndent indent);
00061
00063
00065 int GetCellType() {return VTK_QUADRATIC_TRIANGLE;};
00066 int GetCellDimension() {return 2;}
00067 int GetNumberOfEdges() {return 3;}
00068 int GetNumberOfFaces() {return 0;}
00069 vtkCell *GetEdge(int edgeId);
00070 vtkCell *GetFace(int) {return 0;}
00072
00073 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00074 void Contour(double value, vtkDataArray *cellScalars,
00075 vtkPointLocator *locator, vtkCellArray *verts,
00076 vtkCellArray *lines, vtkCellArray *polys,
00077 vtkPointData *inPd, vtkPointData *outPd,
00078 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00079 int EvaluatePosition(double x[3], double* closestPoint,
00080 int& subId, double pcoords[3],
00081 double& dist2, double *weights);
00082 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00083 double *weights);
00084 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00085 void Derivatives(int subId, double pcoords[3], double *values,
00086 int dim, double *derivs);
00087 virtual double *GetParametricCoords();
00088
00090
00093 void Clip(double value, vtkDataArray *cellScalars,
00094 vtkPointLocator *locator, vtkCellArray *polys,
00095 vtkPointData *inPd, vtkPointData *outPd,
00096 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00097 int insideOut);
00099
00101
00103 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00104 double x[3], double pcoords[3], int& subId);
00106
00107
00110 int GetParametricCenter(double pcoords[3]);
00111
00114 double GetParametricDistance(double pcoords[3]);
00115
00117
00118 static void InterpolationFunctions(double pcoords[3], double weights[6]);
00119 static void InterpolationDerivs(double pcoords[3], double derivs[12]);
00121
00122 protected:
00123 vtkQuadraticTriangle();
00124 ~vtkQuadraticTriangle();
00125
00126 vtkQuadraticEdge *Edge;
00127 vtkTriangle *Face;
00128 vtkDoubleArray *Scalars;
00129
00130 private:
00131 vtkQuadraticTriangle(const vtkQuadraticTriangle&);
00132 void operator=(const vtkQuadraticTriangle&);
00133 };
00134
00135 #endif
00136
00137