00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkLine_h
00038 #define __vtkLine_h
00039
00040 #include "vtkCell.h"
00041
00042 class VTK_FILTERING_EXPORT vtkLine : public vtkCell
00043 {
00044 public:
00045 static vtkLine *New();
00046 vtkTypeRevisionMacro(vtkLine,vtkCell);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048
00050
00051 int GetCellType() {return VTK_LINE;};
00052 int GetCellDimension() {return 1;};
00053 int GetNumberOfEdges() {return 0;};
00054 int GetNumberOfFaces() {return 0;};
00055 vtkCell *GetEdge(int) {return 0;};
00056 vtkCell *GetFace(int) {return 0;};
00057 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00058 void Contour(double value, vtkDataArray *cellScalars,
00059 vtkPointLocator *locator, vtkCellArray *verts,
00060 vtkCellArray *lines, vtkCellArray *polys,
00061 vtkPointData *inPd, vtkPointData *outPd,
00062 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00063 int EvaluatePosition(double x[3], double* closestPoint,
00064 int& subId, double pcoords[3],
00065 double& dist2, double *weights);
00066 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00067 double *weights);
00068 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00069 void Derivatives(int subId, double pcoords[3], double *values,
00070 int dim, double *derivs);
00071 virtual double *GetParametricCoords();
00073
00075
00077 void Clip(double value, vtkDataArray *cellScalars,
00078 vtkPointLocator *locator, vtkCellArray *lines,
00079 vtkPointData *inPd, vtkPointData *outPd,
00080 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00081 int insideOut);
00083
00085
00087 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00088 double x[3], double pcoords[3], int& subId);
00090
00091
00093
00098 static int Intersection(double p1[3], double p2[3],
00099 double x1[3], double x2[3],
00100 double& u, double& v);
00102
00103
00105
00107 static double DistanceToLine(double x[3], double p1[3], double p2[3],
00108 double &t, double closestPoint[3]);
00110
00111
00115 static double DistanceToLine(double x[3], double p1[3], double p2[3]);
00116
00118 static void InterpolationFunctions(double pcoords[3], double weights[2]);
00119
00120 protected:
00121 vtkLine();
00122 ~vtkLine() {};
00123
00124 private:
00125 vtkLine(const vtkLine&);
00126 void operator=(const vtkLine&);
00127 };
00128
00129 #endif
00130
00131