00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00049 #ifndef __vtkTriangleStrip_h
00050 #define __vtkTriangleStrip_h
00051
00052 #include "vtkCell.h"
00053
00054 class vtkLine;
00055 class vtkTriangle;
00056
00057 class VTK_COMMON_EXPORT vtkTriangleStrip : public vtkCell
00058 {
00059 public:
00060 static vtkTriangleStrip *New();
00061 vtkTypeRevisionMacro(vtkTriangleStrip,vtkCell);
00062
00064
00065 int GetCellType() {return VTK_TRIANGLE_STRIP;};
00066 int GetCellDimension() {return 2;};
00067 int GetNumberOfEdges() {return this->GetNumberOfPoints();};
00068 int GetNumberOfFaces() {return 0;};
00069 vtkCell *GetEdge(int edgeId);
00070 vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
00071 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00072 void Contour(float value, vtkDataArray *cellScalars,
00073 vtkPointLocator *locator, vtkCellArray *verts,
00074 vtkCellArray *lines, vtkCellArray *polys,
00075 vtkPointData *inPd, vtkPointData *outPd,
00076 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00077 void Clip(float value, vtkDataArray *cellScalars,
00078 vtkPointLocator *locator, vtkCellArray *polys,
00079 vtkPointData *inPd, vtkPointData *outPd,
00080 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00081 int insideOut);
00083
00084 int EvaluatePosition(float x[3], float* closestPoint,
00085 int& subId, float pcoords[3],
00086 float& dist2, float *weights);
00087 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00088 float *weights);
00089 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00090 float x[3], float pcoords[3], int& subId);
00091 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00092 void Derivatives(int subId, float pcoords[3], float *values,
00093 int dim, float *derivs);
00094
00096 int GetParametricCenter(float pcoords[3]);
00097
00101 static void DecomposeStrip(int npts, vtkIdType *pts, vtkCellArray *tris);
00102
00103
00104 protected:
00105 vtkTriangleStrip();
00106 ~vtkTriangleStrip();
00107
00108 vtkLine *Line;
00109 vtkTriangle *Triangle;
00110
00111 private:
00112 vtkTriangleStrip(const vtkTriangleStrip&);
00113 void operator=(const vtkTriangleStrip&);
00114 };
00115
00116 #endif
00117
00118