vtkCellArray Class Reference
#include <vtkCellArray.h>
Inheritance diagram for vtkCellArray:
[legend]Collaboration diagram for vtkCellArray:
[legend]List of all members.
Detailed Description
object to represent cell connectivity
- Date
- 2002/12/11 22:47:41
- Revision
- 1.88
vtkCellArray is a supporting object that explicitly represents cell connectivity. The cell array structure is a raw integer list of the form: (n,id1,id2,...,idn, n,id1,id2,...,idn, ...) where n is the number of points in the cell, and id is a zero-offset index into an associated point list.
Advantages of this data structure are its compactness, simplicity, and easy interface to external data. However, it is totally inadequate for random access. This functionality (when necessary) is accomplished by using the vtkCellTypes and vtkCellLinks objects to extend the definition of the data structure.
- See also:
- vtkCellTypes vtkCellLinks
- Examples:
- vtkCellArray (Examples)
- Tests:
- vtkCellArray (Tests)
Definition at line 52 of file vtkCellArray.h.
|
Public Types |
typedef vtkObject | Superclass |
Public Member Functions |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | InitTraversal () |
int | GetNextCell (vtkIdType &npts, vtkIdType *&pts) |
void | GetCell (vtkIdType loc, vtkIdType &npts, vtkIdType *&pts) |
vtkIdType | InsertNextCell (vtkCell *cell) |
vtkIdType | InsertNextCell (vtkIdType npts, vtkIdType *pts) |
vtkIdType | InsertNextCell (vtkIdList *pts) |
vtkIdType | InsertNextCell (int npts) |
void | InsertCellPoint (vtkIdType id) |
void | UpdateCellCount (int npts) |
void | ReverseCell (vtkIdType loc) |
void | ReplaceCell (vtkIdType loc, int npts, vtkIdType *pts) |
int | GetMaxCellSize () |
vtkIdType * | WritePointer (const vtkIdType ncells, const vtkIdType size) |
void | SetCells (vtkIdType ncells, vtkIdTypeArray *cells) |
void | DeepCopy (vtkCellArray *ca) |
void | Reset () |
unsigned long | GetActualMemorySize () |
|
int | Allocate (const vtkIdType sz, const int ext=1000) |
|
void | Initialize () |
|
vtkIdType | GetNumberOfCells () |
|
vtkIdType | EstimateSize (vtkIdType numCells, int maxPtsPerCell) |
|
vtkIdType | GetSize () |
|
vtkIdType | GetNumberOfConnectivityEntries () |
|
vtkIdType | GetInsertLocation (int npts) |
|
vtkIdType | GetTraversalLocation () |
void | SetTraversalLocation (vtkIdType loc) |
|
vtkIdType | GetTraversalLocation (vtkIdType npts) |
|
vtkIdType * | GetPointer () |
|
vtkIdTypeArray * | GetData () |
|
void | Squeeze () |
Static Public Member Functions |
int | IsTypeOf (const char *type) |
vtkCellArray * | SafeDownCast (vtkObject *o) |
vtkCellArray * | New () |
Protected Member Functions |
| vtkCellArray () |
| ~vtkCellArray () |
Protected Attributes |
vtkIdType | NumberOfCells |
vtkIdType | InsertLocation |
vtkIdType | TraversalLocation |
vtkIdTypeArray * | Ia |
Member Typedef Documentation
Constructor & Destructor Documentation
vtkCellArray::vtkCellArray |
( |
|
) |
[protected] |
|
Member Function Documentation
virtual const char* vtkCellArray::GetClassName |
( |
|
) |
[virtual] |
|
int vtkCellArray::IsTypeOf |
( |
const char * |
type |
) |
[static] |
|
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
|
virtual int vtkCellArray::IsA |
( |
const char * |
type |
) |
[virtual] |
|
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
|
|
Instantiate cell array (connectivity list).
Reimplemented from vtkObject.
|
int vtkCellArray::Allocate |
( |
const vtkIdType |
sz, |
|
|
const int |
ext = 1000 |
|
) |
[inline] |
|
|
Allocate memory and set the size to extend by. Definition at line 62 of file vtkCellArray.h. |
void vtkCellArray::Initialize |
( |
|
) |
[inline] |
|
|
Free any memory and reset to an empty state. Definition at line 68 of file vtkCellArray.h. |
vtkIdType vtkCellArray::GetNumberOfCells |
( |
|
) |
[inline] |
|
|
Get the number of cells in the array. Definition at line 74 of file vtkCellArray.h. |
|
Utility routines help manage memory of cell array. EstimateSize() returns a value used to initialize and allocate memory for array based on number of cells and maximum number of points making up cell. If every cell is the same size (in terms of number of points), then the memory estimate is guaranteed exact. (If not exact, use Squeeze() to reclaim any extra memory.) Definition at line 85 of file vtkCellArray.h. |
void vtkCellArray::InitTraversal |
( |
|
) |
[inline] |
|
|
Get the size of the allocated connectivity array. Definition at line 101 of file vtkCellArray.h. |
vtkIdType vtkCellArray::GetNumberOfConnectivityEntries |
( |
|
) |
[inline] |
|
|
Get the total number of entries (i.e., data values) in the connectivity array. This may be much less than the allocated size (i.e., return value from GetSize().) Definition at line 109 of file vtkCellArray.h. |
vtkIdType vtkCellArray::InsertNextCell |
( |
int |
npts |
) |
[inline] |
|
void vtkCellArray::InsertCellPoint |
( |
vtkIdType |
id |
) |
[inline] |
|
void vtkCellArray::UpdateCellCount |
( |
int |
npts |
) |
[inline] |
|
vtkIdType vtkCellArray::GetInsertLocation |
( |
int |
npts |
) |
[inline] |
|
|
Computes the current insertion location within the internal array. Used in conjunction with GetCell(int loc,...). Definition at line 145 of file vtkCellArray.h. |
vtkIdType vtkCellArray::GetTraversalLocation |
( |
|
) |
[inline] |
|
|
Get/Set the current traversal location. Definition at line 151 of file vtkCellArray.h. |
void vtkCellArray::SetTraversalLocation |
( |
vtkIdType |
loc |
) |
[inline] |
|
|
Get/Set the current traversal location. Definition at line 153 of file vtkCellArray.h. |
|
Computes the current traversal location within the internal array. Used in conjunction with GetCell(int loc,...). Definition at line 160 of file vtkCellArray.h. |
void vtkCellArray::ReverseCell |
( |
vtkIdType |
loc |
) |
[inline] |
|
int vtkCellArray::GetMaxCellSize |
( |
|
) |
|
|
|
Returns the size of the largest cell. The size is the number of points defining the cell. |
vtkIdType* vtkCellArray::GetPointer |
( |
|
) |
[inline] |
|
|
Define multiple cells by providing a connectivity list. The list is in the form (npts,p0,p1,...p(npts-1), repeated for each cell). Be careful using this method because it discards the old cells, and anything referring these cells becomes invalid (for example, if BuildCells() has been called see vtkPolyData). The traversal location is reset to the beginning of the list; the insertion location is set to the end of the list. |
|
Perform a deep copy (no reference counting) of the given cell array. |
|
Return the underlying data as a data array. Definition at line 200 of file vtkCellArray.h. |
void vtkCellArray::Reset |
( |
|
) |
[inline] |
|
void vtkCellArray::Squeeze |
( |
|
) |
[inline] |
|
unsigned long vtkCellArray::GetActualMemorySize |
( |
|
) |
|
|
|
Return the memory in kilobytes consumed by this cell array. Used to support streaming and reading/writing data. The value returned is guaranteed to be greater than or equal to the memory required to actually represent the data represented by this object. The information returned is valid only after the pipeline has been updated. |
Member Data Documentation
The documentation for this class was generated from the following file: