VTK  9.6.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
14
15#ifndef vtkPath_h
16#define vtkPath_h
17
18#include "vtkCommonDataModelModule.h" // For export macro
19#include "vtkPointSet.h"
20
21VTK_ABI_NAMESPACE_BEGIN
22class vtkIntArray;
23
24class VTKCOMMONDATAMODEL_EXPORT vtkPath : public vtkPointSet
25{
26public:
27 static vtkPath* New();
28
29 vtkTypeMacro(vtkPath, vtkPointSet);
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
35 int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_PATH; }
36
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
75
79 vtkIdType GetNumberOfCells() override { return 0; }
81 vtkCell* GetCell(vtkIdType) override { return nullptr; }
83 int GetCellType(vtkIdType) override { return 0; }
84
89 void GetCellPoints(vtkIdType, vtkIdList* ptIds) override;
90
94 void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
95
99 int GetMaxCellSize() override { return 0; }
100
102
106 int GetMaxSpatialDimension() override { return 0; }
107 int GetMinSpatialDimension() override { return 0; }
109
114 void Allocate(vtkIdType size = 1000, int extSize = 1000);
115
120 void Reset();
121
123
127 static vtkPath* GetData(vtkInformationVector* v, int i = 0);
129
130protected:
132 ~vtkPath() override;
133
134private:
135 vtkPath(const vtkPath&) = delete;
136 void operator=(const vtkPath&) = delete;
137};
138
139VTK_ABI_NAMESPACE_END
140#endif
abstract class to specify cell behavior
Definition vtkCell.h:50
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
provides thread-safe access to cells
list of point or cell ids
Definition vtkIdList.h:24
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition vtkIntArray.h:35
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition vtkPath.h:79
~vtkPath() override
vtkIntArray * GetCodes()
Set/Get the array of control point codes:
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.
static vtkPath * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void Allocate(vtkIdType size=1000, int extSize=1000)
Method allocates initial storage for points.
int GetMaxSpatialDimension() override
Get the maximum/minimum spatial dimensionality of the data which is the maximum/minimum dimension of ...
Definition vtkPath.h:106
void GetCell(vtkIdType, vtkGenericCell *) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition vtkPath.h:81
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:52
@ LINE_TO
Definition vtkPath.h:54
@ CUBIC_CURVE
Definition vtkPath.h:56
@ CONIC_CURVE
Definition vtkPath.h:55
@ MOVE_TO
Definition vtkPath.h:53
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:99
void InsertNextPoint(float pts[3], int code)
Insert the next control point in the path.
static vtkPath * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
int GetDataObjectType() VTK_FUTURE_CONST 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
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
vtkPath doesn't use cells, this method just clears cellIds.
int GetMinSpatialDimension() override
Get the maximum/minimum spatial dimensionality of the data which is the maximum/minimum dimension of ...
Definition vtkPath.h:107
int vtkIdType
Definition vtkType.h:368
@ VTK_PATH
Definition vtkType.h:149