VTK
|
object to represent cell connectivity More...
#include <vtkCellArray.h>
Public Types | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkCellArray * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Initialize () |
void | InitTraversal () |
int | GetNextCell (vtkIdType &npts, vtkIdType *&pts) |
int | GetNextCell (vtkIdList *pts) |
void | GetCell (vtkIdType loc, vtkIdType &npts, vtkIdType *&pts) |
void | GetCell (vtkIdType loc, vtkIdList *pts) |
vtkIdType | InsertNextCell (vtkCell *cell) |
vtkIdType | InsertNextCell (vtkIdType npts, const 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, const 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) |
virtual vtkIdType | GetNumberOfCells () |
virtual void | SetNumberOfCells (vtkIdType) |
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 () |
![]() | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkCellArray * | SafeDownCast (vtkObjectBase *o) |
static vtkCellArray * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkCellArray () | |
~vtkCellArray () | |
![]() | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkIdType | NumberOfCells |
vtkIdType | InsertLocation |
vtkIdType | TraversalLocation |
vtkIdTypeArray * | Ia |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
object to represent cell connectivity
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.
Definition at line 49 of file vtkCellArray.h.
typedef vtkObject vtkCellArray::Superclass |
Definition at line 52 of file vtkCellArray.h.
|
protected |
|
protected |
|
static |
|
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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
|
static |
|
protectedvirtual |
Reimplemented from vtkObject.
vtkCellArray* vtkCellArray::NewInstance | ( | ) | const |
|
virtual |
|
static |
Instantiate cell array (connectivity list).
Allocate memory and set the size to extend by.
Definition at line 60 of file vtkCellArray.h.
void vtkCellArray::Initialize | ( | ) |
Free any memory and reset to an empty state.
|
virtual |
Get the number of cells in the array.
|
virtual |
Set the number of cells in the array. DO NOT do any kind of allocation, advanced use only.
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.
|
inline |
A cell traversal methods that is more efficient than vtkDataSet traversal methods. InitTraversal() initializes the traversal of the list of cells.
Definition at line 92 of file vtkCellArray.h.
A cell traversal methods that is more efficient than vtkDataSet traversal methods. GetNextCell() gets the next cell in the list. If end of list is encountered, 0 is returned. A value of 1 is returned whenever npts and pts have been updated without error.
Definition at line 308 of file vtkCellArray.h.
A cell traversal methods that is more efficient than vtkDataSet traversal methods. GetNextCell() gets the next cell in the list. If end of list is encountered, 0 is returned.
|
inline |
Get the size of the allocated connectivity array.
Definition at line 107 of file vtkCellArray.h.
|
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 115 of file vtkCellArray.h.
Internal method used to retrieve a cell given an offset into the internal array.
Definition at line 324 of file vtkCellArray.h.
Internal method used to retrieve a cell given an offset into the internal array.
Insert a cell object. Return the cell id of the cell.
Definition at line 292 of file vtkCellArray.h.
Create a cell by specifying the number of points and an array of point id's. Return the cell id of the cell.
Definition at line 247 of file vtkCellArray.h.
Create a cell by specifying a list of point ids. Return the cell id of the cell.
Definition at line 286 of file vtkCellArray.h.
Create cells by specifying count, and then adding points one at a time using method InsertCellPoint(). If you don't know the count initially, use the method UpdateCellCount() to complete the cell. Return the cell id of the cell.
Definition at line 265 of file vtkCellArray.h.
|
inline |
Used in conjunction with InsertNextCell(int npts) to add another point to the list of cells.
Definition at line 274 of file vtkCellArray.h.
|
inline |
Used in conjunction with InsertNextCell(int npts) and InsertCellPoint() to update the number of points defining the cell.
Definition at line 280 of file vtkCellArray.h.
Computes the current insertion location within the internal array. Used in conjunction with GetCell(int loc,...).
Definition at line 155 of file vtkCellArray.h.
|
inline |
Get/Set the current traversal location.
Definition at line 161 of file vtkCellArray.h.
|
inline |
Get/Set the current traversal location.
Definition at line 163 of file vtkCellArray.h.
Computes the current traversal location within the internal array. Used in conjunction with GetCell(int loc,...).
Definition at line 170 of file vtkCellArray.h.
|
inline |
Special method inverts ordering of current cell. Must be called carefully or the cell topology may be corrupted.
Definition at line 332 of file vtkCellArray.h.
Replace the point ids of the cell with a different list of point ids.
Definition at line 347 of file vtkCellArray.h.
int vtkCellArray::GetMaxCellSize | ( | ) |
Returns the size of the largest cell. The size is the number of points defining the cell.
|
inline |
Get pointer to array of cell data.
Definition at line 187 of file vtkCellArray.h.
Get pointer to data array for purpose of direct writes of data. Size is the total storage consumed by the cell array. ncells is the number of cells represented in the array.
Definition at line 358 of file vtkCellArray.h.
void vtkCellArray::SetCells | ( | vtkIdType | ncells, |
vtkIdTypeArray * | cells | ||
) |
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.
void vtkCellArray::DeepCopy | ( | vtkCellArray * | ca | ) |
Perform a deep copy (no reference counting) of the given cell array.
|
inline |
Return the underlying data as a data array.
Definition at line 210 of file vtkCellArray.h.
|
inline |
Reuse list. Reset to initial condition.
Definition at line 299 of file vtkCellArray.h.
|
inline |
Reclaim any extra memory.
Definition at line 219 of file vtkCellArray.h.
unsigned long vtkCellArray::GetActualMemorySize | ( | ) |
Return the memory in kibibytes (1024 bytes) 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.
|
protected |
Definition at line 235 of file vtkCellArray.h.
|
protected |
Definition at line 236 of file vtkCellArray.h.
|
protected |
Definition at line 237 of file vtkCellArray.h.
|
protected |
Definition at line 238 of file vtkCellArray.h.