00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00040 #ifndef __vtkBiQuadraticTriangle_h
00041 #define __vtkBiQuadraticTriangle_h
00042
00043 #include "vtkNonLinearCell.h"
00044
00045 class vtkQuadraticEdge;
00046 class vtkTriangle;
00047 class vtkDoubleArray;
00048
00049 class VTK_FILTERING_EXPORT vtkBiQuadraticTriangle : public vtkNonLinearCell
00050 {
00051 public:
00052 static vtkBiQuadraticTriangle *New();
00053 vtkTypeMacro(vtkBiQuadraticTriangle,vtkNonLinearCell);
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00057
00059 int GetCellType() {return VTK_BIQUADRATIC_TRIANGLE;};
00060 int GetCellDimension() {return 2;}
00061 int GetNumberOfEdges() {return 3;}
00062 int GetNumberOfFaces() {return 0;}
00063 vtkCell *GetEdge(int edgeId);
00064 vtkCell *GetFace(int) {return 0;}
00066
00067 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
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 int EvaluatePosition(double x[3], double* closestPoint,
00074 int& subId, double pcoords[3],
00075 double& dist2, double *weights);
00076 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00077 double *weights);
00078 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00079 void Derivatives(int subId, double pcoords[3], double *values,
00080 int dim, double *derivs);
00081 virtual double *GetParametricCoords();
00082
00084
00087 void Clip(double value, vtkDataArray *cellScalars,
00088 vtkIncrementalPointLocator *locator, vtkCellArray *polys,
00089 vtkPointData *inPd, vtkPointData *outPd,
00090 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00091 int insideOut);
00093
00095
00097 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00098 double x[3], double pcoords[3], int& subId);
00100
00101
00104 int GetParametricCenter(double pcoords[3]);
00105
00108 double GetParametricDistance(double pcoords[3]);
00109
00111
00113 static void InterpolationFunctions(double pcoords[3], double weights[7]);
00114
00115
00116 static void InterpolationDerivs(double pcoords[3], double derivs[14]);
00117
00118
00119
00120 virtual void InterpolateFunctions(double pcoords[3], double weights[7])
00121 {
00122 vtkBiQuadraticTriangle::InterpolationFunctions(pcoords,weights);
00123 }
00124 virtual void InterpolateDerivs(double pcoords[3], double derivs[14])
00125 {
00126 vtkBiQuadraticTriangle::InterpolationDerivs(pcoords,derivs);
00127 }
00129
00130 protected:
00131 vtkBiQuadraticTriangle();
00132 ~vtkBiQuadraticTriangle();
00133
00134 vtkQuadraticEdge *Edge;
00135 vtkTriangle *Face;
00136 vtkDoubleArray *Scalars;
00137
00138 private:
00139 vtkBiQuadraticTriangle(const vtkBiQuadraticTriangle&);
00140 void operator=(const vtkBiQuadraticTriangle&);
00141 };
00142
00143 inline int vtkBiQuadraticTriangle::GetParametricCenter(double pcoords[3])
00144 {
00145 pcoords[0] = pcoords[1] = 1./3;
00146 pcoords[2] = 0.0;
00147 return 0;
00148 }
00149
00150
00151 #endif
00152
00153