00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00043 #ifndef __vtkLine_h
00044 #define __vtkLine_h
00045
00046 #include "vtkCell.h"
00047
00048 class VTK_COMMON_EXPORT vtkLine : public vtkCell
00049 {
00050 public:
00051 static vtkLine *New();
00052 vtkTypeRevisionMacro(vtkLine,vtkCell);
00053
00055
00056 int GetCellType() {return VTK_LINE;};
00057 int GetCellDimension() {return 1;};
00058 int GetNumberOfEdges() {return 0;};
00059 int GetNumberOfFaces() {return 0;};
00060 vtkCell *GetEdge(int) {return 0;};
00061 vtkCell *GetFace(int) {return 0;};
00062 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00063 void Contour(float value, vtkDataArray *cellScalars,
00064 vtkPointLocator *locator, vtkCellArray *verts,
00065 vtkCellArray *lines, vtkCellArray *polys,
00066 vtkPointData *inPd, vtkPointData *outPd,
00067 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00068 int EvaluatePosition(float x[3], float* closestPoint,
00069 int& subId, float pcoords[3],
00070 float& dist2, float *weights);
00071 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00072 float *weights);
00073 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00074 void Derivatives(int subId, float pcoords[3], float *values,
00075 int dim, float *derivs);
00077
00079
00081 void Clip(float value, vtkDataArray *cellScalars,
00082 vtkPointLocator *locator, vtkCellArray *lines,
00083 vtkPointData *inPd, vtkPointData *outPd,
00084 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00085 int insideOut);
00087
00089
00091 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00092 float x[3], float pcoords[3], int& subId);
00094
00095
00097
00102 static int Intersection(float p1[3], float p2[3], float x1[3], float x2[3],
00103 float& u, float& v);
00105
00106
00108
00110 static float DistanceToLine(float x[3], float p1[3], float p2[3],
00111 float &t, float closestPoint[3]);
00113
00114
00118 static float DistanceToLine(float x[3], float p1[3], float p2[3]);
00119
00121 static void InterpolationFunctions(float pcoords[3], float weights[2]);
00122
00123 protected:
00124 vtkLine();
00125 ~vtkLine() {};
00126
00127 private:
00128 vtkLine(const vtkLine&);
00129 void operator=(const vtkLine&);
00130 };
00131
00132 #endif
00133
00134