VTK
vtkPolyLine.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyLine.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 =========================================================================*/
28 #ifndef __vtkPolyLine_h
29 #define __vtkPolyLine_h
30 
31 #include "vtkCell.h"
32 
33 class vtkPoints;
34 class vtkCellArray;
35 class vtkLine;
36 class vtkDataArray;
38 class vtkCellData;
39 
41 {
42 public:
43  static vtkPolyLine *New();
44  vtkTypeMacro(vtkPolyLine,vtkCell);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
53  static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *);
54  static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *,
55  double* firstNormal);
57 
59 
60  int GetCellType() {return VTK_POLY_LINE;};
61  int GetCellDimension() {return 1;};
62  int GetNumberOfEdges() {return 0;};
63  int GetNumberOfFaces() {return 0;};
64  vtkCell *GetEdge(int vtkNotUsed(edgeId)) {return 0;};
65  vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
66  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
67  void Contour(double value, vtkDataArray *cellScalars,
69  vtkCellArray *lines, vtkCellArray *polys,
70  vtkPointData *inPd, vtkPointData *outPd,
71  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
72  void Clip(double value, vtkDataArray *cellScalars,
74  vtkPointData *inPd, vtkPointData *outPd,
75  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
76  int insideOut);
77  int EvaluatePosition(double x[3], double* closestPoint,
78  int& subId, double pcoords[3],
79  double& dist2, double *weights);
80  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
81  double *weights);
82  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
83  double x[3], double pcoords[3], int& subId);
84  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
85  void Derivatives(int subId, double pcoords[3], double *values,
86  int dim, double *derivs);
87  int IsPrimaryCell() {return 0;}
89 
91  int GetParametricCenter(double pcoords[3]);
92 
94 
96  virtual void InterpolateFunctions(double pcoords[3], double *weights);
97  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
99 
100 protected:
101  vtkPolyLine();
102  ~vtkPolyLine();
103 
105 
106 private:
107  vtkPolyLine(const vtkPolyLine&); // Not implemented.
108  void operator=(const vtkPolyLine&); // Not implemented.
109 };
110 
111 #endif
112 
113