00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00035 #ifndef __vtkCubicLine_h
00036 #define __vtkCubicLine_h
00037
00038 #include "vtkNonLinearCell.h"
00039
00040 class vtkLine;
00041 class vtkDoubleArray;
00042
00043 class VTK_FILTERING_EXPORT vtkCubicLine : public vtkNonLinearCell
00044 {
00045 public:
00046 static vtkCubicLine *New();
00047 vtkTypeMacro(vtkCubicLine,vtkNonLinearCell);
00048 void PrintSelf(ostream& os, vtkIndent indent);
00049
00051
00052 int GetCellType() {return VTK_CUBIC_LINE;};
00053 int GetCellDimension() {return 1;};
00054 int GetNumberOfEdges() {return 0;};
00055 int GetNumberOfFaces() {return 0;};
00056 vtkCell *GetEdge(int) {return 0;};
00057 vtkCell *GetFace(int) {return 0;};
00058 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00059 void Contour(double value, vtkDataArray *cellScalars,
00060 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00061 vtkCellArray *lines, vtkCellArray *polys,
00062 vtkPointData *inPd, vtkPointData *outPd,
00063 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00064 int EvaluatePosition(double x[3], double* closestPoint,
00065 int& subId, double pcoords[3],
00066 double& dist2, double *weights);
00067 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00068 double *weights);
00069 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00070 void Derivatives(int subId, double pcoords[3], double *values,
00071 int dim, double *derivs);
00072 virtual double *GetParametricCoords();
00074
00077 double GetParametricDistance(double pcoords[3]);
00078
00080
00082 void Clip(double value, vtkDataArray *cellScalars,
00083 vtkIncrementalPointLocator *locator, vtkCellArray *lines,
00084 vtkPointData *inPd, vtkPointData *outPd,
00085 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00086 int insideOut);
00088
00090 int GetParametricCenter(double pcoords[3]);
00091
00093
00095 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00096 double x[3], double pcoords[3], int& subId);
00098
00099
00100
00102
00104 static void InterpolationFunctions(double pcoords[3], double weights[4]);
00105
00106
00107 static void InterpolationDerivs(double pcoords[3], double derivs[4]);
00108
00109
00110
00111 virtual void InterpolateFunctions(double pcoords[3], double weights[4])
00112 {
00113 vtkCubicLine::InterpolationFunctions(pcoords,weights);
00114 }
00115 virtual void InterpolateDerivs(double pcoords[3], double derivs[4])
00116 {
00117 vtkCubicLine::InterpolationDerivs(pcoords,derivs);
00118 }
00120
00121 protected:
00122 vtkCubicLine();
00123 ~vtkCubicLine();
00124
00125 vtkLine *Line;
00126 vtkDoubleArray *Scalars;
00127
00128 private:
00129 vtkCubicLine(const vtkCubicLine&);
00130 void operator=(const vtkCubicLine&);
00131 };
00132
00133
00134 inline int vtkCubicLine::GetParametricCenter(double pcoords[3])
00135 {
00136
00137 pcoords[0]=pcoords[1] = pcoords[2] = 0.0;
00138 return 0;
00139 }
00140
00141 #endif
00142
00143
00144