65 int& subId,
double pcoords[3],
66 double& dist2,
double *weights);
70 void Derivatives(
int subId,
double pcoords[3],
double *values,
71 int dim,
double *derivs);
90 static void InterpolationFunctions(
double pcoords[3],
double sf[3]);
92 static void InterpolationDerivs(
double pcoords[3],
double derivs[6]);
107 int *GetEdgeArray(
int edgeId);
113 double x[3],
double pcoords[3],
int& subId);
125 static void TriangleCenter(
double p1[3],
double p2[3],
double p3[3],
131 static double TriangleArea(
double p1[3],
double p2[3],
double p3[3]);
138 static double Circumcircle(
double p1[2],
double p2[2],
double p3[2],
154 static int BarycentricCoords(
double x[2],
double x1[2],
double x2[2],
155 double x3[2],
double bcoords[3]);
163 static int ProjectTo2D(
double x1[3],
double x2[3],
double x3[3],
164 double v1[2],
double v2[2],
double v3[2]);
175 static void ComputeNormal(
double v1[3],
double v2[3],
double v3[3],
double n[3]);
180 static void ComputeNormalDirection(
double v1[3],
double v2[3],
double v3[3],
190 static int PointInTriangle(
double x[3],
double x1[3],
191 double x2[3],
double x3[3],
199 static void ComputeQuadric(
double x1[3],
double x2[3],
double x3[3],
200 double quadric[4][4]);
201 static void ComputeQuadric(
double x1[3],
double x2[3],
double x3[3],
220 pcoords[0] = pcoords[1] = 1./3; pcoords[2] = 0.0;
226 double v3[3],
double n[3])
228 double ax, ay, az, bx, by, bz;
231 ax = v3[0] - v2[0]; ay = v3[1] - v2[1]; az = v3[2] - v2[2];
232 bx = v1[0] - v2[0]; by = v1[1] - v2[1]; bz = v1[2] - v2[2];
234 n[0] = (ay * bz - az * by);
235 n[1] = (az * bx - ax * bz);
236 n[2] = (ax * by - ay * bx);
241 double v3[3],
double n[3])
247 if ( (length = sqrt((n[0]*n[0] + n[1]*n[1] + n[2]*n[2]))) != 0.0 )
257 double p3[3],
double center[3])
259 center[0] = (p1[0]+p2[0]+p3[0]) / 3.0;
260 center[1] = (p1[1]+p2[1]+p3[1]) / 3.0;
261 center[2] = (p1[2]+p2[2]+p3[2]) / 3.0;
271 return (0.25* sqrt(fabs(4.0*a*c - (a-b+c)*(a-b+c))));
static void InterpolationDerivs(double pcoords[3], double derivs[6])
represent and manipulate point attribute data
void PrintSelf(ostream &os, vtkIndent indent)
virtual double * GetParametricCoords()
virtual void InterpolateDerivs(double pcoords[3], double derivs[6])
represent and manipulate cell attribute data
virtual void InterpolateFunctions(double pcoords[3], double sf[3])
Abstract class in support of both point location and point insertion.
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
static void ComputeNormalDirection(double v1[3], double v2[3], double v3[3], double n[3])
static void ComputeNormal(vtkPoints *p, int numPts, vtkIdType *pts, double n[3])
cell represents a 1D line
abstract class to specify cell behavior
virtual double GetParametricDistance(double pcoords[3])
static void InterpolationFunctions(double pcoords[3], double sf[3])
a simple class to control print indentation
evaluate implicit quadric function
list of point or cell ids
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
abstract superclass for arrays of numeric data
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
static void TriangleCenter(double p1[3], double p2[3], double p3[3], double center[3])
object to represent cell connectivity
virtual vtkCell * GetEdge(int edgeId)=0
a cell that represents a triangle
int GetParametricCenter(double pcoords[3])
virtual void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)=0
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static float Distance2BetweenPoints(const float x[3], const float y[3])
virtual int GetParametricCenter(double pcoords[3])
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
static double TriangleArea(double p1[3], double p2[3], double p3[3])