VTK
9.5.20251008
|
object to represent cell connectivity More...
#include <vtkCellArray.h>
Classes | |
struct | DispatchUtilities |
struct | VisitState |
Public Types | |
enum | StorageTypes { Int64 , Int32 , FixedSizeInt64 , FixedSizeInt32 , Generic } |
using | ArrayType32 = vtkTypeInt32Array |
using | ArrayType64 = vtkTypeInt64Array |
using | AffineArrayType32 = vtkAffineArray< vtkTypeInt32 > |
using | AffineArrayType64 = vtkAffineArray< vtkTypeInt64 > |
using | StorageOffsetsArrays = vtkTypeList::Create< ArrayType32, ArrayType64, AffineArrayType32, AffineArrayType64 > |
List of possible array types used for storage. | |
using | StorageConnectivityArrays = vtkTypeList::Create< ArrayType32, ArrayType64 > |
List of possible array types used for storage. | |
using | StorageArrayList = StorageConnectivityArrays |
List of possible array types used for storage. | |
using | InputOffsetsArrays = typename vtkTypeList::Unique< vtkTypeList::Create< vtkAOSDataArrayTemplate< int >, vtkAOSDataArrayTemplate< long >, vtkAOSDataArrayTemplate< long long >, vtkAffineArray< int >, vtkAffineArray< long >, vtkAffineArray< long long > > >::Result |
List of possible ArrayTypes that are compatible with internal storage. | |
using | InputConnectivityArrays = typename vtkTypeList::Unique< vtkTypeList::Create< vtkAOSDataArrayTemplate< int >, vtkAOSDataArrayTemplate< long >, vtkAOSDataArrayTemplate< long long > > >::Result |
List of possible ArrayTypes that are compatible with internal storage. | |
using | InputArrayList = InputConnectivityArrays |
List of possible ArrayTypes that are compatible with internal storage. | |
![]() | |
typedef vtkObject | Superclass |
Public Member Functions | |
vtkTypeBool | Allocate (vtkIdType sz, vtkIdType ext=1000) |
Allocate memory. | |
bool | AllocateEstimate (vtkIdType numCells, vtkIdType maxCellSize) |
Pre-allocate memory in internal data structures. | |
bool | AllocateExact (vtkIdType numCells, vtkIdType connectivitySize) |
Pre-allocate memory in internal data structures. | |
bool | AllocateCopy (vtkCellArray *other) |
Pre-allocate memory in internal data structures to match the used size of the input vtkCellArray. | |
bool | ResizeExact (vtkIdType numCells, vtkIdType connectivitySize) |
ResizeExact() resizes the internal structures to hold numCells total cell offsets and connectivitySize total pointIds. | |
void | Initialize () override |
Free any memory and reset to an empty state. | |
void | Reset () |
Reuse list. | |
void | Squeeze () |
Reclaim any extra memory while preserving data. | |
bool | IsValid () |
Check that internal storage is consistent and in a valid state. | |
vtkIdType | GetNumberOfCells () const override |
Get the number of cells in the array. | |
vtkIdType | GetNumberOfOffsets () const override |
Get the number of elements in the offsets array. | |
vtkIdType | GetOffset (vtkIdType cellId) override |
Get the offset (into the connectivity) for a specified cell id. | |
void | SetOffset (vtkIdType cellId, vtkIdType offset) |
Set the offset (into the connectivity) for a specified cell id. | |
vtkIdType | GetNumberOfConnectivityIds () const override |
Get the size of the connectivity array that stores the point ids. | |
vtkCellArrayIterator * | NewIterator () |
NewIterator returns a new instance of vtkCellArrayIterator that is initialized to point at the first cell's data. | |
bool | SetData (vtkDataArray *offsets, vtkDataArray *connectivity) |
Sets the internal arrays to the supplied offsets and connectivity arrays. | |
bool | SetData (vtkIdType cellSize, vtkDataArray *connectivity) |
Sets the internal arrays to the supported connectivity array with an offsets array automatically generated given the fixed cells size. | |
StorageTypes | GetStorageType () const noexcept |
bool | IsStorage64Bit () const |
bool | IsStorage32Bit () const |
bool | IsStorageFixedSize64Bit () const |
bool | IsStorageFixedSize32Bit () const |
bool | IsStorageFixedSize () const |
bool | IsStorageGeneric () const |
bool | IsStorageShareable () const override |
vtkIdType | IsHomogeneous () const override |
Check if all cells have the same number of vertices. | |
void | InitTraversal () |
int | GetNextCell (vtkIdType &npts, vtkIdType const *&pts) |
int | GetNextCell (vtkIdList *pts) |
void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints, vtkIdList *ptIds) override |
Return the point ids for the cell at cellId. | |
void | GetCellAtId (vtkIdType cellId, vtkIdList *pts) override |
Return the point ids for the cell at cellId. | |
void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType *cellPoints) override |
Return the point ids for the cell at cellId. | |
vtkIdType | GetCellPointAtId (vtkIdType cellId, vtkIdType cellPointIndex) const |
Return the point id at cellPointIndex for the cell at cellId. | |
vtkIdType | GetCellSize (vtkIdType cellId) const override |
Return the size of the cell at cellId. | |
vtkIdType | InsertNextCell (vtkCell *cell) |
Insert a cell object. | |
vtkIdType | InsertNextCell (vtkIdType npts, const vtkIdType *pts) |
Create a cell by specifying the number of points and an array of point id's. | |
vtkIdType | InsertNextCell (vtkIdList *pts) |
Create a cell by specifying a list of point ids. | |
vtkIdType | InsertNextCell (const std::initializer_list< vtkIdType > &cell) |
Overload that allows InsertNextCell({0, 1, 2}) syntax. | |
vtkIdType | InsertNextCell (int npts) |
Create cells by specifying a count of total points to be inserted, and then adding points one at a time using method InsertCellPoint(). | |
void | InsertCellPoint (vtkIdType id) |
Used in conjunction with InsertNextCell(npts) to add another point to the list of cells. | |
void | UpdateCellCount (int npts) |
Used in conjunction with InsertNextCell(int npts) and InsertCellPoint() to update the number of points defining the cell. | |
void | ReverseCellAtId (vtkIdType cellId) |
Reverses the order of the point ids for the specified cell. | |
void | ReplaceCellPointAtId (vtkIdType cellId, vtkIdType cellPointIndex, vtkIdType newPointId) |
Replaces the pointId at cellPointIndex of a cell with newPointId. | |
void | ReplaceCellAtId (vtkIdType cellId, const std::initializer_list< vtkIdType > &cell) |
Overload that allows ReplaceCellAtId(cellId, {0, 1, 2}) syntax. | |
int | GetMaxCellSize () override |
Returns the size of the largest cell. | |
void | DeepCopy (vtkAbstractCellArray *ca) override |
Perform a deep copy (no reference counting) of the given cell array. | |
void | ShallowCopy (vtkAbstractCellArray *ca) override |
Shallow copy ca into this cell array. | |
void | Append (vtkCellArray *src, vtkIdType pointOffset=0) |
Append cells from src into this. | |
void | ExportLegacyFormat (vtkIdTypeArray *data) |
Fill data with the old-style vtkCellArray data layout, e.g. | |
unsigned long | GetActualMemorySize () const |
Return the memory in kibibytes (1024 bytes) consumed by this cell array. | |
virtual void | SetNumberOfCells (vtkIdType) |
Set the number of cells in the array. | |
vtkIdType | EstimateSize (vtkIdType numCells, int maxPtsPerCell) |
Utility routines help manage memory of cell array. | |
vtkIdType | GetSize () |
Get the size of the allocated connectivity array. | |
vtkIdType | GetNumberOfConnectivityEntries () |
Return the size of the array that would be returned from ExportLegacyFormat(). | |
void | GetCell (vtkIdType loc, vtkIdType &npts, const vtkIdType *&pts) |
Internal method used to retrieve a cell given a legacy offset location. | |
void | GetCell (vtkIdType loc, vtkIdList *pts) |
Internal method used to retrieve a cell given a legacy offset location. | |
vtkIdType | GetInsertLocation (int npts) |
Computes the current legacy insertion location within the internal array. | |
void | ReverseCell (vtkIdType loc) |
Special method inverts ordering of cell at the specified legacy location. | |
void | ReplaceCell (vtkIdType loc, int npts, const vtkIdType pts[]) |
Replace the point ids of the cell at the legacy location with a different list of point ids. | |
void | SetCells (vtkIdType ncells, vtkIdTypeArray *cells) |
Define multiple cells by providing a connectivity list. | |
vtkIdTypeArray * | GetData () |
Return the underlying data as a data array. | |
void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints) |
Return the point ids for the cell at cellId. | |
virtual void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints, vtkIdList *ptIds)=0 |
Return the point ids for the cell at cellId. | |
virtual void | GetCellAtId (vtkIdType cellId, vtkIdList *pts)=0 |
Return the point ids for the cell at cellId. | |
virtual void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType *cellPoints)=0 |
Return the point ids for the cell at cellId. | |
void | SetData (vtkIdTypeArray *offsets, vtkIdTypeArray *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAOSDataArrayTemplate< int > *offsets, vtkAOSDataArrayTemplate< int > *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAOSDataArrayTemplate< long > *offsets, vtkAOSDataArrayTemplate< long > *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAOSDataArrayTemplate< long long > *offsets, vtkAOSDataArrayTemplate< long long > *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkTypeInt32Array *offsets, vtkTypeInt32Array *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkTypeInt64Array *offsets, vtkTypeInt64Array *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAffineArray< vtkIdType > *offsets, vtkIdTypeArray *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAffineArray< int > *offsets, vtkAOSDataArrayTemplate< int > *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAffineArray< long > *offsets, vtkAOSDataArrayTemplate< long > *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAffineArray< long long > *offsets, vtkAOSDataArrayTemplate< long long > *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAffineArray< vtkTypeInt32 > *offsets, vtkTypeInt32Array *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | SetData (vtkAffineArray< vtkTypeInt64 > *offsets, vtkTypeInt64Array *connectivity) |
Set the internal data arrays to the supplied offsets and connectivity arrays. | |
void | Use32BitStorage () |
Initialize internal data structures to use 32- or 64-bit storage. | |
void | Use64BitStorage () |
Initialize internal data structures to use 32- or 64-bit storage. | |
void | UseDefaultStorage () |
Initialize internal data structures to use 32- or 64-bit storage. | |
void | UseFixedSize32BitStorage (vtkIdType cellSize) |
Initialize internal data structures to use 32- or 64-bit storage. | |
void | UseFixedSize64BitStorage (vtkIdType cellSize) |
Initialize internal data structures to use 32- or 64-bit storage. | |
void | UseFixedSizeDefaultStorage (vtkIdType cellSize) |
Initialize internal data structures to use 32- or 64-bit storage. | |
bool | CanConvertTo32BitStorage () const |
Check if the existing data can safely be converted to use 32- or 64- bit storage. | |
bool | CanConvertTo64BitStorage () const |
Check if the existing data can safely be converted to use 32- or 64- bit storage. | |
bool | CanConvertToDefaultStorage () const |
Check if the existing data can safely be converted to use 32- or 64- bit storage. | |
bool | CanConvertToFixedSize32BitStorage () const |
Check if the existing data can safely be converted to use 32- or 64- bit storage. | |
bool | CanConvertToFixedSize64BitStorage () const |
Check if the existing data can safely be converted to use 32- or 64- bit storage. | |
bool | CanConvertToFixedSizeDefaultStorage () const |
Check if the existing data can safely be converted to use 32- or 64- bit storage. | |
bool | CanConvertToStorageType (StorageTypes type) const |
Check if the existing data can safely be converted to use 32- or 64- bit storage. | |
bool | ConvertTo32BitStorage () |
Convert internal data structures to use 32- or 64-bit storage. | |
bool | ConvertTo64BitStorage () |
Convert internal data structures to use 32- or 64-bit storage. | |
bool | ConvertToDefaultStorage () |
Convert internal data structures to use 32- or 64-bit storage. | |
bool | ConvertToFixedSize32BitStorage () |
Convert internal data structures to use 32- or 64-bit storage. | |
bool | ConvertToFixedSize64BitStorage () |
Convert internal data structures to use 32- or 64-bit storage. | |
bool | ConvertToFixedSizeDefaultStorage () |
Convert internal data structures to use 32- or 64-bit storage. | |
bool | ConvertToSmallestStorage () |
Convert internal data structures to use 32- or 64-bit storage. | |
bool | ConvertToStorageType (StorageTypes type) |
Convert internal data structures to use 32- or 64-bit storage. | |
vtkDataArray * | GetOffsetsArray () const |
Return the array used to store cell offsets. | |
ArrayType32 * | GetOffsetsArray32 () const |
Return the array used to store cell offsets. | |
ArrayType64 * | GetOffsetsArray64 () const |
Return the array used to store cell offsets. | |
AffineArrayType32 * | GetOffsetsAffineArray32 () |
Return the array used to store cell offsets. | |
AffineArrayType64 * | GetOffsetsAffineArray64 () |
Return the array used to store cell offsets. | |
vtkDataArray * | GetConnectivityArray () const |
Return the array used to store the point ids that define the cells' connectivity. | |
ArrayType32 * | GetConnectivityArray32 () const |
Return the array used to store the point ids that define the cells' connectivity. | |
ArrayType64 * | GetConnectivityArray64 () const |
Return the array used to store the point ids that define the cells' connectivity. | |
vtkIdType | GetTraversalCellId () |
Get/Set the current cellId for traversal. | |
void | SetTraversalCellId (vtkIdType cellId) |
Get/Set the current cellId for traversal. | |
void | ReplaceCellAtId (vtkIdType cellId, vtkIdList *list) |
Replaces the point ids for the specified cell with the supplied list. | |
void | ReplaceCellAtId (vtkIdType cellId, vtkIdType cellSize, const vtkIdType *cellPoints) |
Replaces the point ids for the specified cell with the supplied list. | |
void | ImportLegacyFormat (vtkIdTypeArray *data) |
Import an array of data with the legacy vtkCellArray layout, e.g.: | |
void | ImportLegacyFormat (const vtkIdType *data, vtkIdType len) |
Import an array of data with the legacy vtkCellArray layout, e.g.: | |
void | AppendLegacyFormat (vtkIdTypeArray *data, vtkIdType ptOffset=0) |
Append an array of data with the legacy vtkCellArray layout, e.g.: | |
void | AppendLegacyFormat (const vtkIdType *data, vtkIdType len, vtkIdType ptOffset=0) |
Append an array of data with the legacy vtkCellArray layout, e.g.: | |
template<typename Functor , typename... Args> | |
void | Dispatch (Functor &&functor, Args &&... args) |
template<typename Functor , typename... Args> | |
void | Dispatch (Functor &&functor, Args &&... args) const |
template<typename Functor , typename... Args, typename = typename std::enable_if<ReturnsVoid<Functor, Args...>::value>::type> | |
void | Visit (Functor &&functor, Args &&... args) |
template<typename Functor , typename... Args, typename = typename std::enable_if<ReturnsVoid<Functor, Args...>::value>::type> | |
void | Visit (Functor &&functor, Args &&... args) const |
template<typename Functor , typename... Args, typename = typename std::enable_if<!ReturnsVoid<Functor, Args...>::value>::type> | |
GetReturnType< Functor, Args... > | Visit (Functor &&functor, Args &&... args) |
template<typename Functor , typename... Args, typename = typename std::enable_if<!ReturnsVoid<Functor, Args...>::value>::type> | |
GetReturnType< Functor, Args... > | Visit (Functor &&functor, Args &&... args) const |
vtkIdType | GetTraversalLocation () |
Get/Set the current traversal legacy location. | |
vtkIdType | GetTraversalLocation (vtkIdType npts) |
Get/Set the current traversal legacy location. | |
void | SetTraversalLocation (vtkIdType loc) |
Get/Set the current traversal legacy location. | |
![]() | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkAbstractCellArray * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | Initialize ()=0 |
Free any memory and reset to an empty state. | |
virtual vtkIdType | GetNumberOfCells () const =0 |
Get the number of cells in the array. | |
virtual vtkIdType | GetNumberOfOffsets () const =0 |
Get the number of elements in the offsets array. | |
virtual vtkIdType | GetOffset (vtkIdType cellId)=0 |
Get the offset (into the connectivity) for a specified cell id. | |
virtual vtkIdType | GetNumberOfConnectivityIds () const =0 |
Get the size of the connectivity array that stores the point ids. | |
virtual bool | IsStorageShareable () const =0 |
virtual vtkIdType | IsHomogeneous () const =0 |
Check if all cells have the same number of vertices. | |
void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints) |
Return the point ids for the cell at cellId. | |
virtual void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints, vtkIdList *ptIds)=0 |
Return the point ids for the cell at cellId. | |
virtual void | GetCellAtId (vtkIdType cellId, vtkIdList *pts)=0 |
Return the point ids for the cell at cellId. | |
virtual void | GetCellAtId (vtkIdType cellId, vtkIdType &cellSize, vtkIdType *cellPoints)=0 |
Return the point ids for the cell at cellId. | |
virtual vtkIdType | GetCellSize (vtkIdType cellId) const =0 |
Return the size of the cell at cellId. | |
virtual int | GetMaxCellSize ()=0 |
Returns the size of the largest cell. | |
virtual void | DeepCopy (vtkAbstractCellArray *ca)=0 |
Perform a deep copy (no reference counting) of the given cell array. | |
virtual void | ShallowCopy (vtkAbstractCellArray *ca)=0 |
Shallow copy ca into this cell array. | |
![]() | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. | |
virtual void | DebugOff () |
Turn debugging output off. | |
bool | GetDebug () |
Get the value of the debug flag. | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. | |
virtual void | Modified () |
Update the modification time for this object. | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
vtkTypeBool | HasObserver (unsigned long event) |
vtkTypeBool | HasObserver (const char *event) |
vtkTypeBool | InvokeEvent (unsigned long event) |
vtkTypeBool | InvokeEvent (const char *event) |
std::string | GetObjectDescription () const override |
The object description printed in messages and PrintSelf output. | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. | |
vtkTypeBool | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
vtkTypeBool | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
virtual void | SetObjectName (const std::string &objectName) |
Set/get the name of this object for reporting purposes. | |
virtual std::string | GetObjectName () const |
Set/get the name of this object for reporting purposes. | |
![]() | |
const char * | GetClassName () const |
Return the class name as a string. | |
virtual std::string | GetObjectDescription () const |
The object description printed in messages and PrintSelf output. | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
virtual void | Delete () |
Delete a VTK object. | |
virtual void | FastDelete () |
Delete a reference to this object. | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. | |
void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). | |
int | GetReferenceCount () |
Return the current reference count of this object. | |
void | SetReferenceCount (int) |
Sets the reference count. | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual bool | UsesGarbageCollector () const |
Indicate whether the class uses vtkGarbageCollector or not. | |
Static Public Member Functions | |
static bool | GetDefaultStorageIs64Bit () |
Control the default internal storage size. | |
static void | SetDefaultStorageIs64Bit (bool val) |
Control the default internal storage size. | |
![]() | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkAbstractCellArray * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. | |
static void | SetGlobalWarningDisplay (vtkTypeBool val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static vtkTypeBool | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
![]() | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. | |
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. | |
Protected Member Functions | |
vtkCellArray () | |
~vtkCellArray () override | |
![]() | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkAbstractCellArray () | |
~vtkAbstractCellArray () override | |
![]() | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. | |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | ReportReferences (vtkGarbageCollector *) |
virtual void | ObjectFinalize () |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkSmartPointer< vtkDataArray > | Offsets |
vtkSmartPointer< vtkDataArray > | Connectivity |
StorageTypes | StorageType |
vtkIdType | TraversalCellId { 0 } |
vtkNew< vtkIdTypeArray > | LegacyData |
![]() | |
vtkNew< vtkIdList > | TempCell |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
std::string | ObjectName |
![]() | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Static Protected Attributes | |
static bool | DefaultStorageIs64Bit |
Friends | |
class | vtkCellArrayIterator |
typedef vtkAbstractCellArray | Superclass |
Standard methods for instantiation, type information, and printing. | |
static vtkCellArray * | New () |
Standard methods for instantiation, type information, and printing. | |
static vtkTypeBool | IsTypeOf (const char *type) |
Standard methods for instantiation, type information, and printing. | |
static vtkCellArray * | SafeDownCast (vtkObjectBase *o) |
Standard methods for instantiation, type information, and printing. | |
virtual vtkTypeBool | IsA (const char *type) |
Standard methods for instantiation, type information, and printing. | |
vtkCellArray * | NewInstance () const |
Standard methods for instantiation, type information, and printing. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Standard methods for instantiation, type information, and printing. | |
void | PrintDebug (ostream &os) |
Standard methods for instantiation, type information, and printing. | |
virtual vtkObjectBase * | NewInstanceInternal () const |
Standard methods for instantiation, type information, and printing. | |
Additional Inherited Members | |
![]() | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
object to represent cell connectivity
vtkCellArray stores dataset topologies as an explicit connectivity table listing the point ids that make up each cell.
Internally, the connectivity table is represented as two arrays: Offsets and Connectivity.
Offsets is an array of [numCells+1] values indicating the index in the Connectivity array where each cell's points start. The last value is always the length of the Connectivity array.
The Connectivity array stores the lists of point ids for each cell.
Thus, for a dataset consisting of 2 triangles, a quad, and a line, the internal arrays will appear as follows:
While this class provides traversal methods (the legacy InitTraversal(), GetNextCell() methods, and the newer method GetCellAtId()) these are in general not thread-safe. Whenever possible it is preferable to use a local thread-safe, vtkCellArrayIterator object, which can be obtained via:
(Note however that depending on the type and structure of internal storage, a cell array iterator may be significantly slower than direct traversal over the cell array due to extra data copying. Factors of 3-4X are not uncommon. See vtkCellArrayIterator for more information. Also note that an iterator may become invalid if the internal vtkCellArray storage is modified.)
Other methods are also available for allocation and memory-related management; insertion of new cells into the vtkCellArray; and limited editing operations such as replacing one cell with a new cell of the same size.
The internal arrays may store either 32- or 64-bit values, though most of the API will prefer to use vtkIdType to refer to items in these arrays. This enables significant memory savings when vtkIdType is 64-bit, but 32 bits are sufficient to store all of the values in the connectivity table. Using 64-bit storage with a 32-bit vtkIdType is permitted, but values too large to fit in a 32-bit signed integer will be truncated when accessed through the API. (The particular internal storage type has implications on performance depending on vtkIdType. If the internal storage is equivalent to vtkIdType, then methods that return pointers to arrays of point ids can share the internal storage; otherwise a copy of internal memory must be performed.)
Additionally, the internal arrays may be "fixed size", meaning that each cell is required to have the same number of points. This allows more compact storage and faster traversal, but is only appropriate for datasets where all cells are the same type (e.g., all triangles, or all quads, etc.). Fixed size storage with a cell size of N means that the Connectivity array will have N entries per cell, and the Offsets array will have values {0, N, 2N, 3N, ... }.
Methods for managing the storage type are:
bool IsStorage64Bit()
bool IsStorage32Bit()
bool IsStorageFixedSize64Bit()
bool IsStorageFixedSize32Bit()
bool IsStorageFixedSize() // Either 32- or 64-bit fixed size
bool IsStorageGeneric()
bool IsStorageShareable() // Can pointers to internal storage be shared
void Use64BitStorage()
void Use32BitStorage()
void UseDefaultStorage() // Depends on vtkIdType
void UseFixedSize64BitStorage(vtkIdType cellSize)
void UseFixedSize32BitStorage(vtkIdType cellSize)
void UseFixedSizeStorage(vtkIdType cellSize) // Depends on vtkIdType
bool CanConvertTo32BitStorage()
bool CanConvertTo64BitStorage()
bool CanConvertToDefaultStorage() // Depends on vtkIdType
bool CanConvertToFixedSize32BitStorage()
bool CanConvertToFixedSize64BitStorage()
bool CanConvertToFixedSizeStorage() // Depends on vtkIdType
bool CanConvertToStorageType(int type) // Int64, Int32, FixedSizeInt64, FixedSizeInt32
bool ConvertTo64BitStorage()
bool ConvertTo32BitStorage()
bool ConvertToDefaultStorage() // Depends on vtkIdType
bool ConvertToFixedSize64BitStorage()
bool ConvertToFixedSize32BitStorage()
bool ConvertToFixedSizeStorage() // Depends on vtkIdType
bool ConvertToSmallestStorage() // Depends on current values in arrays
bool ConvertToStorageType(int type) // Int64, Int32, FixedSizeInt64, FixedSizeInt32
There is an additional mode of storage to allow any kind of vtkDataArray derived types. The Generic storage mode allows separate array types for offsets and connectivity. There is no method to explicitly use generic storage mode. vtkCellArray will automatically switch over to using generic storage when any overload of vtkCellArray::SetData is invoked with array types that are NOT in vtkCellArray::InputConnectivityArrays.
Definition at line 262 of file vtkCellArray.h.
using vtkCellArray::ArrayType32 = vtkTypeInt32Array |
Definition at line 265 of file vtkCellArray.h.
using vtkCellArray::ArrayType64 = vtkTypeInt64Array |
Definition at line 266 of file vtkCellArray.h.
using vtkCellArray::AffineArrayType32 = vtkAffineArray<vtkTypeInt32> |
Definition at line 267 of file vtkCellArray.h.
using vtkCellArray::AffineArrayType64 = vtkAffineArray<vtkTypeInt64> |
Definition at line 268 of file vtkCellArray.h.
Standard methods for instantiation, type information, and printing.
Definition at line 276 of file vtkCellArray.h.
using vtkCellArray::StorageOffsetsArrays = vtkTypeList::Create<ArrayType32, ArrayType64, AffineArrayType32, AffineArrayType64> |
List of possible array types used for storage.
May be used with vtkArrayDispatch::Dispatch[2]ByArray to process internal arrays. Both the Connectivity and Offset arrays are guaranteed to have the same type.
Definition at line 290 of file vtkCellArray.h.
using vtkCellArray::StorageConnectivityArrays = vtkTypeList::Create<ArrayType32, ArrayType64> |
List of possible array types used for storage.
May be used with vtkArrayDispatch::Dispatch[2]ByArray to process internal arrays. Both the Connectivity and Offset arrays are guaranteed to have the same type.
Definition at line 292 of file vtkCellArray.h.
List of possible array types used for storage.
May be used with vtkArrayDispatch::Dispatch[2]ByArray to process internal arrays. Both the Connectivity and Offset arrays are guaranteed to have the same type.
Definition at line 293 of file vtkCellArray.h.
using vtkCellArray::InputOffsetsArrays = typename vtkTypeList::Unique<vtkTypeList::Create<vtkAOSDataArrayTemplate<int>, vtkAOSDataArrayTemplate<long>, vtkAOSDataArrayTemplate<long long>, vtkAffineArray<int>, vtkAffineArray<long>, vtkAffineArray<long long> >>::Result |
List of possible ArrayTypes that are compatible with internal storage.
Single component AOS-layout arrays holding one of these types may be passed to the method SetData to setup the cell array state.
This can be used with vtkArrayDispatch::DispatchByArray, etc to check input arrays before assigning them to a cell array.
Definition at line 306 of file vtkCellArray.h.
using vtkCellArray::InputConnectivityArrays = typename vtkTypeList::Unique<vtkTypeList::Create<vtkAOSDataArrayTemplate<int>, vtkAOSDataArrayTemplate<long>, vtkAOSDataArrayTemplate<long long> >>::Result |
List of possible ArrayTypes that are compatible with internal storage.
Single component AOS-layout arrays holding one of these types may be passed to the method SetData to setup the cell array state.
This can be used with vtkArrayDispatch::DispatchByArray, etc to check input arrays before assigning them to a cell array.
Definition at line 310 of file vtkCellArray.h.
List of possible ArrayTypes that are compatible with internal storage.
Single component AOS-layout arrays holding one of these types may be passed to the method SetData to setup the cell array state.
This can be used with vtkArrayDispatch::DispatchByArray, etc to check input arrays before assigning them to a cell array.
Definition at line 313 of file vtkCellArray.h.
Enumerator | |
---|---|
Int64 | |
Int32 | |
FixedSizeInt64 | |
FixedSizeInt32 | |
Generic |
Definition at line 510 of file vtkCellArray.h.
|
protected |
|
overrideprotected |
|
static |
Standard methods for instantiation, type information, and printing.
|
static |
Standard methods for instantiation, type information, and printing.
|
virtual |
Standard methods for instantiation, type information, and printing.
Reimplemented from vtkAbstractCellArray.
|
static |
Standard methods for instantiation, type information, and printing.
|
protectedvirtual |
Standard methods for instantiation, type information, and printing.
Reimplemented from vtkAbstractCellArray.
vtkCellArray * vtkCellArray::NewInstance | ( | ) | const |
Standard methods for instantiation, type information, and printing.
|
overridevirtual |
Standard methods for instantiation, type information, and printing.
Reimplemented from vtkAbstractCellArray.
void vtkCellArray::PrintDebug | ( | ostream & | os | ) |
Standard methods for instantiation, type information, and printing.
|
inline |
Allocate memory.
This currently allocates both the offsets and connectivity arrays to sz.
Definition at line 326 of file vtkCellArray.h.
Pre-allocate memory in internal data structures.
Does not change the number of cells, only the array capacities. Existing data is NOT preserved.
numCells | The number of expected cells in the dataset. |
maxCellSize | The number of points per cell to allocate memory for. |
Definition at line 340 of file vtkCellArray.h.
Pre-allocate memory in internal data structures.
Does not change the number of cells, only the array capacities. Existing data is NOT preserved.
numCells | The number of expected cells in the dataset. |
connectivitySize | The total number of pointIds stored for all cells. |
|
inline |
Pre-allocate memory in internal data structures to match the used size of the input vtkCellArray.
Does not change the number of cells, only the array capacities. Existing data is NOT preserved.
other | The vtkCellArray to use as a reference. |
Definition at line 365 of file vtkCellArray.h.
ResizeExact() resizes the internal structures to hold numCells total cell offsets and connectivitySize total pointIds.
Old data is preserved, and newly-available memory is not initialized.
|
overridevirtual |
Free any memory and reset to an empty state.
Implements vtkAbstractCellArray.
|
inline |
Reuse list.
Reset to initial state without freeing memory.
Definition at line 1949 of file vtkCellArray.h.
void vtkCellArray::Squeeze | ( | ) |
Reclaim any extra memory while preserving data.
bool vtkCellArray::IsValid | ( | ) |
Check that internal storage is consistent and in a valid state.
Specifically, this function returns true if and only if:
|
inlineoverridevirtual |
Get the number of cells in the array.
Implements vtkAbstractCellArray.
Definition at line 413 of file vtkCellArray.h.
|
inlineoverridevirtual |
Get the number of elements in the offsets array.
This will be the number of cells + 1.
Implements vtkAbstractCellArray.
Definition at line 419 of file vtkCellArray.h.
Get the offset (into the connectivity) for a specified cell id.
Implements vtkAbstractCellArray.
Definition at line 424 of file vtkCellArray.h.
Set the offset (into the connectivity) for a specified cell id.
Definition at line 432 of file vtkCellArray.h.
|
inlineoverridevirtual |
Get the size of the connectivity array that stores the point ids.
Implements vtkAbstractCellArray.
Definition at line 440 of file vtkCellArray.h.
vtkCellArrayIterator * vtkCellArray::NewIterator | ( | ) |
NewIterator returns a new instance of vtkCellArrayIterator that is initialized to point at the first cell's data.
The caller is responsible for Delete()'ing the object.
void vtkCellArray::SetData | ( | vtkIdTypeArray * | offsets, |
vtkIdTypeArray * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAOSDataArrayTemplate< int > * | offsets, |
vtkAOSDataArrayTemplate< int > * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAOSDataArrayTemplate< long > * | offsets, |
vtkAOSDataArrayTemplate< long > * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAOSDataArrayTemplate< long long > * | offsets, |
vtkAOSDataArrayTemplate< long long > * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkTypeInt32Array * | offsets, |
vtkTypeInt32Array * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkTypeInt64Array * | offsets, |
vtkTypeInt64Array * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAffineArray< vtkIdType > * | offsets, |
vtkIdTypeArray * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAffineArray< int > * | offsets, |
vtkAOSDataArrayTemplate< int > * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAffineArray< long > * | offsets, |
vtkAOSDataArrayTemplate< long > * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAffineArray< long long > * | offsets, |
vtkAOSDataArrayTemplate< long long > * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAffineArray< vtkTypeInt32 > * | offsets, |
vtkTypeInt32Array * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
void vtkCellArray::SetData | ( | vtkAffineArray< vtkTypeInt64 > * | offsets, |
vtkTypeInt64Array * | connectivity | ||
) |
Set the internal data arrays to the supplied offsets and connectivity arrays.
Note that the input arrays may be copied and not used directly. To avoid copying, use vtkIdTypeArray, vtkCellArray::ArrayType32, or vtkCellArray::ArrayType64 for connectivity, and vtkIdTypeArray, vtkCellArray::ArrayType32, vtkCellArray::ArrayType64, vtkCellArray::AffineArrayType32, or vtkCellArray::AffineArrayType64 for offsets.
bool vtkCellArray::SetData | ( | vtkDataArray * | offsets, |
vtkDataArray * | connectivity | ||
) |
Sets the internal arrays to the supplied offsets and connectivity arrays.
This is a convenience method, and may fail if the following conditions are not met:
If invalid arrays are passed in, an error is logged and the function will return false.
bool vtkCellArray::SetData | ( | vtkIdType | cellSize, |
vtkDataArray * | connectivity | ||
) |
Sets the internal arrays to the supported connectivity array with an offsets array automatically generated given the fixed cells size.
This is a convenience method, and may fail if the following conditions are not met:
connectivity
array must be one of the types in InputConnectivityArrays.connectivity
array size must be a multiple of cellSize
.If invalid arrays are passed in, an error is logged and the function will return false.
|
inlinenoexcept |
Definition at line 522 of file vtkCellArray.h.
|
inline |
Definition at line 527 of file vtkCellArray.h.
|
inline |
Definition at line 532 of file vtkCellArray.h.
|
inline |
Definition at line 537 of file vtkCellArray.h.
|
inline |
Definition at line 542 of file vtkCellArray.h.
|
inline |
Definition at line 547 of file vtkCellArray.h.
|
inline |
Definition at line 555 of file vtkCellArray.h.
|
inlineoverridevirtual |
Implements vtkAbstractCellArray.
Definition at line 563 of file vtkCellArray.h.
void vtkCellArray::Use32BitStorage | ( | ) |
Initialize internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
All existing data is erased.
void vtkCellArray::Use64BitStorage | ( | ) |
Initialize internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
All existing data is erased.
void vtkCellArray::UseDefaultStorage | ( | ) |
Initialize internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
All existing data is erased.
void vtkCellArray::UseFixedSize32BitStorage | ( | vtkIdType | cellSize | ) |
Initialize internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
All existing data is erased.
void vtkCellArray::UseFixedSize64BitStorage | ( | vtkIdType | cellSize | ) |
Initialize internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
All existing data is erased.
void vtkCellArray::UseFixedSizeDefaultStorage | ( | vtkIdType | cellSize | ) |
Initialize internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
All existing data is erased.
bool vtkCellArray::CanConvertTo32BitStorage | ( | ) | const |
Check if the existing data can safely be converted to use 32- or 64- bit storage.
Ensures that all values can be converted to the target storage without truncating. If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
bool vtkCellArray::CanConvertTo64BitStorage | ( | ) | const |
Check if the existing data can safely be converted to use 32- or 64- bit storage.
Ensures that all values can be converted to the target storage without truncating. If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
bool vtkCellArray::CanConvertToDefaultStorage | ( | ) | const |
Check if the existing data can safely be converted to use 32- or 64- bit storage.
Ensures that all values can be converted to the target storage without truncating. If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
bool vtkCellArray::CanConvertToFixedSize32BitStorage | ( | ) | const |
Check if the existing data can safely be converted to use 32- or 64- bit storage.
Ensures that all values can be converted to the target storage without truncating. If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
bool vtkCellArray::CanConvertToFixedSize64BitStorage | ( | ) | const |
Check if the existing data can safely be converted to use 32- or 64- bit storage.
Ensures that all values can be converted to the target storage without truncating. If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
bool vtkCellArray::CanConvertToFixedSizeDefaultStorage | ( | ) | const |
Check if the existing data can safely be converted to use 32- or 64- bit storage.
Ensures that all values can be converted to the target storage without truncating. If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
|
inline |
Check if the existing data can safely be converted to use 32- or 64- bit storage.
Ensures that all values can be converted to the target storage without truncating. If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
Definition at line 609 of file vtkCellArray.h.
bool vtkCellArray::ConvertTo32BitStorage | ( | ) |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
bool vtkCellArray::ConvertTo64BitStorage | ( | ) |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
bool vtkCellArray::ConvertToDefaultStorage | ( | ) |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
bool vtkCellArray::ConvertToFixedSize32BitStorage | ( | ) |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
bool vtkCellArray::ConvertToFixedSize64BitStorage | ( | ) |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
bool vtkCellArray::ConvertToFixedSizeDefaultStorage | ( | ) |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
bool vtkCellArray::ConvertToSmallestStorage | ( | ) |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
|
inline |
Convert internal data structures to use 32- or 64-bit storage.
If selecting default storage, the storage depends on the VTK_USE_64BIT_IDS setting.
If selecting smallest storage, the data is checked to see what the smallest safe storage for the existing data is, and then converts to it.
Existing data is preserved.
Definition at line 651 of file vtkCellArray.h.
|
inline |
Return the array used to store cell offsets.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 675 of file vtkCellArray.h.
|
inline |
Return the array used to store cell offsets.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 676 of file vtkCellArray.h.
|
inline |
Return the array used to store cell offsets.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 677 of file vtkCellArray.h.
|
inline |
Return the array used to store cell offsets.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 678 of file vtkCellArray.h.
|
inline |
Return the array used to store cell offsets.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 682 of file vtkCellArray.h.
|
inline |
Return the array used to store the point ids that define the cells' connectivity.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 694 of file vtkCellArray.h.
|
inline |
Return the array used to store the point ids that define the cells' connectivity.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 695 of file vtkCellArray.h.
|
inline |
Return the array used to store the point ids that define the cells' connectivity.
The 32/64 variants are only valid when IsStorage64Bit() returns the appropriate value.
Definition at line 699 of file vtkCellArray.h.
|
overridevirtual |
Check if all cells have the same number of vertices.
The return value is coded as:
Implements vtkAbstractCellArray.
|
inline |
InitTraversal() initializes the traversal of the list of cells.
Definition at line 1832 of file vtkCellArray.h.
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.
Do not modify the returned pts pointer, as it may point to shared memory.
Definition at line 1838 of file vtkCellArray.h.
|
inline |
GetNextCell() gets the next cell in the list. If end of list is encountered, 0 is returned.
Definition at line 1853 of file vtkCellArray.h.
|
inlineoverridevirtual |
Return the point ids for the cell at cellId.
Subsequent calls to this method may invalidate previous call results if the internal storage type is not the same as vtkIdType and cannot be shared through the cellPoints pointer. If that occurs, the method will use ptIds, which is an object that is created by each thread, to guarantee thread safety.
Implements vtkAbstractCellArray.
Definition at line 1874 of file vtkCellArray.h.
Return the point ids for the cell at cellId.
This always copies the cell ids (i.e., the list of points pts into the supplied vtkIdList). This method is thread safe.
Implements vtkAbstractCellArray.
Definition at line 1881 of file vtkCellArray.h.
|
inlineoverridevirtual |
Return the point ids for the cell at cellId.
This always copies the cell ids into cellSize and cellPoints. This method is thread safe.
Note: the cellPoints need to have the correct size already allocated otherwise memory issues can occur.
Implements vtkAbstractCellArray.
Definition at line 1887 of file vtkCellArray.h.
|
inline |
Return the point id at cellPointIndex for the cell at cellId.
Definition at line 1893 of file vtkCellArray.h.
Return the size of the cell at cellId.
Implements vtkAbstractCellArray.
Definition at line 1866 of file vtkCellArray.h.
Insert a cell object.
Return the cell id of the cell.
Definition at line 1939 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 1901 of file vtkCellArray.h.
Create a cell by specifying a list of point ids.
Return the cell id of the cell.
Definition at line 1930 of file vtkCellArray.h.
Overload that allows InsertNextCell({0, 1, 2})
syntax.
InsertNextCell({3})
) will call the InsertNextCell(int)
overload instead. Definition at line 822 of file vtkCellArray.h.
|
inline |
Create cells by specifying a count of total points to be inserted, 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 1910 of file vtkCellArray.h.
|
inline |
Used in conjunction with InsertNextCell(npts) to add another point to the list of cells.
Definition at line 1918 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 1924 of file vtkCellArray.h.
vtkIdType vtkCellArray::GetTraversalCellId | ( | ) |
Get/Set the current cellId for traversal.
void vtkCellArray::SetTraversalCellId | ( | vtkIdType | cellId | ) |
Get/Set the current cellId for traversal.
void vtkCellArray::ReverseCellAtId | ( | vtkIdType | cellId | ) |
Reverses the order of the point ids for the specified cell.
Replaces the point ids for the specified cell with the supplied list.
void vtkCellArray::ReplaceCellAtId | ( | vtkIdType | cellId, |
vtkIdType | cellSize, | ||
const vtkIdType * | cellPoints | ||
) |
Replaces the point ids for the specified cell with the supplied list.
void vtkCellArray::ReplaceCellPointAtId | ( | vtkIdType | cellId, |
vtkIdType | cellPointIndex, | ||
vtkIdType | newPointId | ||
) |
Replaces the pointId at cellPointIndex of a cell with newPointId.
|
inline |
Overload that allows ReplaceCellAtId(cellId, {0, 1, 2})
syntax.
Definition at line 892 of file vtkCellArray.h.
|
overridevirtual |
Returns the size of the largest cell.
The size is the number of points defining the cell.
Implements vtkAbstractCellArray.
|
overridevirtual |
Perform a deep copy (no reference counting) of the given cell array.
Implements vtkAbstractCellArray.
|
overridevirtual |
Shallow copy ca into this cell array.
Implements vtkAbstractCellArray.
void vtkCellArray::Append | ( | vtkCellArray * | src, |
vtkIdType | pointOffset = 0 |
||
) |
Append cells from src into this.
Point ids are offset by pointOffset.
void vtkCellArray::ExportLegacyFormat | ( | vtkIdTypeArray * | data | ) |
Fill data with the old-style vtkCellArray data layout, e.g.
where n0
is the number of points in cell 0, and pX_Y
is the Y'th point in cell X.
void vtkCellArray::ImportLegacyFormat | ( | vtkIdTypeArray * | data | ) |
Import an array of data with the legacy vtkCellArray layout, e.g.:
where n0
is the number of points in cell 0, and pX_Y
is the Y'th point in cell X.
Import an array of data with the legacy vtkCellArray layout, e.g.:
where n0
is the number of points in cell 0, and pX_Y
is the Y'th point in cell X.
void vtkCellArray::AppendLegacyFormat | ( | vtkIdTypeArray * | data, |
vtkIdType | ptOffset = 0 |
||
) |
Append an array of data with the legacy vtkCellArray layout, e.g.:
where n0
is the number of points in cell 0, and pX_Y
is the Y'th point in cell X.
void vtkCellArray::AppendLegacyFormat | ( | const vtkIdType * | data, |
vtkIdType | len, | ||
vtkIdType | ptOffset = 0 |
||
) |
Append an array of data with the legacy vtkCellArray layout, e.g.:
where n0
is the number of points in cell 0, and pX_Y
is the Y'th point in cell X.
unsigned long vtkCellArray::GetActualMemorySize | ( | ) | const |
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.
|
inline |
The Dispatch methods allow efficient bulk modification of the vtkCellArray internal arrays by dispatching a functor with the actual arrays. The simplest functor is of the form:
where DispatchUtilities provides convenience methods to work with the arrays, such as GetRange(), GetCellSize(), GetCellRange(), etc.
The functor may also:
operator()
using a reference argument.operator()
A more advanced functor that does these things is shown below, along with its usage. This functor scans a range of cells and returns the largest cell's id:
Definition at line 1091 of file vtkCellArray.h.
|
inline |
The Dispatch methods allow efficient bulk modification of the vtkCellArray internal arrays by dispatching a functor with the actual arrays. The simplest functor is of the form:
where DispatchUtilities provides convenience methods to work with the arrays, such as GetRange(), GetCellSize(), GetCellRange(), etc.
The functor may also:
operator()
using a reference argument.operator()
A more advanced functor that does these things is shown below, along with its usage. This functor scans a range of cells and returns the largest cell's id:
Definition at line 1117 of file vtkCellArray.h.
|
inline |
The Visit methods allow efficient bulk modification of the vtkCellArray internal arrays by dispatching a functor with the current storage arrays. The simplest functor is of the form:
where state
is an instance of the vtkCellArray::VisitState<ArrayT> class, instantiated for the current storage type of the cell array. See that class for usage details.
The functor may also:
operator()
operator()
A more advanced functor that does these things is shown below, along with its usage. This functor scans a range of cells and returns the largest cell's id:
Definition at line 1310 of file vtkCellArray.h.
|
inline |
The Visit methods allow efficient bulk modification of the vtkCellArray internal arrays by dispatching a functor with the current storage arrays. The simplest functor is of the form:
where state
is an instance of the vtkCellArray::VisitState<ArrayT> class, instantiated for the current storage type of the cell array. See that class for usage details.
The functor may also:
operator()
operator()
A more advanced functor that does these things is shown below, along with its usage. This functor scans a range of cells and returns the largest cell's id:
Definition at line 1341 of file vtkCellArray.h.
|
inline |
The Visit methods allow efficient bulk modification of the vtkCellArray internal arrays by dispatching a functor with the current storage arrays. The simplest functor is of the form:
where state
is an instance of the vtkCellArray::VisitState<ArrayT> class, instantiated for the current storage type of the cell array. See that class for usage details.
The functor may also:
operator()
operator()
A more advanced functor that does these things is shown below, along with its usage. This functor scans a range of cells and returns the largest cell's id:
Definition at line 1372 of file vtkCellArray.h.
|
inline |
The Visit methods allow efficient bulk modification of the vtkCellArray internal arrays by dispatching a functor with the current storage arrays. The simplest functor is of the form:
where state
is an instance of the vtkCellArray::VisitState<ArrayT> class, instantiated for the current storage type of the cell array. See that class for usage details.
The functor may also:
operator()
operator()
A more advanced functor that does these things is shown below, along with its usage. This functor scans a range of cells and returns the largest cell's id:
Definition at line 1400 of file vtkCellArray.h.
|
inlinestatic |
Control the default internal storage size.
Useful for saving memory when most cases can be handled with 32bit indices, but large models may require a run-time switch to 64bit indices.
Definition at line 1436 of file vtkCellArray.h.
|
inlinestatic |
Control the default internal storage size.
Useful for saving memory when most cases can be handled with 32bit indices, but large models may require a run-time switch to 64bit indices.
Definition at line 1437 of file vtkCellArray.h.
|
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.)
vtkIdType vtkCellArray::GetSize | ( | ) |
Get the size of the allocated connectivity array.
vtkIdType vtkCellArray::GetNumberOfConnectivityEntries | ( | ) |
Return the size of the array that would be returned from ExportLegacyFormat().
Internal method used to retrieve a cell given a legacy offset location.
Internal method used to retrieve a cell given a legacy offset location.
vtkIdType vtkCellArray::GetInsertLocation | ( | int | npts | ) |
Computes the current legacy insertion location within the internal array.
Used in conjunction with GetCell(int loc,...).
vtkIdType vtkCellArray::GetTraversalLocation | ( | ) |
Get/Set the current traversal legacy location.
Get/Set the current traversal legacy location.
void vtkCellArray::SetTraversalLocation | ( | vtkIdType | loc | ) |
Get/Set the current traversal legacy location.
void vtkCellArray::ReverseCell | ( | vtkIdType | loc | ) |
Special method inverts ordering of cell at the specified legacy location.
Must be called carefully or the cell topology may be corrupted.
Replace the point ids of the cell at the legacy location with a different list of point ids.
Calling this method does not mark the vtkCellArray as modified. This is the responsibility of the caller and may be done after multiple calls to ReplaceCell. This call does not support changing the number of points in the cell – the caller must ensure that the target cell has npts points.
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.
cells
. This function merely calls ImportLegacyFormat.vtkIdTypeArray * vtkCellArray::GetData | ( | ) |
Return the underlying data as a data array.
void vtkAbstractCellArray::GetCellAtId | ( | vtkIdType | cellId, |
vtkIdType & | cellSize, | ||
vtkIdType const *& | cellPoints | ||
) |
Return the point ids for the cell at cellId.
Subsequent calls to this method may invalidate previous call results if the internal storage type is not the same as vtkIdType and cannot be shared through the cellPoints pointer. If that occurs, the method will use ptIds, which is an object that is created by each thread, to guarantee thread safety.
|
virtual |
Return the point ids for the cell at cellId.
Subsequent calls to this method may invalidate previous call results if the internal storage type is not the same as vtkIdType and cannot be shared through the cellPoints pointer. If that occurs, the method will use ptIds, which is an object that is created by each thread, to guarantee thread safety.
Implements vtkAbstractCellArray.
Return the point ids for the cell at cellId.
Subsequent calls to this method may invalidate previous call results if the internal storage type is not the same as vtkIdType and cannot be shared through the cellPoints pointer. If that occurs, the method will use ptIds, which is an object that is created by each thread, to guarantee thread safety.
Implements vtkAbstractCellArray.
|
virtual |
Return the point ids for the cell at cellId.
Subsequent calls to this method may invalidate previous call results if the internal storage type is not the same as vtkIdType and cannot be shared through the cellPoints pointer. If that occurs, the method will use ptIds, which is an object that is created by each thread, to guarantee thread safety.
Implements vtkAbstractCellArray.
|
friend |
Definition at line 1591 of file vtkCellArray.h.
|
protected |
Definition at line 1597 of file vtkCellArray.h.
|
protected |
Definition at line 1598 of file vtkCellArray.h.
|
protected |
Definition at line 1599 of file vtkCellArray.h.
|
protected |
Definition at line 1600 of file vtkCellArray.h.
|
protected |
Definition at line 1602 of file vtkCellArray.h.
|
staticprotected |
Definition at line 1604 of file vtkCellArray.h.