|
VTK
9.7.20261129
|
#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 signed ids of its faces in Faces, see below. 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.
Shared faces
A face used by two cells may be stored once. It is wound for one of them. Another cell lists it in FaceLocations as -(n+1) to traverse face n of Faces in reverse, so that every cell sees its faces with an outward orientation. For example, two tetrahedra sharing a face:
Here the first face of cell 1 is face 0 of Faces, reversed, i.e., -1. Use GetFace() or GetFacePoints() to read the faces of a cell with their orientation applied. The ids of FaceLocations must be decoded with DecodeFaceId() before indexing Faces. Sharing is optional and decided face by face, so shared faces and faces copied per cell can be mixed: InsertNextCell() never shares faces, shared faces are given with SetData() by whoever knows them, e.g., a reader, and DuplicateSharedFaces() gives every cell its own copy.
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 143 of file vtkPolyhedronCellArray.h.
Classes | |
| struct | DispatchUtilities |
| The utilities of vtkCellArray::DispatchUtilities, and helpers that take the signed face ids of FaceLocations as they are, so that a functor of Dispatch() reads faces in the order of their cell without decoding ids. More... | |
| struct | OrientedFace |
| A face of a cell, with its orientation applied lazily: the points are those stored in Faces, read in reverse if Reversed is true. More... | |
Public Types | |
| using | AOSArray32 = vtkCellArray::AOSArray32 |
| using | AOSArray64 = vtkCellArray::AOSArray64 |
| using | AffineArray32 = vtkCellArray::AffineArray32 |
| using | AffineArray64 = vtkCellArray::AffineArray64 |
| using | StorageTypes = vtkCellArray::StorageTypes |
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 GetFace() and GetFacePoints() may return a pointer to them instead of copying them, see their documentation. | |
| int | GetCellNumberOfFaces (vtkIdType cellId) const |
| Return the number of faces of the cell cellId. | |
| vtkIdType | GetSignedFaceId (vtkIdType cellId, int face) const |
| Return the signed id, as listed in FaceLocations, of the face face of the cell cellId. | |
| vtkIdType | GetStoredFaceId (vtkIdType cellId, int face) const |
| Return the id, in Faces, of the face face of the cell cellId, whatever its orientation. | |
| 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. | |
| VTK_WRAPEXCLUDE OrientedFace | GetFace (vtkIdType cellId, int face, vtkIdList *tempIds) const |
| Return the face face of the cell cellId, without copying its points whenever the storage is shareable, see IsStorageShareable(). | |
| 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, in the order the cell traverses them, as vtkCellArray::GetCellAtId(): pts points to the internal storage if it is shareable and the face is not reversed, otherwise the point ids are copied into tempIds, which must be given, in which case they are reversed for a reversed face. | |
| void | GetFacePoints (vtkIdType cellId, int face, vtkIdList *pts) const |
| Copy the point ids of the face face of the cell cellId into pts, in the order the cell traverses them. | |
| 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. | |
| bool | HasSharedFaces () const |
| Whether the faces are not one copy per cell, in cell order: a face is used by several cells, traversed in reverse, or listed out of order. | |
| void | DuplicateSharedFaces () |
| Give every cell its own copy of its faces, in cell order, a reversed face stored the way its cell traverses it. | |
| void | DuplicateSharedFaces (vtkPolyhedronCellArray *source) |
| Make this a copy of source in which every cell owns its faces, as DuplicateSharedFaces(), for code or formats that expect the faces of each cell to be its own. | |
| bool | Validate () const |
| Check the consistency of the arrays, for debugging: every id of FaceLocations refers to a face of Faces, and a face is used by at most two cells. | |
| 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 signed 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 signed ids of the faces of the polyhedral cells. | |
| vtkIdType | GetNumberOfCells () const |
| Get the number of cells, and the number of stored faces. | |
| vtkIdType | GetNumberOfFaces () const |
| Get the number of cells, and the number of stored faces. | |
| 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. | |
Static Public Member Functions | |
| static vtkIdType | DecodeFaceId (vtkIdType signedFaceId) |
| Decode a signed face id of FaceLocations: the id of the face in Faces, and whether the cell traverses it in reverse. | |
| static bool | IsReversedFaceId (vtkIdType signedFaceId) |
| Decode a signed face id of FaceLocations: the id of the face in Faces, and whether the cell traverses it in reverse. | |
| static vtkIdType | EncodeFaceId (vtkIdType storedFaceId, bool reversed) |
| Decode a signed face id of FaceLocations: the id of the face in Faces, and whether the cell traverses it in reverse. | |
| 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. | |
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 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 146 of file vtkPolyhedronCellArray.h.
Definition at line 147 of file vtkPolyhedronCellArray.h.
Definition at line 148 of file vtkPolyhedronCellArray.h.
Definition at line 149 of file vtkPolyhedronCellArray.h.
Definition at line 150 of file vtkPolyhedronCellArray.h.
Standard methods for instantiation, type information, and printing.
Definition at line 226 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. The ids of faceLocations may be signed, see the class documentation.
|
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 signed ids of the faces of the polyhedral cells.
The ids of the face locations must be decoded with DecodeFaceId() to index the faces, or read through the helpers of DispatchUtilities in a functor of Dispatch().
Definition at line 285 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 signed ids of the faces of the polyhedral cells.
The ids of the face locations must be decoded with DecodeFaceId() to index the faces, or read through the helpers of DispatchUtilities in a functor of Dispatch().
Definition at line 286 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 stored faces.
A face shared by several cells is counted once.
Definition at line 299 of file vtkPolyhedronCellArray.h.
|
inline |
Get the number of cells, and the number of stored faces.
A face shared by several cells is counted once.
Definition at line 300 of file vtkPolyhedronCellArray.h.
|
inline |
Return the number of faces of the cell with the most faces.
Definition at line 306 of file vtkPolyhedronCellArray.h.
|
inline |
Return the size of the largest face, i.e., its number of points.
Definition at line 311 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 317 of file vtkPolyhedronCellArray.h.
|
inline |
Return true if the points of the faces are stored as vtkIdType, so that GetFace() and GetFacePoints() may return a pointer to them instead of copying them, see their documentation.
Definition at line 329 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. The signed ids of FaceLocations are taken into account.
| 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. The signed ids of FaceLocations are taken into account.
| 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. The signed ids of FaceLocations are taken into account.
| 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. The signed ids of FaceLocations are taken into account.
Decode a signed face id of FaceLocations: the id of the face in Faces, and whether the cell traverses it in reverse.
EncodeFaceId() is the inverse, with -(n+1) for the reverse of face n.
Definition at line 350 of file vtkPolyhedronCellArray.h.
|
inlinestatic |
Decode a signed face id of FaceLocations: the id of the face in Faces, and whether the cell traverses it in reverse.
EncodeFaceId() is the inverse, with -(n+1) for the reverse of face n.
Definition at line 354 of file vtkPolyhedronCellArray.h.
|
inlinestatic |
Decode a signed face id of FaceLocations: the id of the face in Faces, and whether the cell traverses it in reverse.
EncodeFaceId() is the inverse, with -(n+1) for the reverse of face n.
Definition at line 355 of file vtkPolyhedronCellArray.h.
|
inline |
Return the number of faces of the cell cellId.
Definition at line 754 of file vtkPolyhedronCellArray.h.
Return the signed id, as listed in FaceLocations, of the face face of the cell cellId.
It is negative if the cell traverses the stored face in reverse, see DecodeFaceId(). It must not be used to index Faces directly.
Definition at line 760 of file vtkPolyhedronCellArray.h.
Return the id, in Faces, of the face face of the cell cellId, whatever its orientation.
Definition at line 379 of file vtkPolyhedronCellArray.h.
Return the number of points of the face face of the cell cellId.
Definition at line 766 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 face face of the cell cellId, without copying its points whenever the storage is shareable, see IsStorageShareable().
The points are not reversed: OrientedFace::Reversed tells whether to read them in reverse, which operator[] does. tempIds is only used, and must be given, if the storage is not shareable, in which case the points are copied into it, in the order of Faces.
Definition at line 772 of file vtkPolyhedronCellArray.h.
|
inline |
Return the npts point ids pts of the face face of the cell cellId, in the order the cell traverses them, as vtkCellArray::GetCellAtId(): pts points to the internal storage if it is shareable and the face is not reversed, otherwise the point ids are copied into tempIds, which must be given, in which case they are reversed for a reversed face.
pts is only valid until the faces, or tempIds, are modified. Prefer GetFace() to avoid the copy of reversed faces.
Definition at line 779 of file vtkPolyhedronCellArray.h.
Copy the point ids of the face face of the cell cellId into pts, in the order the cell traverses them.
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, ...).
The faces are oriented for the cell. 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.
The faces are oriented for the cell.
| 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, ...).
The faces are copied, never shared with those of other cells. Returns the id of the cell.
| vtkIdType vtkPolyhedronCellArray::InsertNextCell | ( | vtkCellArray * | faces | ) |
Insert a cell given by its faces, one cell of faces per face.
The faces are copied, never shared with those of other cells. 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.
| bool vtkPolyhedronCellArray::HasSharedFaces | ( | ) | const |
Whether the faces are not one copy per cell, in cell order: a face is used by several cells, traversed in reverse, or listed out of order.
The result is cached until this or its vtkCellArrays are modified (call Modified() on a vtkCellArray after writing to its data arrays), so call it once before a threaded loop. When false, every face is read forward, and the points of the faces can be shared without a copy.
| void vtkPolyhedronCellArray::DuplicateSharedFaces | ( | ) |
Give every cell its own copy of its faces, in cell order, a reversed face stored the way its cell traverses it.
For code that expects the faces of each cell to be its own.
| void vtkPolyhedronCellArray::DuplicateSharedFaces | ( | vtkPolyhedronCellArray * | source | ) |
Make this a copy of source in which every cell owns its faces, as DuplicateSharedFaces(), for code or formats that expect the faces of each cell to be its own.
If source has no shared faces, its arrays are shared with this, as by ShallowCopy().
| bool vtkPolyhedronCellArray::Validate | ( | ) | const |
Check the consistency of the arrays, for debugging: every id of FaceLocations refers to a face of Faces, and a face is used by at most two cells.
Returns true if valid, otherwise prints the first error.
| 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.
The orientation of the faces of source is preserved: the signed ids are decoded, offset, and encoded again.
| 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 }. The faces are oriented for their cell, so shared faces are duplicated.
| 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.
The faces are not shared.
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.
The faces are not shared.
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 ids read from the connectivity of FaceLocations are signed: pass them to GetFaceSize() and GetOrientedFaceRange() of DispatchUtilities, or decode them with DecodeFaceId() before indexing Faces. 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 604 of file vtkPolyhedronCellArray.h.
|
inline |
Definition at line 610 of file vtkPolyhedronCellArray.h.