Accessory class to update pointers after eventual reallocation caused by adding elements. More...
#include <allocate.h>
Public Member Functions | |
void | Clear () |
bool | NeedUpdate () |
return true if the allocation operation that initialized this PointerUpdater has caused a reallocation | |
PointerUpdater (void) | |
void | Update (SimplexPointerType &vp) |
Update a pointer to an element of a mesh after a reallocation. | |
Public Attributes | |
SimplexPointerType | newBase |
SimplexPointerType | newEnd |
SimplexPointerType | oldBase |
SimplexPointerType | oldEnd |
bool | preventUpdateFlag |
std::vector< size_t > | remap |
Accessory class to update pointers after eventual reallocation caused by adding elements.
This class is used whenever you trigger some allocation operation that can cause the invalidation of the pointers to mesh elements. Typical situations are when you are allocating new vertexes, edges, halfedges of faces or when you compact their containers to get rid of deleted elements. This object allows you to update an invalidate pointer immediately after an action that invalidate it.
Definition at line 129 of file allocate.h.
vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::PointerUpdater | ( | void | ) | [inline] |
Definition at line 132 of file allocate.h.
void vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::Clear | ( | ) | [inline] |
Definition at line 133 of file allocate.h.
bool vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::NeedUpdate | ( | ) | [inline] |
return true if the allocation operation that initialized this PointerUpdater has caused a reallocation
Definition at line 151 of file allocate.h.
void vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::Update | ( | SimplexPointerType & | vp | ) | [inline] |
Update a pointer to an element of a mesh after a reallocation.
The updating is correctly done only if this PointerUpdater have been passed to the corresponing allocation call.
Definition at line 138 of file allocate.h.
SimplexPointerType vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::newBase |
Definition at line 153 of file allocate.h.
SimplexPointerType vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::newEnd |
Definition at line 155 of file allocate.h.
SimplexPointerType vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::oldBase |
Definition at line 154 of file allocate.h.
SimplexPointerType vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::oldEnd |
Definition at line 156 of file allocate.h.
bool vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::preventUpdateFlag |
Definition at line 159 of file allocate.h.
std::vector<size_t> vcg::tri::Allocator< MeshType >::PointerUpdater< SimplexPointerType >::remap |
Definition at line 157 of file allocate.h.