VTK
Public Member Functions | Protected Attributes | List of all members
vtkStaticCellLinksTemplate< TIds > Class Template Reference

object represents upward pointers from points to list of cells using each point (template implementation) More...

#include <vtkStaticCellLinksTemplate.h>

Inheritance diagram for vtkStaticCellLinksTemplate< TIds >:
[legend]

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
 

Detailed Description

template<typename TIds>
class vtkStaticCellLinksTemplate< TIds >

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.

See also
vtkCellLinks vtkStaticCellLinks
Tests:
vtkStaticCellLinksTemplate (Tests)

Definition at line 58 of file vtkStaticCellLinksTemplate.h.

Constructor & Destructor Documentation

template<typename TIds>
vtkStaticCellLinksTemplate< TIds >::vtkStaticCellLinksTemplate ( )
inline

Default constructor.

BuildLinks() does most of the work.

Definition at line 64 of file vtkStaticCellLinksTemplate.h.

template<typename TIds>
virtual vtkStaticCellLinksTemplate< TIds >::~vtkStaticCellLinksTemplate ( )
inlinevirtual

Virtual destructor, anticipating future subclassing.

Definition at line 72 of file vtkStaticCellLinksTemplate.h.

Member Function Documentation

template<typename TIds>
virtual void vtkStaticCellLinksTemplate< TIds >::Initialize ( )
virtual

Make sure any previously created links are cleaned up.

template<typename TIds>
virtual void vtkStaticCellLinksTemplate< TIds >::BuildLinks ( vtkDataSet ds)
virtual

Build the link list array.

Satisfy superclass' API.

template<typename TIds>
void vtkStaticCellLinksTemplate< TIds >::BuildLinks ( vtkPolyData pd)

Build the link list array for vtkPolyData.

template<typename TIds>
void vtkStaticCellLinksTemplate< TIds >::BuildLinks ( vtkUnstructuredGrid ugrid)

Build the link list array for vtkUnstructuredGrid.

template<typename TIds>
TIds vtkStaticCellLinksTemplate< TIds >::GetNumberOfCells ( vtkIdType  ptId)
inline

Get the number of cells using the point specified by ptId.

Definition at line 98 of file vtkStaticCellLinksTemplate.h.

template<typename TIds>
const TIds* vtkStaticCellLinksTemplate< TIds >::GetCells ( vtkIdType  ptId)
inline

Return a list of cell ids using the point.

Definition at line 106 of file vtkStaticCellLinksTemplate.h.

Member Data Documentation

template<typename TIds>
TIds vtkStaticCellLinksTemplate< TIds >::LinksSize
protected

Definition at line 113 of file vtkStaticCellLinksTemplate.h.

template<typename TIds>
TIds vtkStaticCellLinksTemplate< TIds >::NumPts
protected

Definition at line 114 of file vtkStaticCellLinksTemplate.h.

template<typename TIds>
TIds vtkStaticCellLinksTemplate< TIds >::NumCells
protected

Definition at line 115 of file vtkStaticCellLinksTemplate.h.

template<typename TIds>
TIds* vtkStaticCellLinksTemplate< TIds >::Links
protected

Definition at line 118 of file vtkStaticCellLinksTemplate.h.

template<typename TIds>
TIds* vtkStaticCellLinksTemplate< TIds >::Offsets
protected

Definition at line 119 of file vtkStaticCellLinksTemplate.h.


The documentation for this class was generated from the following file: