VTK
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 
43 {
44 public:
45  static vtkTriangleStrip *New();
46  vtkTypeMacro(vtkTriangleStrip,vtkCell);
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
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,
60  vtkCellArray *lines, vtkCellArray *polys,
61  vtkPointData *inPd, vtkPointData *outPd,
62  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
63  void Clip(double value, vtkDataArray *cellScalars,
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 
90 protected:
93 
96 
97 private:
98  vtkTriangleStrip(const vtkTriangleStrip&); // Not implemented.
99  void operator=(const vtkTriangleStrip&); // Not implemented.
100 };
101 
102 #endif
103 
104 
vtkCell * GetFace(int vtkNotUsed(faceId))
vtkIdType GetNumberOfPoints()
Definition: vtkCell.h:117
represent and manipulate point attribute data
Definition: vtkPointData.h:36
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
Abstract class in support of both point location and point insertion.
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
int vtkIdType
Definition: vtkType.h:275
a cell that represents a triangle strip
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:61
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
vtkTriangle * Triangle
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual vtkCell * GetEdge(int edgeId)=0
a cell that represents a triangle
Definition: vtkTriangle.h:40
virtual void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)=0
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38