VTK  9.3.0
vtkPolyLine.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
14#ifndef vtkPolyLine_h
15#define vtkPolyLine_h
16
17#include "vtkCell.h"
18#include "vtkCommonDataModelModule.h" // For export macro
19#include "vtkNew.h" // For vtkNew.
20
21VTK_ABI_NAMESPACE_BEGIN
22class vtkPoints;
23class vtkCellArray;
24class vtkCellData;
25class vtkDataArray;
26class vtkLine;
28
29class VTKCOMMONDATAMODEL_EXPORT vtkPolyLine : public vtkCell
30{
31public:
32 static vtkPolyLine* New();
33 vtkTypeMacro(vtkPolyLine, vtkCell);
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
37
48 static int GenerateSlidingNormals(vtkPoints* pts, vtkCellArray* lines, vtkDataArray* normals);
49 static int GenerateSlidingNormals(vtkPoints* pts, vtkCellArray* lines, vtkDataArray* normals,
50 double* firstNormal, bool threading = false);
52
54
57 int GetCellType() override { return VTK_POLY_LINE; }
58 int GetCellDimension() override { return 1; }
59 int GetNumberOfEdges() override { return 0; }
60 int GetNumberOfFaces() override { return 0; }
61 vtkCell* GetEdge(int vtkNotUsed(edgeId)) override { return nullptr; }
62 vtkCell* GetFace(int vtkNotUsed(faceId)) override { return nullptr; }
63 int CellBoundary(int subId, const double pcoords[3], vtkIdList* pts) override;
64 void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
65 vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
66 vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
67 void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
68 vtkCellArray* lines, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
69 vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
70 int EvaluatePosition(const double x[3], double closestPoint[3], int& subId, double pcoords[3],
71 double& dist2, double weights[]) override;
72 void EvaluateLocation(int& subId, const double pcoords[3], double x[3], double* weights) override;
73 int IntersectWithLine(const double p1[3], const double p2[3], double tol, double& t, double x[3],
74 double pcoords[3], int& subId) override;
75 int Triangulate(int index, vtkIdList* ptIds, vtkPoints* pts) override;
77 int subId, const double pcoords[3], const double* values, int dim, double* derivs) override;
78 int IsPrimaryCell() override { return 0; }
80
84 int GetParametricCenter(double pcoords[3]) override;
85
86protected:
88 ~vtkPolyLine() override;
89
91
92private:
93 vtkPolyLine(const vtkPolyLine&) = delete;
94 void operator=(const vtkPolyLine&) = delete;
95};
96
97VTK_ABI_NAMESPACE_END
98#endif
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:31
abstract class to specify cell behavior
Definition vtkCell.h:50
abstract superclass for arrays of numeric data
list of point or cell ids
Definition vtkIdList.h:23
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:29
cell represents a 1D line
Definition vtkLine.h:23
Allocate and hold a VTK object.
Definition vtkNew.h:51
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:29
cell represents a set of 1D lines
Definition vtkPolyLine.h:30
vtkCell * GetFace(int vtkNotUsed(faceId)) override
See the vtkCell API for descriptions of these methods.
Definition vtkPolyLine.h:62
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *lines, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut) override
See the vtkCell API for descriptions of these methods.
static int GenerateSlidingNormals(vtkPoints *pts, vtkCellArray *lines, vtkDataArray *normals, double *firstNormal, bool threading=false)
Given points and lines, compute normals to the lines.
static int GenerateSlidingNormals(vtkPoints *pts, vtkCellArray *lines, vtkDataArray *normals)
Given points and lines, compute normals to the lines.
int GetNumberOfFaces() override
See the vtkCell API for descriptions of these methods.
Definition vtkPolyLine.h:60
int CellBoundary(int subId, const double pcoords[3], vtkIdList *pts) override
See the vtkCell API for descriptions of these methods.
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts) override
See the vtkCell API for descriptions of these methods.
int GetCellDimension() override
See the vtkCell API for descriptions of these methods.
Definition vtkPolyLine.h:58
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) override
See the vtkCell API for descriptions of these methods.
void EvaluateLocation(int &subId, const double pcoords[3], double x[3], double *weights) override
See the vtkCell API for descriptions of these methods.
int GetCellType() override
See the vtkCell API for descriptions of these methods.
Definition vtkPolyLine.h:57
int GetNumberOfEdges() override
See the vtkCell API for descriptions of these methods.
Definition vtkPolyLine.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkPolyLine * New()
vtkCell * GetEdge(int vtkNotUsed(edgeId)) override
See the vtkCell API for descriptions of these methods.
Definition vtkPolyLine.h:61
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
See the vtkCell API for descriptions of these methods.
int GetParametricCenter(double pcoords[3]) override
Return the center of the point cloud in parametric coordinates.
vtkNew< vtkLine > Line
Definition vtkPolyLine.h:90
~vtkPolyLine() override
void Derivatives(int subId, const double pcoords[3], const double *values, int dim, double *derivs) override
See the vtkCell API for descriptions of these methods.
int EvaluatePosition(const double x[3], double closestPoint[3], int &subId, double pcoords[3], double &dist2, double weights[]) override
See the vtkCell API for descriptions of these methods.
int IsPrimaryCell() override
See the vtkCell API for descriptions of these methods.
Definition vtkPolyLine.h:78
@ VTK_POLY_LINE
Definition vtkCellType.h:41
int vtkIdType
Definition vtkType.h:315