30 #ifndef __vtkPolygon_h
31 #define __vtkPolygon_h
33 #include "vtkCommonDataModelModule.h"
42 class vtkIncrementalPointLocator;
44 class VTKCOMMONDATAMODEL_EXPORT
vtkPolygon :
public vtkCell
49 void PrintSelf(ostream& os,
vtkIndent indent);
57 vtkCell *GetEdge(
int edgeId);
59 int CellBoundary(
int subId,
double pcoords[3],
vtkIdList *pts);
61 vtkIncrementalPointLocator *locator,vtkCellArray *verts,
62 vtkCellArray *lines, vtkCellArray *polys,
63 vtkPointData *inPd, vtkPointData *outPd,
64 vtkCellData *inCd,
vtkIdType cellId, vtkCellData *outCd);
66 vtkIncrementalPointLocator *locator, vtkCellArray *tris,
67 vtkPointData *inPd, vtkPointData *outPd,
68 vtkCellData *inCd,
vtkIdType cellId, vtkCellData *outCd,
70 int EvaluatePosition(
double x[3],
double* closestPoint,
71 int& subId,
double pcoords[3],
72 double& dist2,
double *weights);
73 void EvaluateLocation(
int& subId,
double pcoords[3],
double x[3],
75 int IntersectWithLine(
double p1[3],
double p2[3],
double tol,
double& t,
76 double x[3],
double pcoords[3],
int& subId);
78 void Derivatives(
int subId,
double pcoords[3],
double *values,
79 int dim,
double *derivs);
96 virtual void InterpolateFunctions(
double x[3],
double *sf);
97 virtual void InterpolateDerivs(
double x[3],
double *derivs);
104 static void ComputeNormal(
vtkPoints *p,
double n[3]);
111 static void ComputeNormal(
int numPts,
double *pts,
double n[3]);
135 int ParameterizePolygon(
double p0[3],
double p10[3],
double &l10,
136 double p20[3],
double &l20,
double n[3]);
144 static int PointInPolygon(
double x[3],
int numPts,
double *pts,
145 double bounds[6],
double n[3]);
156 int NonDegenerateTriangulate(
vtkIdList *outTris);
162 static double DistanceToPolygon(
double x[3],
int numPts,
double *pts,
163 double bounds[6],
double closest[3]);
173 static int IntersectPolygonWithPolygon(
int npts,
double *pts,
double bounds[6],
174 int npts2,
double *pts2,
175 double bounds2[3],
double tol,
189 static int IntersectConvex2DCells(vtkCell *cell1, vtkCell *cell2,
190 double tol,
double p0[3],
double p1[3]);
199 vtkGetMacro(UseMVCInterpolation,
bool);
200 vtkSetMacro(UseMVCInterpolation,
bool);
208 void InterpolateFunctionsUsingMVC(
double x[3],
double *weights);
229 int EarCutTriangulation();
dynamic, self-adjusting array of vtkIdType
dynamic, self-adjusting array of double
vtkDoubleArray * TriScalars
a simple class to control print indentation
list of point or cell ids
int SuccessfulTriangulation
abstract superclass for arrays of numeric data
a cell that represents an n-sided polygon
represent and manipulate 3D points