VTK  9.2.6
vtkStaticCellLinksTemplate.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkStaticCellLinksTemplate.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=========================================================================*/
48#ifndef vtkStaticCellLinksTemplate_h
49#define vtkStaticCellLinksTemplate_h
50
51class vtkDataSet;
52class vtkPolyData;
55class vtkCellArray;
56
58
59template <typename TIds>
61{
62public:
64
70
74 void Initialize();
75
81
86
91
96
100 void SerialBuildLinks(const vtkIdType numPts, const vtkIdType numCells, vtkCellArray* cellArray);
102 const vtkIdType numPts, const vtkIdType numCells, vtkCellArray* cellArray);
103
105
108 TIds GetNumberOfCells(vtkIdType ptId) { return (this->Offsets[ptId + 1] - this->Offsets[ptId]); }
109 vtkIdType GetNcells(vtkIdType ptId) { return (this->Offsets[ptId + 1] - this->Offsets[ptId]); }
111
116 template <typename TGivenIds>
117 bool MatchesCell(TGivenIds npts, const TGivenIds* pts);
118
122 TIds* GetCells(vtkIdType ptId) { return (this->Links + this->Offsets[ptId]); }
123
128 void GetCells(vtkIdType npts, const vtkIdType* pts, vtkIdList* cells);
129
134 TIds GetLinksSize() { return this->LinksSize; }
135
140 TIds GetOffset(vtkIdType ptId) { return this->Offsets[ptId]; }
141
143
146 unsigned long GetActualMemorySize();
148 void SelectCells(vtkIdType minMaxDegree[2], unsigned char* cellSelection);
150
152
158
159protected:
160 // The various templated data members
162 TIds NumPts;
164
165 // These point to the core data structures
166 TIds* Links; // contiguous runs of cell ids
167 TIds* Offsets; // offsets for each point into the links array
168
169 // Support for execution
170 int Type;
172
173private:
175 void operator=(const vtkStaticCellLinksTemplate&) = delete;
176};
177
178#include "vtkStaticCellLinksTemplate.txx"
179
180#endif
181// VTK-HeaderTest-Exclude: vtkStaticCellLinksTemplate.h
object to represent cell connectivity
Definition: vtkCellArray.h:187
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
structured grid with explicit topology and geometry
list of point or cell ids
Definition: vtkIdList.h:34
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:91
object represents upward pointers from points to list of cells using each point (template implementat...
TIds GetLinksSize()
Return the total number of links represented after the links have been built.
vtkStaticCellLinksTemplate()
Instantiate and destructor methods.
void BuildLinks(vtkUnstructuredGrid *ugrid)
Build the link list array for vtkUnstructuredGrid.
vtkIdType GetNcells(vtkIdType ptId)
Get the number of cells using the point specified by ptId.
void Initialize()
Make sure any previously created links are cleaned up.
void BuildLinks(vtkExplicitStructuredGrid *esgrid)
Build the link list array for vtkExplicitStructuredGrid.
TIds GetNumberOfCells(vtkIdType ptId)
Get the number of cells using the point specified by ptId.
TIds * GetCells(vtkIdType ptId)
Return a list of cell ids using the point specified by ptId.
void ThreadedBuildLinks(const vtkIdType numPts, const vtkIdType numCells, vtkCellArray *cellArray)
void BuildLinks(vtkDataSet *ds)
Build the link list array for a general dataset.
~vtkStaticCellLinksTemplate()
Instantiate and destructor methods.
void BuildLinks(vtkPolyData *pd)
Build the link list array for vtkPolyData.
void SetSequentialProcessing(vtkTypeBool seq)
Control whether to thread or serial process.
unsigned long GetActualMemorySize()
Support vtkAbstractCellLinks API.
bool MatchesCell(TGivenIds npts, const TGivenIds *pts)
Indicate whether the point ids provided defines at least one cell, or a portion of a cell.
void SerialBuildLinks(const vtkIdType numPts, const vtkIdType numCells, vtkCellArray *cellArray)
Specialized methods for building links from cell array.
void GetCells(vtkIdType npts, const vtkIdType *pts, vtkIdList *cells)
Given point ids that define a cell, find the cells that contains all of these point ids.
void DeepCopy(vtkAbstractCellLinks *src)
Support vtkAbstractCellLinks API.
vtkTypeBool GetSequentialProcessing()
Control whether to thread or serial process.
void SelectCells(vtkIdType minMaxDegree[2], unsigned char *cellSelection)
Support vtkAbstractCellLinks API.
TIds GetOffset(vtkIdType ptId)
Obtain the offsets into the internal links array.
dataset represents arbitrary combinations of all possible cell types
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332