VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkTriangleStrip.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTriangleStrip.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef __vtkTriangleStrip_h
33 #define __vtkTriangleStrip_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkCell.h"
37 
38 class vtkLine;
39 class vtkTriangle;
41 
42 class VTKCOMMONDATAMODEL_EXPORT vtkTriangleStrip : public vtkCell
43 {
44 public:
45  static vtkTriangleStrip *New();
46  vtkTypeMacro(vtkTriangleStrip,vtkCell);
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
51  int GetCellType() {return VTK_TRIANGLE_STRIP;};
52  int GetCellDimension() {return 2;};
53  int GetNumberOfEdges() {return this->GetNumberOfPoints();};
54  int GetNumberOfFaces() {return 0;};
55  vtkCell *GetEdge(int edgeId);
56  vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
57  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
58  void Contour(double value, vtkDataArray *cellScalars,
59  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
60  vtkCellArray *lines, vtkCellArray *polys,
61  vtkPointData *inPd, vtkPointData *outPd,
62  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
63  void Clip(double value, vtkDataArray *cellScalars,
64  vtkIncrementalPointLocator *locator, vtkCellArray *polys,
65  vtkPointData *inPd, vtkPointData *outPd,
66  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
67  int insideOut);
69 
70  int EvaluatePosition(double x[3], double* closestPoint,
71  int& subId, double pcoords[3],
72  double& dist2, double *weights);
73  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
74  double *weights);
75  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
76  double x[3], double pcoords[3], int& subId);
77  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
78  void Derivatives(int subId, double pcoords[3], double *values,
79  int dim, double *derivs);
80  int IsPrimaryCell() {return 0;}
81 
83  int GetParametricCenter(double pcoords[3]);
84 
88  static void DecomposeStrip(int npts, vtkIdType *pts, vtkCellArray *tris);
89 
91 
93  virtual void InterpolateFunctions(double pcoords[3], double *weights);
94  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
96 
97 protected:
100 
102  vtkTriangle *Triangle;
103 
104 private:
105  vtkTriangleStrip(const vtkTriangleStrip&); // Not implemented.
106  void operator=(const vtkTriangleStrip&); // Not implemented.
107 };
108 
109 #endif
110 
111 
vtkCell * GetFace(int vtkNotUsed(faceId))
Abstract class in support of both point location and point insertion.
int vtkIdType
Definition: vtkType.h:268
a cell that represents a triangle strip
cell represents a 1D line
Definition: vtkLine.h:34
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
vtkTriangle * Triangle
represent and manipulate 3D points
Definition: vtkPoints.h:39