VTK
dox/Filtering/vtkTriangleStrip.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTriangleStrip.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00032 #ifndef __vtkTriangleStrip_h
00033 #define __vtkTriangleStrip_h
00034 
00035 #include "vtkCell.h"
00036 
00037 class vtkLine;
00038 class vtkTriangle;
00039 class vtkIncrementalPointLocator;
00040 
00041 class VTK_FILTERING_EXPORT vtkTriangleStrip : public vtkCell
00042 {
00043 public:
00044   static vtkTriangleStrip *New();
00045   vtkTypeMacro(vtkTriangleStrip,vtkCell);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00049 
00050   int GetCellType() {return VTK_TRIANGLE_STRIP;};
00051   int GetCellDimension() {return 2;};
00052   int GetNumberOfEdges() {return this->GetNumberOfPoints();};
00053   int GetNumberOfFaces() {return 0;};
00054   vtkCell *GetEdge(int edgeId);
00055   vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
00056   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00057   void Contour(double value, vtkDataArray *cellScalars,
00058                vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00059                vtkCellArray *lines, vtkCellArray *polys,
00060                vtkPointData *inPd, vtkPointData *outPd,
00061                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00062   void Clip(double value, vtkDataArray *cellScalars,
00063             vtkIncrementalPointLocator *locator, vtkCellArray *polys,
00064             vtkPointData *inPd, vtkPointData *outPd,
00065             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00066             int insideOut);
00068 
00069   int EvaluatePosition(double x[3], double* closestPoint,
00070                        int& subId, double pcoords[3],
00071                        double& dist2, double *weights);
00072   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00073                         double *weights);
00074   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00075                         double x[3], double pcoords[3], int& subId);
00076   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00077   void Derivatives(int subId, double pcoords[3], double *values,
00078                    int dim, double *derivs);
00079   int IsPrimaryCell() {return 0;}
00080 
00082   int GetParametricCenter(double pcoords[3]);
00083 
00087   static void DecomposeStrip(int npts, vtkIdType *pts, vtkCellArray *tris);
00088 
00090 
00092   virtual void InterpolateFunctions(double pcoords[3], double *weights);
00093   virtual void InterpolateDerivs(double pcoords[3], double *derivs);
00095 
00096 protected:
00097   vtkTriangleStrip();
00098   ~vtkTriangleStrip();
00099 
00100   vtkLine *Line;
00101   vtkTriangle *Triangle;
00102 
00103 private:
00104   vtkTriangleStrip(const vtkTriangleStrip&);  // Not implemented.
00105   void operator=(const vtkTriangleStrip&);  // Not implemented.
00106 };
00107 
00108 #endif
00109 
00110