VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkCell.h"
33 
34 class vtkPoints;
35 class vtkCellArray;
36 class vtkLine;
37 class vtkDataArray;
38 class vtkIncrementalPointLocator;
39 class vtkCellData;
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkPolyLine : public vtkCell
42 {
43 public:
44  static vtkPolyLine *New();
45  vtkTypeMacro(vtkPolyLine,vtkCell);
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
54  static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *);
55  static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *,
56  double* firstNormal);
58 
60 
61  int GetCellType() {return VTK_POLY_LINE;};
62  int GetCellDimension() {return 1;};
63  int GetNumberOfEdges() {return 0;};
64  int GetNumberOfFaces() {return 0;};
65  vtkCell *GetEdge(int vtkNotUsed(edgeId)) {return 0;};
66  vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
67  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
68  void Contour(double value, vtkDataArray *cellScalars,
69  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
70  vtkCellArray *lines, vtkCellArray *polys,
71  vtkPointData *inPd, vtkPointData *outPd,
72  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
73  void Clip(double value, vtkDataArray *cellScalars,
74  vtkIncrementalPointLocator *locator, vtkCellArray *lines,
75  vtkPointData *inPd, vtkPointData *outPd,
76  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
77  int insideOut);
78  int EvaluatePosition(double x[3], double* closestPoint,
79  int& subId, double pcoords[3],
80  double& dist2, double *weights);
81  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
82  double *weights);
83  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
84  double x[3], double pcoords[3], int& subId);
85  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
86  void Derivatives(int subId, double pcoords[3], double *values,
87  int dim, double *derivs);
88  int IsPrimaryCell() {return 0;}
90 
92  int GetParametricCenter(double pcoords[3]);
93 
95 
97  virtual void InterpolateFunctions(double pcoords[3], double *weights);
98  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
100 
101 protected:
102  vtkPolyLine();
103  ~vtkPolyLine();
104 
105  vtkLine *Line;
106 
107 private:
108  vtkPolyLine(const vtkPolyLine&); // Not implemented.
109  void operator=(const vtkPolyLine&); // Not implemented.
110 };
111 
112 #endif
113 
114 
vtkLine * Line
Definition: vtkPolyLine.h:105
int GetNumberOfEdges()
Definition: vtkPolyLine.h:63
vtkCell * GetEdge(int vtkNotUsed(edgeId))
Definition: vtkPolyLine.h:65
int vtkIdType
Definition: vtkType.h:268
int GetCellDimension()
Definition: vtkPolyLine.h:62
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
vtkCell * GetFace(int vtkNotUsed(faceId))
Definition: vtkPolyLine.h:66
int GetNumberOfFaces()
Definition: vtkPolyLine.h:64
int GetCellType()
Definition: vtkPolyLine.h:61
represent and manipulate 3D points
Definition: vtkPoints.h:39
int IsPrimaryCell()
Definition: vtkPolyLine.h:88
cell represents a set of 1D lines
Definition: vtkPolyLine.h:41