00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkLine_h
00028 #define __vtkLine_h
00029
00030 #include "vtkCell.h"
00031
00032 class VTK_COMMON_EXPORT vtkLine : public vtkCell
00033 {
00034 public:
00035 static vtkLine *New();
00036 vtkTypeRevisionMacro(vtkLine,vtkCell);
00037
00039
00040 int GetCellType() {return VTK_LINE;};
00041 int GetCellDimension() {return 1;};
00042 int GetNumberOfEdges() {return 0;};
00043 int GetNumberOfFaces() {return 0;};
00044 vtkCell *GetEdge(int) {return 0;};
00045 vtkCell *GetFace(int) {return 0;};
00046 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00047 void Contour(double value, vtkDataArray *cellScalars,
00048 vtkPointLocator *locator, vtkCellArray *verts,
00049 vtkCellArray *lines, vtkCellArray *polys,
00050 vtkPointData *inPd, vtkPointData *outPd,
00051 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00052 int EvaluatePosition(double x[3], double* closestPoint,
00053 int& subId, double pcoords[3],
00054 double& dist2, double *weights);
00055 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00056 double *weights);
00057 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00058 void Derivatives(int subId, double pcoords[3], double *values,
00059 int dim, double *derivs);
00060 virtual double *GetParametricCoords();
00062
00064
00066 void Clip(double value, vtkDataArray *cellScalars,
00067 vtkPointLocator *locator, vtkCellArray *lines,
00068 vtkPointData *inPd, vtkPointData *outPd,
00069 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00070 int insideOut);
00072
00074
00076 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00077 double x[3], double pcoords[3], int& subId);
00079
00080
00082
00087 static int Intersection(double p1[3], double p2[3],
00088 double x1[3], double x2[3],
00089 double& u, double& v);
00091
00092
00094
00096 static double DistanceToLine(double x[3], double p1[3], double p2[3],
00097 double &t, double closestPoint[3]);
00099
00100
00104 static double DistanceToLine(double x[3], double p1[3], double p2[3]);
00105
00107 static void InterpolationFunctions(double pcoords[3], double weights[2]);
00108
00109 protected:
00110 vtkLine();
00111 ~vtkLine() {};
00112
00113 private:
00114 vtkLine(const vtkLine&);
00115 void operator=(const vtkLine&);
00116 };
00117
00118 #endif
00119
00120