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 
40 class VTK_FILTERING_EXPORT vtkPolyLine : public vtkCell
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 
104  vtkLine *Line;
105 
106 private:
107  vtkPolyLine(const vtkPolyLine&); // Not implemented.
108  void operator=(const vtkPolyLine&); // Not implemented.
109 };
110 
111 #endif
112 
113 
vtkLine * Line
Definition: vtkPolyLine.h:104
#define VTK_FILTERING_EXPORT
int GetNumberOfEdges()
Definition: vtkPolyLine.h:62
vtkCell * GetEdge(int vtkNotUsed(edgeId))
Definition: vtkPolyLine.h:64
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
Abstract class in support of both point location and point insertion.
int vtkIdType
Definition: vtkType.h:255
int GetCellDimension()
Definition: vtkPolyLine.h:61
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
object to represent cell connectivity
Definition: vtkCellArray.h:48
vtkCell * GetFace(int vtkNotUsed(faceId))
Definition: vtkPolyLine.h:65
int GetNumberOfFaces()
Definition: vtkPolyLine.h:63
int GetCellType()
Definition: vtkPolyLine.h:60
represent and manipulate 3D points
Definition: vtkPoints.h:38
int IsPrimaryCell()
Definition: vtkPolyLine.h:87
cell represents a set of 1D lines
Definition: vtkPolyLine.h:40