VTK: Common/DataModel/vtkPath.h Source File

| 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
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
60 enum ControlPointType
61 {
62 MOVE_TO = 0,
63 LINE_TO,
64 CONIC_CURVE,
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
81 void SetCodes(vtkIntArray*);
82 vtkIntArray* GetCodes();
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
125 static vtkPath* GetData(vtkInformation* info);
126 static vtkPath* GetData(vtkInformationVector* v, int i = 0);
128
129 protected:
130 vtkPath();
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
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:59
vtkDataSet::GetCell
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:38
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:32
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
vtkPath
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:34
vtkPath::GetNumberOfCells
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition: vtkPath.h:88
vtkPath::GetDataObjectType
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:44
vtkPath::GetCell
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:90
vtkPath::~vtkPath
~vtkPath() override
vtkPath::GetData
static vtkPath * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkPath::SetCodes
void SetCodes(vtkIntArray *)
Set/Get the array of control point codes:
vtkPath::GetCellPoints
void GetCellPoints(vtkIdType, vtkIdList *ptIds) override
vtkPath doesn't use cells, this method just clears ptIds.
vtkPath::Reset
void Reset()
Begin inserting data all over again.
vtkPath::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPath::vtkPath
vtkPath()
vtkPath::Allocate
void Allocate(vtkIdType size=1000, int extSize=1000)
Method allocates initial storage for points.
vtkPath::GetCell
void GetCell(vtkIdType, vtkGenericCell *) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkPath::GetData
static vtkPath * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkPath::GetCodes
vtkIntArray * GetCodes()
Set/Get the array of control point codes:
vtkPath::New
static vtkPath * New()
vtkPath::InsertNextPoint
void InsertNextPoint(double x, double y, double z, int code)
Insert the next control point in the path.
vtkPath::ControlPointType
ControlPointType
Enumeration of recognized control point types:
Definition: vtkPath.h:61
vtkPath::LINE_TO
@ LINE_TO
Definition: vtkPath.h:63
vtkPath::CONIC_CURVE
@ CONIC_CURVE
Definition: vtkPath.h:64
vtkPath::InsertNextPoint
void InsertNextPoint(double pts[3], int code)
Insert the next control point in the path.
vtkPath::GetMaxCellSize
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
Definition: vtkPath.h:107
vtkPath::InsertNextPoint
void InsertNextPoint(float pts[3], int code)
Insert the next control point in the path.
vtkPath::GetCellType
int GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:92
vtkPath::GetPointCells
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
vtkPath doesn't use cells, this method just clears cellIds.
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:68
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkPointSet.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
VTK_PATH
#define VTK_PATH
Definition: vtkType.h:100