VTK
|
object represents upward pointers from points to list of cells using each point (template implementation) More...
#include <vtkStaticCellLinksTemplate.h>
Public Member Functions | |
vtkStaticCellLinksTemplate () | |
Default constructor. More... | |
virtual | ~vtkStaticCellLinksTemplate () |
Virtual destructor, anticipating future subclassing. More... | |
virtual void | Initialize () |
Make sure any previously created links are cleaned up. More... | |
virtual void | BuildLinks (vtkDataSet *ds) |
Build the link list array. More... | |
void | BuildLinks (vtkPolyData *pd) |
Build the link list array for vtkPolyData. More... | |
void | BuildLinks (vtkUnstructuredGrid *ugrid) |
Build the link list array for vtkUnstructuredGrid. More... | |
TIds | GetNumberOfCells (vtkIdType ptId) |
Get the number of cells using the point specified by ptId. More... | |
const TIds * | GetCells (vtkIdType ptId) |
Return a list of cell ids using the point. More... | |
Protected Attributes | |
TIds | LinksSize |
TIds | NumPts |
TIds | NumCells |
TIds * | Links |
TIds * | Offsets |
object represents upward pointers from points to list of cells using each point (template implementation)
vtkStaticCellLinksTemplate is a supplemental object to vtkCellArray and vtkCellTypes, enabling access from points to the cells using the points. vtkStaticCellLinksTemplate is an array of links, each link represents a list of cell ids using a particular point. The information provided by this object can be used to determine neighbors and construct other local topological information. This class is a faster implementation of vtkCellLinks. However, it cannot be incrementally constructed; it is meant to be constructed once (statically) and must be rebuilt if the cells change.
This is a templated implementation for vtkStaticCellLinks. The reason for the templating is to gain performance and reduce memory by using smaller integral types to represent ids. For example, if the maximum id can be represented by an int (as compared to a vtkIdType), it is possible to reduce memory requirements by half and increase performance up to 30%. This templated class can be used directly; alternatively the non-templated class vtkStaticCellLinks can be used for convenience; although it uses vtkIdType and thereby loses some speed and memory advantage.
Definition at line 58 of file vtkStaticCellLinksTemplate.h.
|
inline |
Default constructor.
BuildLinks() does most of the work.
Definition at line 64 of file vtkStaticCellLinksTemplate.h.
|
inlinevirtual |
Virtual destructor, anticipating future subclassing.
Definition at line 72 of file vtkStaticCellLinksTemplate.h.
|
virtual |
Make sure any previously created links are cleaned up.
|
virtual |
Build the link list array.
Satisfy superclass' API.
void vtkStaticCellLinksTemplate< TIds >::BuildLinks | ( | vtkPolyData * | pd | ) |
Build the link list array for vtkPolyData.
void vtkStaticCellLinksTemplate< TIds >::BuildLinks | ( | vtkUnstructuredGrid * | ugrid | ) |
Build the link list array for vtkUnstructuredGrid.
|
inline |
Get the number of cells using the point specified by ptId.
Definition at line 98 of file vtkStaticCellLinksTemplate.h.
|
inline |
Return a list of cell ids using the point.
Definition at line 106 of file vtkStaticCellLinksTemplate.h.
|
protected |
Definition at line 113 of file vtkStaticCellLinksTemplate.h.
|
protected |
Definition at line 114 of file vtkStaticCellLinksTemplate.h.
|
protected |
Definition at line 115 of file vtkStaticCellLinksTemplate.h.
|
protected |
Definition at line 118 of file vtkStaticCellLinksTemplate.h.
|
protected |
Definition at line 119 of file vtkStaticCellLinksTemplate.h.