VTK  9.1.0
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=========================================================================*/
33#ifndef vtkPath_h
34#define vtkPath_h
35
36#include "vtkCommonDataModelModule.h" // For export macro
37#include "vtkPointSet.h"
38
39class vtkIntArray;
40
41class VTKCOMMONDATAMODEL_EXPORT vtkPath : public vtkPointSet
42{
43public:
44 static vtkPath* New();
45
46 vtkTypeMacro(vtkPath, vtkPointSet);
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
52 int GetDataObjectType() override { return VTK_PATH; }
53
69 {
70 MOVE_TO = 0,
73 CUBIC_CURVE
74 };
75
77
80 void InsertNextPoint(float pts[3], int code);
81 void InsertNextPoint(double pts[3], int code);
82 void InsertNextPoint(double x, double y, double z, int code);
84
86
92
96 vtkIdType GetNumberOfCells() override { return 0; }
98 vtkCell* GetCell(vtkIdType) override { return nullptr; }
100 int GetCellType(vtkIdType) override { return 0; }
101
105 void GetCellPoints(vtkIdType, vtkIdList* ptIds) override;
106
110 void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
111
115 int GetMaxCellSize() override { return 0; }
116
121 void Allocate(vtkIdType size = 1000, int extSize = 1000);
122
127 void Reset();
128
130
134 static vtkPath* GetData(vtkInformationVector* v, int i = 0);
136
137protected:
139 ~vtkPath() override;
140
141private:
142 vtkPath(const vtkPath&) = delete;
143 void operator=(const vtkPath&) = delete;
144};
145
146#endif
abstract class to specify cell behavior
Definition: vtkCell.h:67
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:40
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:49
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:42
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition: vtkPath.h:96
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:52
~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.
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:98
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:69
@ LINE_TO
Definition: vtkPath.h:71
@ CONIC_CURVE
Definition: vtkPath.h:72
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:115
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 GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:100
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:76
@ info
Definition: vtkX3D.h:382
@ size
Definition: vtkX3D.h:259
int vtkIdType
Definition: vtkType.h:332
#define VTK_PATH
Definition: vtkType.h:112