VTK
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 =========================================================================*/
24 #ifndef vtkPath_h
25 #define vtkPath_h
26 
27 #include "vtkCommonDataModelModule.h" // For export macro
28 #include "vtkPointSet.h"
29 
30 class vtkIntArray;
31 
32 class VTKCOMMONDATAMODEL_EXPORT vtkPath : public vtkPointSet
33 {
34 public:
35  static vtkPath *New();
36 
37  vtkTypeMacro(vtkPath,vtkPointSet);
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  int GetDataObjectType() override {return VTK_PATH;}
44 
60  {
61  MOVE_TO = 0,
64  CUBIC_CURVE
65  };
66 
68 
71  void InsertNextPoint(float pts[3], int code);
72  void InsertNextPoint(double pts[3], int code);
73  void InsertNextPoint(double x, double y, double z, int code);
75 
77 
80  void SetCodes(vtkIntArray *);
81  vtkIntArray *GetCodes();
83 
87  vtkIdType GetNumberOfCells() override { return 0; }
88  using vtkDataSet::GetCell;
89  vtkCell *GetCell(vtkIdType) override { return nullptr; }
90  void GetCell(vtkIdType, vtkGenericCell *) override;
91  int GetCellType(vtkIdType) override { return 0; }
92 
96  void GetCellPoints(vtkIdType, vtkIdList *ptIds) override;
97 
101  void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override;
102 
106  int GetMaxCellSize() override { return 0; }
107 
112  void Allocate(vtkIdType size=1000, int extSize=1000);
113 
118  void Reset();
119 
121 
125  static vtkPath* GetData(vtkInformationVector* v, int i=0);
127 
128 protected:
129  vtkPath();
130  ~vtkPath() override;
131 
132 private:
133  vtkPath(const vtkPath&) = delete;
134  void operator=(const vtkPath&) = delete;
135 };
136 
137 #endif
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:43
int GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:91
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
Topological inquiry to get cells using point.
static vtkDataObject * New()
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:32
Store vtkAlgorithm input/output information.
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
Definition: vtkPath.h:106
static vtkPointSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:39
int vtkIdType
Definition: vtkType.h:345
provides thread-safe access to cells
abstract class to specify cell behavior
Definition: vtkCell.h:56
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
vtkIdType GetNumberOfCells() override
vtkPath doesn&#39;t use cells.
Definition: vtkPath.h:87
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
list of point or cell ids
Definition: vtkIdList.h:30
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
Store zero or more vtkInformation instances.
#define VTK_PATH
Definition: vtkType.h:126
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:89
ControlPointType
Enumeration of recognized control point types:
Definition: vtkPath.h:59
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.