Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkTriangleStrip.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkTriangleStrip.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00048 #ifndef __vtkTriangleStrip_h
    00049 #define __vtkTriangleStrip_h
    00050
    00051 #include "vtkCell.h"
    00052
    00053 class vtkLine;
    00054 class vtkTriangle;
    00055
    00056 class VTK_COMMON_EXPORT vtkTriangleStrip : public vtkCell
    00057 {
    00058 public:
    00059   static vtkTriangleStrip *New();
    00060   vtkTypeRevisionMacro(vtkTriangleStrip,vtkCell);
    00061
    00063
    00064   int GetCellType() {return VTK_TRIANGLE_STRIP;};
    00065   int GetCellDimension() {return 2;};
    00066   int GetNumberOfEdges() {return this->GetNumberOfPoints();};
    00067   int GetNumberOfFaces() {return 0;};
    00068   vtkCell *GetEdge(int edgeId);
    00069   vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
    00070   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
    00071   void Contour(float value, vtkDataArray *cellScalars,
    00072                vtkPointLocator *locator, vtkCellArray *verts,
    00073                vtkCellArray *lines, vtkCellArray *polys,
    00074                vtkPointData *inPd, vtkPointData *outPd,
    00075                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
    00076   void Clip(float value, vtkDataArray *cellScalars,
    00077             vtkPointLocator *locator, vtkCellArray *polys,
    00078             vtkPointData *inPd, vtkPointData *outPd,
    00079             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
    00080             int insideOut);
    00082
    00083   int EvaluatePosition(float x[3], float* closestPoint,
    00084                        int& subId, float pcoords[3],
    00085                        float& dist2, float *weights);
    00086   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
    00087                         float *weights);
    00088   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
    00089                         float x[3], float pcoords[3], int& subId);
    00090   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
    00091   void Derivatives(int subId, float pcoords[3], float *values,
    00092                    int dim, float *derivs);
    00093
    00095   int GetParametricCenter(float pcoords[3]);
    00096
    00100   static void DecomposeStrip(int npts, vtkIdType *pts, vtkCellArray *tris);
    00101
    00102
    00103 protected:
    00104   vtkTriangleStrip();
    00105   ~vtkTriangleStrip();
    00106
    00107   vtkLine *Line;
    00108   vtkTriangle *Triangle;
    00109
    00110 private:
    00111   vtkTriangleStrip(const vtkTriangleStrip&);  // Not implemented.
    00112   void operator=(const vtkTriangleStrip&);  // Not implemented.
    00113 };
    00114
    00115 #endif
    00116
    00117