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 =========================================================================*/
36 #ifndef vtkPath_h
37 #define vtkPath_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkPointSet.h"
41 
42 class vtkIntArray;
43 
44 class VTKCOMMONDATAMODEL_EXPORT vtkPath : public vtkPointSet
45 {
46 public:
47  static vtkPath* New();
48 
49  vtkTypeMacro(vtkPath, vtkPointSet);
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
55  int GetDataObjectType() override { return VTK_PATH; }
56 
72  {
73  MOVE_TO = 0,
76  CUBIC_CURVE
77  };
78 
80 
83  void InsertNextPoint(float pts[3], int code);
84  void InsertNextPoint(double pts[3], int code);
85  void InsertNextPoint(double x, double y, double z, int code);
87 
89 
95 
99  vtkIdType GetNumberOfCells() override { return 0; }
100  using vtkDataSet::GetCell;
101  vtkCell* GetCell(vtkIdType) override { return nullptr; }
102  void GetCell(vtkIdType, vtkGenericCell*) override;
103  int GetCellType(vtkIdType) override { return 0; }
104 
108  void GetCellPoints(vtkIdType, vtkIdList* ptIds) override;
109 
113  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
114 
118  int GetMaxCellSize() override { return 0; }
119 
124  void Allocate(vtkIdType size = 1000, int extSize = 1000);
125 
130  void Reset();
131 
133 
137  static vtkPath* GetData(vtkInformationVector* v, int i = 0);
139 
140 protected:
142  ~vtkPath() override;
143 
144 private:
145  vtkPath(const vtkPath&) = delete;
146  void operator=(const vtkPath&) = delete;
147 };
148 
149 #endif
abstract class to specify cell behavior
Definition: vtkCell.h:70
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:43
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:55
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:45
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition: vtkPath.h:99
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:55
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:101
~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:72
@ LINE_TO
Definition: vtkPath.h:74
@ CONIC_CURVE
Definition: vtkPath.h:75
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:118
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:103
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:79
@ info
Definition: vtkX3D.h:382
@ size
Definition: vtkX3D.h:259
int vtkIdType
Definition: vtkType.h:332
#define VTK_PATH
Definition: vtkType.h:112