|
VTK
9.7.20261025
|
#include <vtkPolyhedronCellArray.h>
object to represent the faces of polyhedral cells
vtkPolyhedronCellArray stores the topology of polyhedral cells, e.g., the VTK_POLYHEDRON cells of a vtkUnstructuredGrid, as an explicit table listing the faces that make up each cell, and the point ids that make up each face.
Internally, the table is represented as two vtkCellArray: Faces and FaceLocations.
Faces is a vtkCellArray storing every face as a cell, i.e., the list of its point ids.
FaceLocations is a vtkCellArray storing every polyhedral cell as a cell, i.e., the list of the ids of its faces in Faces. A cell that is not polyhedral, e.g., the hexahedron of a vtkUnstructuredGrid that also has polyhedra, has no face.
Thus, for a set of cells consisting of a tetrahedron given by its faces, a hexahedron, and a pyramid given by its faces, the internal arrays will appear as follows:
The faces of a cell may also be given by a face stream, as the polyhedra of vtkUnstructuredGrid::InsertNextCell(): the number of points of every face, followed by its point ids, e.g., {3, 0, 1, 2, 3, 0, 3, 1, 3, 1, 3, 2, 3, 2, 3, 0} for the four faces of cell 0 above.
The query methods, e.g., GetCellNumberOfFaces(), GetFaceSize() and GetFacePoints(), dispatch the storage type of the arrays for every call, as vtkCellArray::GetCellAtId(). They are thread-safe if the arrays are not modified, and if every thread gives its own vtkIdList to GetFacePoints(). Whenever many faces are traversed, e.g., in a threaded loop, it is preferable to dispatch the arrays once with Dispatch(), and to read them directly:
The internal arrays of Faces and FaceLocations may store either 32- or 64-bit values, and may be "fixed size", see vtkCellArray, e.g., the faces of hexahedra converted to polyhedra have 4 points, and their cells 6 faces. The storage type of a vtkPolyhedronCellArray is the storage type of Faces and FaceLocations when they have the same one, otherwise Generic. Methods for managing the storage type are:
Definition at line 116 of file vtkPolyhedronCellArray.h.
Public Types | |
| using | AOSArray32 = vtkCellArray::AOSArray32 |
| using | AOSArray64 = vtkCellArray::AOSArray64 |
| using | AffineArray32 = vtkCellArray::AffineArray32 |
| using | AffineArray64 = vtkCellArray::AffineArray64 |
| using | StorageTypes = vtkCellArray::StorageTypes |
| using | DispatchUtilities = vtkCellArray::DispatchUtilities |
Public Member Functions | |
| bool | AllocateEstimate (vtkIdType numCells, vtkIdType maxFacesPerCell, vtkIdType maxFacePoints) |
| Pre-allocate memory to store numCells cells of at most maxFacesPerCell faces of at most maxFacePoints points, as vtkCellArray::AllocateEstimate(): existing data is NOT preserved. | |
| void | Initialize () |
| Free any memory and reset to an empty state. | |
| void | Reset () |
| Reuse the list without freeing memory. | |
| void | Squeeze () |
| Reclaim any extra memory while preserving data. | |
| unsigned long | GetActualMemorySize () const |
| Return the size, in kibibytes (1024 bytes), of the memory used by this object. | |
| void | DeepCopy (vtkPolyhedronCellArray *other) |
| Perform a deep copy (no reference counting) of the given polyhedron cell array. | |
| void | ShallowCopy (vtkPolyhedronCellArray *other) |
| Shallow copy the given polyhedron cell array: its Faces and FaceLocations are shared. | |
| void | SetData (vtkCellArray *faces, vtkCellArray *faceLocations) |
| Set the internal data arrays to the supplied faces and face locations, which are referenced, not copied. | |
| vtkMTimeType | GetMTime () override |
| Return the modification time of this object and of its arrays. | |
| int | GetMaxCellNumberOfFaces () const |
| Return the number of faces of the cell with the most faces. | |
| int | GetMaxFaceSize () const |
| Return the size of the largest face, i.e., its number of points. | |
| StorageTypes | GetStorageType () const noexcept |
| Return the storage type of the arrays: the one of Faces and FaceLocations if they have the same, otherwise Generic, see Dispatch(). | |
| bool | IsStorageShareable () const |
| Return true if the points of the faces are stored as vtkIdType, so that GetFacePoints() returns a pointer to them instead of copying them. | |
| int | GetCellNumberOfFaces (vtkIdType cellId) const |
| Return the number of faces of the cell cellId. | |
| vtkIdType | GetFaceId (vtkIdType cellId, int face) const |
| Return the id, in Faces, of the face face of the cell cellId. | |
| vtkIdType | GetFaceSize (vtkIdType cellId, int face) const |
| Return the number of points of the face face of the cell cellId. | |
| vtkIdType | GetCellNumberOfFacePoints (vtkIdType cellId) const |
| Return the number of points of all the faces of the cell cellId, as listed in its faces: a point of several faces is counted several times. | |
| void | GetFacePoints (vtkIdType cellId, int face, vtkIdType &npts, vtkIdType const *&pts, vtkIdList *tempIds) const |
| Return the npts point ids pts of the face face of the cell cellId, as vtkCellArray::GetCellAtId(): pts points to the internal storage if it is shareable, see IsStorageShareable(), otherwise the point ids are copied into tempIds, which must be given. | |
| void | GetFacePoints (vtkIdType cellId, int face, vtkIdList *pts) const |
| Copy the point ids of the face face of the cell cellId into pts. | |
| void | GetFaceStream (vtkIdType cellId, vtkIdList *faceStream) const |
| Copy the faces of the cell cellId into faceStream, as a face stream preceded by the number of faces: (numFaces, numFace0Pts, id1, id2, ..., numFace1Pts, id1, id2, ...). | |
| void | GetCellFaces (vtkIdType cellId, vtkCellArray *faces) const |
| Copy the faces of the cell cellId into faces, one cell per face. | |
| VTK_WRAPEXCLUDE vtkIdType | InsertNextCell (vtkIdType numFaces, const vtkIdType *faceStream) |
| Insert a cell given by its numFaces faces, as a face stream: (numFace0Pts, id1, id2, ..., numFace1Pts, id1, id2, ...). | |
| vtkIdType | InsertNextCell (vtkCellArray *faces) |
| Insert a cell given by its faces, one cell of faces per face. | |
| vtkIdType | InsertEmptyCells (vtkIdType numCells) |
| Insert numCells cells without face, e.g., the cells of a vtkUnstructuredGrid that are not polyhedral. | |
| void | Append (vtkPolyhedronCellArray *source, vtkIdType pointOffset=0) |
| Append the cells of source into this, as vtkCellArray::Append(): the point ids of its faces are offset by pointOffset, and the ids of its faces by the number of faces of this. | |
| void | ExportLegacyFormat (vtkIdTypeArray *faces, vtkIdTypeArray *faceLocations) |
| Fill faces and faceLocations with the legacy layout of the faces of the cells, the two vtkIdTypeArray of vtkUnstructuredGrid before VTK 9.4: faces concatenates the face streams of the cells with faces, e.g. | |
| template<typename Functor, typename... Args> | |
| decltype(auto) | Dispatch (Functor &&functor, Args &&... args) const |
| template<typename Functor, typename... Args> | |
| decltype(auto) | Dispatch (Functor &&functor, StorageTypes storageType, Args &&... args) const |
| vtkCellArray * | GetFaces () const |
| Return the vtkCellArray of the faces, whose cells are the point ids of the faces, and the vtkCellArray of the face locations, whose cells are the ids of the faces of the polyhedral cells. | |
| vtkCellArray * | GetFaceLocations () const |
| Return the vtkCellArray of the faces, whose cells are the point ids of the faces, and the vtkCellArray of the face locations, whose cells are the ids of the faces of the polyhedral cells. | |
| vtkIdType | GetNumberOfCells () const |
| Get the number of cells, and the number of faces of all the cells. | |
| vtkIdType | GetNumberOfFaces () const |
| Get the number of cells, and the number of faces of all the cells. | |
| bool | ConvertTo64BitStorage () |
| Convert the storage of Faces and FaceLocations, see vtkCellArray. | |
| bool | ConvertTo32BitStorage () |
| Convert the storage of Faces and FaceLocations, see vtkCellArray. | |
| bool | ConvertToDefaultStorage () |
| Convert the storage of Faces and FaceLocations, see vtkCellArray. | |
| bool | ConvertToSmallestStorage () |
| Convert the storage of Faces and FaceLocations, see vtkCellArray. | |
| bool | ImportLegacyFormat (vtkIdTypeArray *faces, vtkIdTypeArray *faceLocations) |
| Import arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat(): faces of facesLength values, and faceLocations of one value per cell, numberOfCells values. | |
| bool | ImportLegacyFormat (const vtkIdType *faces, vtkIdType facesLength, const vtkIdType *faceLocations, vtkIdType numberOfCells) |
| Import arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat(): faces of facesLength values, and faceLocations of one value per cell, numberOfCells values. | |
| bool | AppendLegacyFormat (vtkIdTypeArray *faces, vtkIdTypeArray *faceLocations, vtkIdType ptOffset=0) |
| Append arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat() and ImportLegacyFormat(). | |
| bool | AppendLegacyFormat (const vtkIdType *faces, vtkIdType facesLength, const vtkIdType *faceLocations, vtkIdType numberOfCells, vtkIdType ptOffset=0) |
| Append arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat() and ImportLegacyFormat(). | |
| Public Member Functions inherited from vtkObject | |
| 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. | |
| 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. | |
| Public Member Functions inherited from vtkObjectBase | |
| const char * | GetClassName () const |
| Return the class name as a string. | |
| 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. | |
Protected Member Functions | |
| vtkPolyhedronCellArray () | |
| ~vtkPolyhedronCellArray () override | |
| Protected Member Functions inherited from vtkObject | |
| 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. | |
| Protected Member Functions inherited from vtkObjectBase | |
| vtkObjectBase () | |
| virtual | ~vtkObjectBase () |
| virtual void | ReportReferences (vtkGarbageCollector *) |
| vtkObjectBase (const vtkObjectBase &) | |
| void | operator= (const vtkObjectBase &) |
| typedef vtkObject | Superclass |
| Standard methods for instantiation, type information, and printing. | |
| static vtkPolyhedronCellArray * | New () |
| Standard methods for instantiation, type information, and printing. | |
| static vtkTypeBool | IsTypeOf (const char *type) |
| Standard methods for instantiation, type information, and printing. | |
| static vtkPolyhedronCellArray * | 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. | |
| vtkPolyhedronCellArray * | 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. | |
| virtual vtkObjectBase * | NewInstanceInternal () const |
| Standard methods for instantiation, type information, and printing. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from vtkObject | |
| 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 Public Member Functions inherited from vtkObjectBase | |
| 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. | |
| Static Protected Member Functions inherited from vtkObjectBase | |
| static vtkMallocingFunction | GetCurrentMallocFunction () |
| static vtkReallocingFunction | GetCurrentReallocFunction () |
| static vtkFreeingFunction | GetCurrentFreeFunction () |
| static vtkFreeingFunction | GetAlternateFreeFunction () |
| Protected Attributes inherited from vtkObject | |
| bool | Debug |
| vtkTimeStamp | MTime |
| vtkSubjectHelper * | SubjectHelper |
| std::string | ObjectName |
| Protected Attributes inherited from vtkObjectBase | |
| std::atomic< int32_t > | ReferenceCount |
| vtkWeakPointerBase ** | WeakPointers |
Definition at line 119 of file vtkPolyhedronCellArray.h.
Definition at line 120 of file vtkPolyhedronCellArray.h.
Definition at line 121 of file vtkPolyhedronCellArray.h.
Definition at line 122 of file vtkPolyhedronCellArray.h.
Definition at line 123 of file vtkPolyhedronCellArray.h.
Definition at line 124 of file vtkPolyhedronCellArray.h.
Standard methods for instantiation, type information, and printing.
Definition at line 131 of file vtkPolyhedronCellArray.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 vtkObjectBase.
|
static |
Standard methods for instantiation, type information, and printing.
|
protectedvirtual |
Standard methods for instantiation, type information, and printing.
| vtkPolyhedronCellArray * vtkPolyhedronCellArray::NewInstance | ( | ) | const |
Standard methods for instantiation, type information, and printing.
|
overridevirtual |
Standard methods for instantiation, type information, and printing.
Reimplemented from vtkObject.
| bool vtkPolyhedronCellArray::AllocateEstimate | ( | vtkIdType | numCells, |
| vtkIdType | maxFacesPerCell, | ||
| vtkIdType | maxFacePoints ) |
Pre-allocate memory to store numCells cells of at most maxFacesPerCell faces of at most maxFacePoints points, as vtkCellArray::AllocateEstimate(): existing data is NOT preserved.
Returns true if allocation succeeds.
| void vtkPolyhedronCellArray::Initialize | ( | ) |
Free any memory and reset to an empty state.
| void vtkPolyhedronCellArray::Reset | ( | ) |
Reuse the list without freeing memory.
| void vtkPolyhedronCellArray::Squeeze | ( | ) |
Reclaim any extra memory while preserving data.
| unsigned long vtkPolyhedronCellArray::GetActualMemorySize | ( | ) | const |
Return the size, in kibibytes (1024 bytes), of the memory used by this object.
| void vtkPolyhedronCellArray::DeepCopy | ( | vtkPolyhedronCellArray * | other | ) |
Perform a deep copy (no reference counting) of the given polyhedron cell array.
| void vtkPolyhedronCellArray::ShallowCopy | ( | vtkPolyhedronCellArray * | other | ) |
Shallow copy the given polyhedron cell array: its Faces and FaceLocations are shared.
| void vtkPolyhedronCellArray::SetData | ( | vtkCellArray * | faces, |
| vtkCellArray * | faceLocations ) |
Set the internal data arrays to the supplied faces and face locations, which are referenced, not copied.
Both must be non-null.
|
inline |
Return the vtkCellArray of the faces, whose cells are the point ids of the faces, and the vtkCellArray of the face locations, whose cells are the ids of the faces of the polyhedral cells.
Definition at line 187 of file vtkPolyhedronCellArray.h.
|
inline |
Return the vtkCellArray of the faces, whose cells are the point ids of the faces, and the vtkCellArray of the face locations, whose cells are the ids of the faces of the polyhedral cells.
Definition at line 188 of file vtkPolyhedronCellArray.h.
|
overridevirtual |
Return the modification time of this object and of its arrays.
Reimplemented from vtkObject.
|
inline |
Get the number of cells, and the number of faces of all the cells.
Definition at line 200 of file vtkPolyhedronCellArray.h.
|
inline |
Get the number of cells, and the number of faces of all the cells.
Definition at line 201 of file vtkPolyhedronCellArray.h.
|
inline |
Return the number of faces of the cell with the most faces.
Definition at line 207 of file vtkPolyhedronCellArray.h.
|
inline |
Return the size of the largest face, i.e., its number of points.
Definition at line 212 of file vtkPolyhedronCellArray.h.
|
inlinenoexcept |
Return the storage type of the arrays: the one of Faces and FaceLocations if they have the same, otherwise Generic, see Dispatch().
Definition at line 218 of file vtkPolyhedronCellArray.h.
|
inline |
Return true if the points of the faces are stored as vtkIdType, so that GetFacePoints() returns a pointer to them instead of copying them.
Definition at line 229 of file vtkPolyhedronCellArray.h.
| bool vtkPolyhedronCellArray::ConvertTo64BitStorage | ( | ) |
Convert the storage of Faces and FaceLocations, see vtkCellArray.
Returns true if both are converted. ConvertToSmallestStorage() gives both the same storage type: fixed size only if both can be, and 64-bit if either must be.
| bool vtkPolyhedronCellArray::ConvertTo32BitStorage | ( | ) |
Convert the storage of Faces and FaceLocations, see vtkCellArray.
Returns true if both are converted. ConvertToSmallestStorage() gives both the same storage type: fixed size only if both can be, and 64-bit if either must be.
| bool vtkPolyhedronCellArray::ConvertToDefaultStorage | ( | ) |
Convert the storage of Faces and FaceLocations, see vtkCellArray.
Returns true if both are converted. ConvertToSmallestStorage() gives both the same storage type: fixed size only if both can be, and 64-bit if either must be.
| bool vtkPolyhedronCellArray::ConvertToSmallestStorage | ( | ) |
Convert the storage of Faces and FaceLocations, see vtkCellArray.
Returns true if both are converted. ConvertToSmallestStorage() gives both the same storage type: fixed size only if both can be, and 64-bit if either must be.
|
inline |
Return the number of faces of the cell cellId.
Definition at line 559 of file vtkPolyhedronCellArray.h.
Return the id, in Faces, of the face face of the cell cellId.
Definition at line 565 of file vtkPolyhedronCellArray.h.
Return the number of points of the face face of the cell cellId.
Definition at line 571 of file vtkPolyhedronCellArray.h.
Return the number of points of all the faces of the cell cellId, as listed in its faces: a point of several faces is counted several times.
|
inline |
Return the npts point ids pts of the face face of the cell cellId, as vtkCellArray::GetCellAtId(): pts points to the internal storage if it is shareable, see IsStorageShareable(), otherwise the point ids are copied into tempIds, which must be given.
pts is only valid until the faces, or tempIds, are modified.
Definition at line 577 of file vtkPolyhedronCellArray.h.
Copy the point ids of the face face of the cell cellId into pts.
Copy the faces of the cell cellId into faceStream, as a face stream preceded by the number of faces: (numFaces, numFace0Pts, id1, id2, ..., numFace1Pts, id1, id2, ...).
It is empty if the cell has no face.
| void vtkPolyhedronCellArray::GetCellFaces | ( | vtkIdType | cellId, |
| vtkCellArray * | faces ) const |
Copy the faces of the cell cellId into faces, one cell per face.
| VTK_WRAPEXCLUDE vtkIdType vtkPolyhedronCellArray::InsertNextCell | ( | vtkIdType | numFaces, |
| const vtkIdType * | faceStream ) |
Insert a cell given by its numFaces faces, as a face stream: (numFace0Pts, id1, id2, ..., numFace1Pts, id1, id2, ...).
Returns the id of the cell.
| vtkIdType vtkPolyhedronCellArray::InsertNextCell | ( | vtkCellArray * | faces | ) |
Insert a cell given by its faces, one cell of faces per face.
Returns the id of the cell.
Insert numCells cells without face, e.g., the cells of a vtkUnstructuredGrid that are not polyhedral.
Returns the id of the last one, or -1 if numCells is 0.
| void vtkPolyhedronCellArray::Append | ( | vtkPolyhedronCellArray * | source, |
| vtkIdType | pointOffset = 0 ) |
Append the cells of source into this, as vtkCellArray::Append(): the point ids of its faces are offset by pointOffset, and the ids of its faces by the number of faces of this.
| void vtkPolyhedronCellArray::ExportLegacyFormat | ( | vtkIdTypeArray * | faces, |
| vtkIdTypeArray * | faceLocations ) |
Fill faces and faceLocations with the legacy layout of the faces of the cells, the two vtkIdTypeArray of vtkUnstructuredGrid before VTK 9.4: faces concatenates the face streams of the cells with faces, e.g.
where f0 is the number of faces of cell 0, n0_Y the number of points of its face Y, and p0_Y_Z the Z'th point of face Y, and faceLocations has one value per cell, the index in faces of its face stream, or -1 for a cell without face. For the cells of the class documentation, the face stream of cell 0 has 17 values, and faceLocations is { 0, -1, 17 }.
| bool vtkPolyhedronCellArray::ImportLegacyFormat | ( | vtkIdTypeArray * | faces, |
| vtkIdTypeArray * | faceLocations ) |
Import arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat(): faces of facesLength values, and faceLocations of one value per cell, numberOfCells values.
Returns false if the data is corrupt (for example a face location or f0 being too large for the actual buffer), in which case this is left unchanged. Returns true upon successful conversion.
| bool vtkPolyhedronCellArray::ImportLegacyFormat | ( | const vtkIdType * | faces, |
| vtkIdType | facesLength, | ||
| const vtkIdType * | faceLocations, | ||
| vtkIdType | numberOfCells ) |
Import arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat(): faces of facesLength values, and faceLocations of one value per cell, numberOfCells values.
Returns false if the data is corrupt (for example a face location or f0 being too large for the actual buffer), in which case this is left unchanged. Returns true upon successful conversion.
| bool vtkPolyhedronCellArray::AppendLegacyFormat | ( | vtkIdTypeArray * | faces, |
| vtkIdTypeArray * | faceLocations, | ||
| vtkIdType | ptOffset = 0 ) |
Append arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat() and ImportLegacyFormat().
Point ids are offset by ptOffset.
Returns false if the data is corrupt (for example a face location or f0 being too large for the actual buffer), in which case this is left unchanged. Returns true upon successful conversion.
| bool vtkPolyhedronCellArray::AppendLegacyFormat | ( | const vtkIdType * | faces, |
| vtkIdType | facesLength, | ||
| const vtkIdType * | faceLocations, | ||
| vtkIdType | numberOfCells, | ||
| vtkIdType | ptOffset = 0 ) |
Append arrays of data with the legacy layout of the faces of the cells, see ExportLegacyFormat() and ImportLegacyFormat().
Point ids are offset by ptOffset.
Returns false if the data is corrupt (for example a face location or f0 being too large for the actual buffer), in which case this is left unchanged. Returns true upon successful conversion.
|
inline |
The Dispatch method allows efficient traversal of the vtkPolyhedronCellArray internal arrays by dispatching a functor with the actual arrays, as vtkCellArray::Dispatch(): the offsets and the connectivity of Faces, then of FaceLocations, as vtkCellArray::AOSArray32, vtkCellArray::AOSArray64, the vtkCellArray::AffineArray32 and vtkCellArray::AffineArray64 offsets of fixed size storage, or vtkDataArray for Generic storage, see GetStorageType(). The functor may also return a value, and receive additional arguments:
The returned type is deduced, so every storage type instantiation of the functor must return the same type.
The second overload takes the storage type, which must be the one of GetStorageType(), so that a caller that dispatches many times, e.g., once per cell, gets it only once. Thus, the first additional argument of the first overload can not be a StorageTypes.
Definition at line 419 of file vtkPolyhedronCellArray.h.
|
inline |
Definition at line 425 of file vtkPolyhedronCellArray.h.