VTK  9.3.1
vtkPath.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
15 #ifndef vtkPath_h
16 #define vtkPath_h
17 
18 #include "vtkCommonDataModelModule.h" // For export macro
19 #include "vtkPointSet.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkIntArray;
23 
24 class VTKCOMMONDATAMODEL_EXPORT vtkPath : public vtkPointSet
25 {
26 public:
27  static vtkPath* New();
28 
29  vtkTypeMacro(vtkPath, vtkPointSet);
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
35  int GetDataObjectType() override { return VTK_PATH; }
36 
52  {
53  MOVE_TO = 0,
56  CUBIC_CURVE
57  };
58 
60 
63  void InsertNextPoint(float pts[3], int code);
64  void InsertNextPoint(double pts[3], int code);
65  void InsertNextPoint(double x, double y, double z, int code);
67 
69 
72  void SetCodes(vtkIntArray*);
73  vtkIntArray* GetCodes();
75 
79  vtkIdType GetNumberOfCells() override { return 0; }
80  using vtkDataSet::GetCell;
81  vtkCell* GetCell(vtkIdType) override { return nullptr; }
82  void GetCell(vtkIdType, vtkGenericCell*) override;
83  int GetCellType(vtkIdType) override { return 0; }
84 
88  void GetCellPoints(vtkIdType, vtkIdList* ptIds) override;
89 
93  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
94 
98  int GetMaxCellSize() override { return 0; }
99 
104  void Allocate(vtkIdType size = 1000, int extSize = 1000);
105 
110  void Reset();
111 
113 
117  static vtkPath* GetData(vtkInformationVector* v, int i = 0);
119 
120 protected:
121  vtkPath();
122  ~vtkPath() override;
123 
124 private:
125  vtkPath(const vtkPath&) = delete;
126  void operator=(const vtkPath&) = delete;
127 };
128 
129 VTK_ABI_NAMESPACE_END
130 #endif
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:35
int GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:83
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:24
Store vtkAlgorithm input/output information.
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
Definition: vtkPath.h:98
void GetCellPoints(vtkIdType, vtkIdList *idList) override
Topological inquiry to get points defining cell.
Definition: vtkPointSet.h:139
static vtkPointSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
concrete class for storing a set of points
Definition: vtkPointSet.h:58
int vtkIdType
Definition: vtkType.h:315
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:49
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:34
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition: vtkPath.h:79
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkPointSet * New()
Standard instantiation method.
list of point or cell ids
Definition: vtkIdList.h:22
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:140
Store zero or more vtkInformation instances.
#define VTK_PATH
Definition: vtkType.h:100
vtkCell * GetCell(vtkIdType) override
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:81
ControlPointType
Enumeration of recognized control point types:
Definition: vtkPath.h:51
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.