VTK  9.3.0
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
24 #ifndef vtkPath_h
25 #define vtkPath_h
26 
27 #include "vtkCommonDataModelModule.h" // For export macro
28 #include "vtkPointSet.h"
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkIntArray;
32 
33 class VTKCOMMONDATAMODEL_EXPORT vtkPath : public vtkPointSet
34 {
35 public:
36  static vtkPath* New();
37 
38  vtkTypeMacro(vtkPath, vtkPointSet);
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
44  int GetDataObjectType() override { return VTK_PATH; }
45 
61  {
62  MOVE_TO = 0,
65  CUBIC_CURVE
66  };
67 
69 
72  void InsertNextPoint(float pts[3], int code);
73  void InsertNextPoint(double pts[3], int code);
74  void InsertNextPoint(double x, double y, double z, int code);
76 
78 
84 
88  vtkIdType GetNumberOfCells() override { return 0; }
89  using vtkDataSet::GetCell;
90  vtkCell* GetCell(vtkIdType) override { return nullptr; }
91  void GetCell(vtkIdType, vtkGenericCell*) override;
92  int GetCellType(vtkIdType) override { return 0; }
93 
97  void GetCellPoints(vtkIdType, vtkIdList* ptIds) override;
98 
102  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
103 
107  int GetMaxCellSize() override { return 0; }
108 
113  void Allocate(vtkIdType size = 1000, int extSize = 1000);
114 
119  void Reset();
120 
122 
126  static vtkPath* GetData(vtkInformationVector* v, int i = 0);
128 
129 protected:
131  ~vtkPath() override;
132 
133 private:
134  vtkPath(const vtkPath&) = delete;
135  void operator=(const vtkPath&) = delete;
136 };
137 
138 VTK_ABI_NAMESPACE_END
139 #endif
abstract class to specify cell behavior
Definition: vtkCell.h:59
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
provides thread-safe access to cells
list of point or cell ids
Definition: vtkIdList.h:32
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:34
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition: vtkPath.h:88
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:44
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:90
~vtkPath() override
static vtkPath * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
void SetCodes(vtkIntArray *)
Set/Get the array of control point codes:
void GetCellPoints(vtkIdType, vtkIdList *ptIds) override
vtkPath doesn't use cells, this method just clears ptIds.
void Reset()
Begin inserting data all over again.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Allocate(vtkIdType size=1000, int extSize=1000)
Method allocates initial storage for points.
void GetCell(vtkIdType, vtkGenericCell *) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
static vtkPath * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkIntArray * GetCodes()
Set/Get the array of control point codes:
static vtkPath * New()
void InsertNextPoint(double x, double y, double z, int code)
Insert the next control point in the path.
ControlPointType
Enumeration of recognized control point types:
Definition: vtkPath.h:61
@ LINE_TO
Definition: vtkPath.h:63
@ CONIC_CURVE
Definition: vtkPath.h:64
void InsertNextPoint(double pts[3], int code)
Insert the next control point in the path.
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
Definition: vtkPath.h:107
void InsertNextPoint(float pts[3], int code)
Insert the next control point in the path.
int GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:92
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
vtkPath doesn't use cells, this method just clears cellIds.
concrete class for storing a set of points
Definition: vtkPointSet.h:68
@ info
Definition: vtkX3D.h:376
@ size
Definition: vtkX3D.h:253
int vtkIdType
Definition: vtkType.h:315
#define VTK_PATH
Definition: vtkType.h:100