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 =========================================================================*/
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) VTK_OVERRIDE;
42 
46  int GetDataObjectType() VTK_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 
86 
90  vtkIdType GetNumberOfCells() VTK_OVERRIDE { return 0; }
91  vtkCell *GetCell(vtkIdType) VTK_OVERRIDE { return NULL; }
92  void GetCell(vtkIdType, vtkGenericCell *) VTK_OVERRIDE;
93  int GetCellType(vtkIdType) VTK_OVERRIDE { return 0; }
94 
98  void GetCellPoints(vtkIdType, vtkIdList *ptIds) VTK_OVERRIDE;
99 
103  void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) VTK_OVERRIDE;
104 
108  int GetMaxCellSize() VTK_OVERRIDE { return 0; }
109 
114  void Allocate(vtkIdType size=1000, int extSize=1000);
115 
120  void Reset();
121 
123 
127  static vtkPath* GetData(vtkInformationVector* v, int i=0);
129 
130 protected:
132  ~vtkPath() VTK_OVERRIDE;
133 
134 private:
135  vtkPath(const vtkPath&) VTK_DELETE_FUNCTION;
136  void operator=(const vtkPath&) VTK_DELETE_FUNCTION;
137 };
138 
139 #endif
vtkPath::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPath::InsertNextPoint
void InsertNextPoint(double pts[3], int code)
vtkPath::GetCellPoints
void GetCellPoints(vtkIdType, vtkIdList *ptIds) override
vtkPath doesn't use cells, this method just clears ptIds.
vtkPointSet.h
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkPath::GetCell
vtkCell * GetCell(vtkIdType) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:91
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkPath
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:36
vtkPath::GetCellType
int GetCellType(vtkIdType) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPath.h:93
vtkPath::GetCell
void GetCell(vtkIdType, vtkGenericCell *) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkPath::GetMaxCellSize
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
Definition: vtkPath.h:108
vtkPath::GetCodes
vtkIntArray * GetCodes()
vtkPath::New
static vtkPath * New()
vtkPath::ControlPointType
ControlPointType
Enumeration of recognized control point types:
Definition: vtkPath.h:63
vtkPath::vtkPath
vtkPath()
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:60
vtkPath::LINE_TO
@ LINE_TO
Definition: vtkPath.h:65
vtkPath::GetData
static vtkPath * GetData(vtkInformationVector *v, int i=0)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkPath::GetNumberOfCells
vtkIdType GetNumberOfCells() override
vtkPath doesn't use cells.
Definition: vtkPath.h:90
vtkPath::GetData
static vtkPath * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkPath::Allocate
void Allocate(vtkIdType size=1000, int extSize=1000)
Method allocates initial storage for points.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkPath::InsertNextPoint
void InsertNextPoint(float pts[3], int code)
Insert the next control point in the path.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkPath::CONIC_CURVE
@ CONIC_CURVE
Definition: vtkPath.h:66
vtkPath::Reset
void Reset()
Begin inserting data all over again.
vtkPath::~vtkPath
~vtkPath() override
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
vtkPath::SetCodes
void SetCodes(vtkIntArray *)
Set/Get the array of control point codes:
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:40
vtkPath::InsertNextPoint
void InsertNextPoint(double x, double y, double z, int code)
VTK_PATH
#define VTK_PATH
Definition: vtkType.h:122
vtkPath::GetDataObjectType
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPath.h:46
vtkPath::GetPointCells
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
vtkPath doesn't use cells, this method just clears cellIds.