VTK  9.2.6
vtkPath.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPath.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkPath_h
28 #define vtkPath_h
29 
30 #include "vtkCommonDataModelModule.h" // For export macro
31 #include "vtkPointSet.h"
32 
33 class vtkIntArray;
34 
35 class VTKCOMMONDATAMODEL_EXPORT vtkPath : public vtkPointSet
36 {
37 public:
38  static vtkPath* New();
39 
40  vtkTypeMacro(vtkPath, vtkPointSet);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
46  int GetDataObjectType() override { return VTK_PATH; }
47 
63  {
64  MOVE_TO = 0,
67  CUBIC_CURVE
68  };
69 
71 
74  void InsertNextPoint(float pts[3], int code);
75  void InsertNextPoint(double pts[3], int code);
76  void InsertNextPoint(double x, double y, double z, int code);
78 
80 
83  void SetCodes(vtkIntArray*);
84  vtkIntArray* GetCodes();
86 
90  vtkIdType GetNumberOfCells() override { return 0; }
91  using vtkDataSet::GetCell;
92  vtkCell* GetCell(vtkIdType) override { return nullptr; }
93  void GetCell(vtkIdType, vtkGenericCell*) override;
94  int GetCellType(vtkIdType) override { return 0; }
95 
99  void GetCellPoints(vtkIdType, vtkIdList* ptIds) override;
100 
104  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
105 
109  int GetMaxCellSize() override { return 0; }
110 
115  void Allocate(vtkIdType size = 1000, int extSize = 1000);
116 
121  void Reset();
122 
124 
128  static vtkPath* GetData(vtkInformationVector* v, int i = 0);
130 
131 protected:
132  vtkPath();
133  ~vtkPath() override;
134 
135 private:
136  vtkPath(const vtkPath&) = delete;
137  void operator=(const vtkPath&) = delete;
138 };
139 
140 #endif
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:46
int GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:94
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:35
Store vtkAlgorithm input/output information.
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
Definition: vtkPath.h:109
void GetCellPoints(vtkIdType, vtkIdList *idList) override
Topological inquiry to get points defining cell.
Definition: vtkPointSet.h:145
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:69
int vtkIdType
Definition: vtkType.h:332
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:60
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition: vtkPath.h:90
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
Definition: vtkIndent.h:39
static vtkPointSet * New()
Standard instantiation method.
list of point or cell ids
Definition: vtkIdList.h:33
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:146
Store zero or more vtkInformation instances.
#define VTK_PATH
Definition: vtkType.h:112
vtkCell * GetCell(vtkIdType) override
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:138
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:92
ControlPointType
Enumeration of recognized control point types:
Definition: vtkPath.h:62
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.