VCG Library
Classes | Static Public Member Functions | List of all members
vcg::tri::Allocator< MeshType > Class Template Reference

Class to safely add and delete elements in a mesh. More...

#include <allocate.h>

Classes

class  PointerUpdater
 Accessory class to update pointers after eventual reallocation caused by adding elements. More...
 

Static Public Member Functions

static VertexIterator AddVertices (MeshType &m, size_t n, PointerUpdater< VertexPointer > &pu)
 Add n vertices to the mesh. Function to add n vertices to the mesh. The elements are added always to the end of the vector. No attempt of reusing previously deleted element is done.
 
static VertexIterator AddVertices (MeshType &m, size_t n)
 Wrapper to AddVertices(); no PointerUpdater.
 
static VertexIterator AddVertices (MeshType &m, size_t n, std::vector< VertexPointer * > &local_vec)
 Wrapper to AddVertices() no PointerUpdater but a vector of VertexPointer pointers to be updated.
 
static VertexIterator AddVertex (MeshType &m, const CoordType &p)
 Wrapper to AddVertices() to add a single vertex with given coords.
 
static VertexIterator AddVertex (MeshType &m, const CoordType &p, const CoordType &n)
 Wrapper to AddVertices() to add a single vertex with given coords and normal.
 
static VertexIterator AddVertex (MeshType &m, const CoordType &p, const Color4b &c)
 Wrapper to AddVertices() to add a single vertex with given coords and color.
 
static EdgeIterator AddEdges (MeshType &m, size_t n, PointerUpdater< EdgePointer > &pu)
 Add n edges to the mesh. Function to add n edges to the mesh. The elements are added always to the end of the vector. No attempt of reusing previously deleted element is done.
 
static EdgeIterator AddEdge (MeshType &m, VertexPointer v0, VertexPointer v1)
 
static EdgeIterator AddEdge (MeshType &m, size_t v0, size_t v1)
 
static EdgeIterator AddEdge (MeshType &m, CoordType p0, CoordType p1)
 
static EdgeIterator AddEdges (MeshType &m, size_t n)
 
static EdgeIterator AddEdges (MeshType &m, size_t n, std::vector< EdgePointer * > &local_vec)
 
static HEdgeIterator AddHEdges (MeshType &m, size_t n, PointerUpdater< HEdgePointer > &pu)
 
static HEdgeIterator AddHEdges (MeshType &m, size_t n)
 
static HEdgeIterator AddHEdges (MeshType &m, size_t n, std::vector< HEdgePointer * > &local_vec)
 
static FaceIterator AddFace (MeshType &m, VertexPointer v0, VertexPointer v1, VertexPointer v2)
 
static FaceIterator AddFace (MeshType &m, size_t v0, size_t v1, size_t v2)
 
static FaceIterator AddFace (MeshType &m, CoordType p0, CoordType p1, CoordType p2)
 
static FaceIterator AddQuadFace (MeshType &m, VertexPointer v0, VertexPointer v1, VertexPointer v2, VertexPointer v3)
 
static FaceIterator AddFaces (MeshType &m, size_t n)
 Function to add n faces to the mesh. First wrapper, with no parameters.
 
static FaceIterator AddFaces (MeshType &m, size_t n, std::vector< FacePointer * > &local_vec)
 Function to add n faces to the mesh. Second Wrapper, with a vector of face pointer to be updated.
 
static FaceIterator AddFaces (MeshType &m, size_t n, PointerUpdater< FacePointer > &pu)
 Function to add n faces to the mesh. This is the only full featured function that is able to manage correctly all the official internal pointers of the mesh (like the VF and FF adjacency relations)
 
static TetraIterator AddTetras (MeshType &m, size_t n, PointerUpdater< TetraPointer > &pu)
 Function to add n tetras to the mesh. This is the only full featured function that is able to manage correctly all the official internal pointers of the mesh (like the VT and TT adjacency relations)
 
static TetraIterator AddTetra (MeshType &m, VertexPointer v0, VertexPointer v1, VertexPointer v2, VertexPointer v3)
 
static TetraIterator AddTetra (MeshType &m, const size_t v0, const size_t v1, const size_t v2, const size_t v3)
 
static TetraIterator AddTetra (MeshType &m, const CoordType &p0, const CoordType &p1, const CoordType &p2, const CoordType &p3)
 
static TetraIterator AddTetras (MeshType &m, size_t n)
 Function to add n faces to the mesh. First wrapper, with no parameters.
 
static TetraIterator AddTetras (MeshType &m, size_t n, std::vector< TetraPointer * > &local_vec)
 Function to add n faces to the mesh. Second Wrapper, with a vector of face pointer to be updated.
 
static void DeleteFace (MeshType &m, FaceType &f)
 
static void DeleteVertex (MeshType &m, VertexType &v)
 
static void DeleteEdge (MeshType &m, EdgeType &e)
 
static void DeleteHEdge (MeshType &m, HEdgeType &h)
 
static void DeleteTetra (MeshType &m, TetraType &t)
 
static void CompactVertexVector (MeshType &m, PointerUpdater< VertexPointer > &pu)
 Compact vector of vertices removing deleted elements. Deleted elements are put to the end of the vector and the vector is resized. Order between elements is preserved but not their position (hence the PointerUpdater) After calling this function the IsD() test in the scanning a vector, is no more necessary.
 
static void CompactVertexVector (MeshType &m)
 Wrapper without the PointerUpdater.
 
static void CompactEdgeVector (MeshType &m, PointerUpdater< EdgePointer > &pu)
 Compact vector of edges removing deleted elements.
 
static void CompactEdgeVector (MeshType &m)
 Wrapper without the PointerUpdater.
 
static void CompactFaceVector (MeshType &m, PointerUpdater< FacePointer > &pu)
 Compact face vector by removing deleted elements.
 
static void CompactFaceVector (MeshType &m)
 Wrapper without the PointerUpdater.
 
static void CompactTetraVector (MeshType &m, PointerUpdater< TetraPointer > &pu)
 Compact tetra vector by removing deleted elements.
 
static void CompactTetraVector (MeshType &m)
 Wrapper without the PointerUpdater.
 
template<class ATTR_TYPE >
static bool IsValidHandle (MeshType &m, const typename MeshType::template PerVertexAttributeHandle< ATTR_TYPE > &a)
 Check if an handle to a Per-Vertex Attribute is valid.
 
template<class ATTR_TYPE >
static MeshType::template
PerVertexAttributeHandle
< ATTR_TYPE > 
AddPerVertexAttribute (MeshType &m, std::string name)
 Add a Per-Vertex Attribute of the given ATTR_TYPE with the given name.
 
template<class ATTR_TYPE >
static MeshType::template
PerVertexAttributeHandle
< ATTR_TYPE > 
GetPerVertexAttribute (MeshType &m, std::string name=std::string(""))
 gives a handle to a per-vertex attribute with a given name and ATTR_TYPE
 
template<class ATTR_TYPE >
static MeshType::template
PerVertexAttributeHandle
< ATTR_TYPE > 
FindPerVertexAttribute (MeshType &m, const std::string &name)
 Try to retrieve an handle to an attribute with a given name and ATTR_TYPE.
 
template<class ATTR_TYPE >
static void GetAllPerVertexAttribute (MeshType &m, std::vector< std::string > &all)
 query the mesh for all the attributes per vertex
 
template<class ATTR_TYPE >
static void DeletePerVertexAttribute (MeshType &m, typename MeshType::template PerVertexAttributeHandle< ATTR_TYPE > &h)
 If the per-vertex attribute exists, delete it.
 
template<class ATTR_TYPE >
static bool IsValidHandle (MeshType &m, const typename MeshType::template PerEdgeAttributeHandle< ATTR_TYPE > &a)
 Per Edge Attributes.
 
template<class ATTR_TYPE >
static MeshType::template
PerEdgeAttributeHandle
< ATTR_TYPE > 
GetPerEdgeAttribute (MeshType &m, std::string name=std::string(""))
 gives a handle to a per-edge attribute with a given name and ATTR_TYPE
 
template<class ATTR_TYPE >
static void DeletePerEdgeAttribute (MeshType &m, typename MeshType::template PerEdgeAttributeHandle< ATTR_TYPE > &h)
 If the per-edge attribute exists, delete it.
 
template<class ATTR_TYPE >
static bool IsValidHandle (MeshType &m, const typename MeshType::template PerFaceAttributeHandle< ATTR_TYPE > &a)
 Per Face Attributes.
 
template<class ATTR_TYPE >
static MeshType::template
PerFaceAttributeHandle
< ATTR_TYPE > 
GetPerFaceAttribute (MeshType &m, std::string name=std::string(""))
 gives a handle to a per-edge attribute with a given name and ATTR_TYPE
 
template<class ATTR_TYPE >
static void DeletePerFaceAttribute (MeshType &m, typename MeshType::template PerFaceAttributeHandle< ATTR_TYPE > &h)
 If the per-face attribute exists, delete it.
 
template<class ATTR_TYPE >
static bool IsValidHandle (MeshType &m, const typename MeshType::template PerTetraAttributeHandle< ATTR_TYPE > &a)
 Per Tetra Attributes.
 
template<class ATTR_TYPE >
static MeshType::template
PerTetraAttributeHandle
< ATTR_TYPE > 
GetPerTetraAttribute (MeshType &m, std::string name=std::string(""))
 gives a handle to a per-tetra attribute with a given name and ATTR_TYPE
 
template<class ATTR_TYPE >
static void DeletePerTetraAttribute (MeshType &m, typename MeshType::template PerTetraAttributeHandle< ATTR_TYPE > &h)
 If the per-face attribute exists, delete it.
 
template<class ATTR_TYPE >
static bool IsValidHandle (MeshType &m, const typename MeshType::template PerMeshAttributeHandle< ATTR_TYPE > &a)
 Per Mesh Attributes.
 
template<class ATTR_TYPE >
static MeshType::template
PerMeshAttributeHandle
< ATTR_TYPE > 
GetPerMeshAttribute (MeshType &m, std::string name=std::string(""))
 gives a handle to a per-edge attribute with a given name and ATTR_TYPE
 
template<class ATTR_TYPE >
static void DeletePerMeshAttribute (MeshType &m, typename MeshType::template PerMeshAttributeHandle< ATTR_TYPE > &h)
 If the per-mesh attribute exists, delete it.
 

Detailed Description

template<class MeshType>
class vcg::tri::Allocator< MeshType >

Class to safely add and delete elements in a mesh.

Adding elements to a mesh, like faces and vertices can involve the reallocation of the vectors of the involved elements. This class provide the only safe methods to add elements. It also provide an accessory class vcg::tri::PointerUpdater for updating pointers to mesh elements that are kept by the user.

Definition at line 93 of file allocate.h.

Member Function Documentation

template<class MeshType>
static EdgeIterator vcg::tri::Allocator< MeshType >::AddEdge ( MeshType &  m,
VertexPointer  v0,
VertexPointer  v1 
)
inlinestatic

Function to add a single edge to the mesh. and initializing it with two VertexPointer

Definition at line 366 of file allocate.h.

template<class MeshType>
static EdgeIterator vcg::tri::Allocator< MeshType >::AddEdge ( MeshType &  m,
size_t  v0,
size_t  v1 
)
inlinestatic

Function to add a single edge to the mesh. and initializing it with two indexes to the vertexes

Definition at line 376 of file allocate.h.

template<class MeshType>
static EdgeIterator vcg::tri::Allocator< MeshType >::AddEdge ( MeshType &  m,
CoordType  p0,
CoordType  p1 
)
inlinestatic

Function to add a face to the mesh and initializing it with the three given coords

Definition at line 387 of file allocate.h.

template<class MeshType>
static EdgeIterator vcg::tri::Allocator< MeshType >::AddEdges ( MeshType &  m,
size_t  n,
PointerUpdater< EdgePointer > &  pu 
)
inlinestatic

Add n edges to the mesh. Function to add n edges to the mesh. The elements are added always to the end of the vector. No attempt of reusing previously deleted element is done.

See Also
PointerUpdater
Parameters
mthe mesh to be modified
nthe number of elements to be added
pua PointerUpdater initialized so that it can be used to update pointers to edges that could have become invalid after this adding.
Return values
theiterator to the first element added.

Definition at line 312 of file allocate.h.

template<class MeshType>
static EdgeIterator vcg::tri::Allocator< MeshType >::AddEdges ( MeshType &  m,
size_t  n 
)
inlinestatic

Function to add n edges to the mesh. First wrapper, with no parameters

Definition at line 401 of file allocate.h.

template<class MeshType>
static EdgeIterator vcg::tri::Allocator< MeshType >::AddEdges ( MeshType &  m,
size_t  n,
std::vector< EdgePointer * > &  local_vec 
)
inlinestatic

Function to add n edges to the mesh. Second Wrapper, with a vector of vertex pointers to be updated.

Definition at line 410 of file allocate.h.

template<class MeshType>
static FaceIterator vcg::tri::Allocator< MeshType >::AddFace ( MeshType &  m,
VertexPointer  v0,
VertexPointer  v1,
VertexPointer  v2 
)
inlinestatic

Function to add a face to the mesh and initializing it with the three given VertexPointers

Definition at line 518 of file allocate.h.

template<class MeshType>
static FaceIterator vcg::tri::Allocator< MeshType >::AddFace ( MeshType &  m,
size_t  v0,
size_t  v1,
size_t  v2 
)
inlinestatic

Function to add a face to the mesh and initializing it with three indexes

Definition at line 536 of file allocate.h.

template<class MeshType>
static FaceIterator vcg::tri::Allocator< MeshType >::AddFace ( MeshType &  m,
CoordType  p0,
CoordType  p1,
CoordType  p2 
)
inlinestatic

Function to add a face to the mesh and initializing it with the three given coords

Definition at line 546 of file allocate.h.

template<class MeshType>
static FaceIterator vcg::tri::Allocator< MeshType >::AddFaces ( MeshType &  m,
size_t  n 
)
inlinestatic

Function to add n faces to the mesh. First wrapper, with no parameters.

Definition at line 594 of file allocate.h.

template<class MeshType>
static FaceIterator vcg::tri::Allocator< MeshType >::AddFaces ( MeshType &  m,
size_t  n,
std::vector< FacePointer * > &  local_vec 
)
inlinestatic

Function to add n faces to the mesh. Second Wrapper, with a vector of face pointer to be updated.

Definition at line 603 of file allocate.h.

template<class MeshType>
static FaceIterator vcg::tri::Allocator< MeshType >::AddFaces ( MeshType &  m,
size_t  n,
PointerUpdater< FacePointer > &  pu 
)
inlinestatic

Function to add n faces to the mesh. This is the only full featured function that is able to manage correctly all the official internal pointers of the mesh (like the VF and FF adjacency relations)

Warning
Calling this function can cause the invalidation of any not-managed FacePointer just because we resize the face vector. If you have such pointers you need to update them by mean of the PointerUpdater object.
See Also
PointerUpdater
Parameters
mthe mesh to be modified
nthe number of elements to be added
pua PointerUpdater initialized so that it can be used to update pointers to edges that could have become invalid after this adding.
Return values
theiterator to the first element added.

Definition at line 626 of file allocate.h.

template<class MeshType>
static HEdgeIterator vcg::tri::Allocator< MeshType >::AddHEdges ( MeshType &  m,
size_t  n,
PointerUpdater< HEdgePointer > &  pu 
)
inlinestatic

Function to add n halfedges to the mesh. The second parameter hold a vector of pointers to pointer to elements of the mesh that should be updated after a possible vector realloc.

See Also
PointerUpdater
Parameters
mthe mesh to be modified
nthe number of elements to be added
pua PointerUpdater initialized so that it can be used to update pointers to edges that could have become invalid after this adding.
Return values
theiterator to the first element added.

Definition at line 432 of file allocate.h.

template<class MeshType>
static HEdgeIterator vcg::tri::Allocator< MeshType >::AddHEdges ( MeshType &  m,
size_t  n 
)
inlinestatic

Function to add n vertices to the mesh. First wrapper, with no parameters

Definition at line 494 of file allocate.h.

template<class MeshType>
static HEdgeIterator vcg::tri::Allocator< MeshType >::AddHEdges ( MeshType &  m,
size_t  n,
std::vector< HEdgePointer * > &  local_vec 
)
inlinestatic

Function to add n vertices to the mesh. Second Wrapper, with a vector of vertex pointers to be updated.

Definition at line 503 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static MeshType::template PerVertexAttributeHandle<ATTR_TYPE> vcg::tri::Allocator< MeshType >::AddPerVertexAttribute ( MeshType &  m,
std::string  name 
)
inlinestatic

Add a Per-Vertex Attribute of the given ATTR_TYPE with the given name.

No attribute with that name must exists (even of different type)

Definition at line 1444 of file allocate.h.

template<class MeshType>
static FaceIterator vcg::tri::Allocator< MeshType >::AddQuadFace ( MeshType &  m,
VertexPointer  v0,
VertexPointer  v1,
VertexPointer  v2,
VertexPointer  v3 
)
inlinestatic

Function to add a quad face to the mesh and initializing it with the four given VertexPointers

     Note that this function add a single polygonal face if the mesh has polygonal info or two tris with the corresponding faux bit set in the standard common case of a triangular mesh.

Definition at line 564 of file allocate.h.

template<class MeshType>
static TetraIterator vcg::tri::Allocator< MeshType >::AddTetra ( MeshType &  m,
VertexPointer  v0,
VertexPointer  v1,
VertexPointer  v2,
VertexPointer  v3 
)
inlinestatic

Function to add a face to the mesh and initializing it with the three given VertexPointers

Definition at line 774 of file allocate.h.

template<class MeshType>
static TetraIterator vcg::tri::Allocator< MeshType >::AddTetra ( MeshType &  m,
const size_t  v0,
const size_t  v1,
const size_t  v2,
const size_t  v3 
)
inlinestatic

Function to add a face to the mesh and initializing it with three indexes

Definition at line 799 of file allocate.h.

template<class MeshType>
static TetraIterator vcg::tri::Allocator< MeshType >::AddTetra ( MeshType &  m,
const CoordType &  p0,
const CoordType &  p1,
const CoordType &  p2,
const CoordType &  p3 
)
inlinestatic

Function to add a face to the mesh and initializing it with the three given coords

Definition at line 812 of file allocate.h.

template<class MeshType>
static TetraIterator vcg::tri::Allocator< MeshType >::AddTetras ( MeshType &  m,
size_t  n,
PointerUpdater< TetraPointer > &  pu 
)
inlinestatic

Function to add n tetras to the mesh. This is the only full featured function that is able to manage correctly all the official internal pointers of the mesh (like the VT and TT adjacency relations)

Warning
Calling this function can cause the invalidation of any not-managed TetraPointer just because we resize the face vector. If you have such pointers you need to update them by mean of the PointerUpdater object.
See Also
PointerUpdater
Parameters
mthe mesh to be modified
nthe number of elements to be added
pua PointerUpdater initialized so that it can be used to update pointers to tetras that could have become invalid after this adding.
Return values
theiterator to the first element added.

Definition at line 704 of file allocate.h.

template<class MeshType>
static TetraIterator vcg::tri::Allocator< MeshType >::AddTetras ( MeshType &  m,
size_t  n 
)
inlinestatic

Function to add n faces to the mesh. First wrapper, with no parameters.

Definition at line 859 of file allocate.h.

template<class MeshType>
static TetraIterator vcg::tri::Allocator< MeshType >::AddTetras ( MeshType &  m,
size_t  n,
std::vector< TetraPointer * > &  local_vec 
)
inlinestatic

Function to add n faces to the mesh. Second Wrapper, with a vector of face pointer to be updated.

Definition at line 868 of file allocate.h.

template<class MeshType>
static VertexIterator vcg::tri::Allocator< MeshType >::AddVertex ( MeshType &  m,
const CoordType &  p 
)
inlinestatic

Wrapper to AddVertices() to add a single vertex with given coords.

Definition at line 274 of file allocate.h.

template<class MeshType>
static VertexIterator vcg::tri::Allocator< MeshType >::AddVertex ( MeshType &  m,
const CoordType &  p,
const CoordType &  n 
)
inlinestatic

Wrapper to AddVertices() to add a single vertex with given coords and normal.

Definition at line 283 of file allocate.h.

template<class MeshType>
static VertexIterator vcg::tri::Allocator< MeshType >::AddVertex ( MeshType &  m,
const CoordType &  p,
const Color4b &  c 
)
inlinestatic

Wrapper to AddVertices() to add a single vertex with given coords and color.

Definition at line 293 of file allocate.h.

template<class MeshType>
static VertexIterator vcg::tri::Allocator< MeshType >::AddVertices ( MeshType &  m,
size_t  n,
PointerUpdater< VertexPointer > &  pu 
)
inlinestatic

Add n vertices to the mesh. Function to add n vertices to the mesh. The elements are added always to the end of the vector. No attempt of reusing previously deleted element is done.

See Also
PointerUpdater
Parameters
mthe mesh to be modified
nthe number of elements to be added
pua PointerUpdater initialized so that it can be used to update pointers to vertices that could have become invalid after this adding.
Return values
theiterator to the first element added.

Definition at line 186 of file allocate.h.

template<class MeshType>
static VertexIterator vcg::tri::Allocator< MeshType >::AddVertices ( MeshType &  m,
size_t  n 
)
inlinestatic

Wrapper to AddVertices(); no PointerUpdater.

Definition at line 253 of file allocate.h.

template<class MeshType>
static VertexIterator vcg::tri::Allocator< MeshType >::AddVertices ( MeshType &  m,
size_t  n,
std::vector< VertexPointer * > &  local_vec 
)
inlinestatic

Wrapper to AddVertices() no PointerUpdater but a vector of VertexPointer pointers to be updated.

Definition at line 261 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactEdgeVector ( MeshType &  m,
PointerUpdater< EdgePointer > &  pu 
)
inlinestatic

Compact vector of edges removing deleted elements.

Deleted elements are put to the end of the vector and the vector is resized. Order between elements is preserved but not their position (hence the PointerUpdater) After calling this function the IsD() test in the scanning a vector, is no more necessary.

Warning
It should not be called when TemporaryData is active (but works correctly if attributes are present)

Definition at line 1083 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactEdgeVector ( MeshType &  m)
inlinestatic

Wrapper without the PointerUpdater.

Definition at line 1179 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactFaceVector ( MeshType &  m,
PointerUpdater< FacePointer > &  pu 
)
inlinestatic

Compact face vector by removing deleted elements.

Deleted elements are put to the end of the vector and the vector is resized. Order between elements is preserved, but not their position (hence the PointerUpdater) Immediately after calling this function the IsD() test during the scanning a vector, is no more necessary.

Warning
It should not be called when some TemporaryData is active (but works correctly if attributes are present)

Definition at line 1192 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactFaceVector ( MeshType &  m)
inlinestatic

Wrapper without the PointerUpdater.

Definition at line 1298 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactTetraVector ( MeshType &  m,
PointerUpdater< TetraPointer > &  pu 
)
inlinestatic

Compact tetra vector by removing deleted elements.

Deleted elements are put to the end of the vector and the vector is resized. Order between elements is preserved, but not their position (hence the PointerUpdater) Immediately after calling this function the IsD() test during the scanning a vector, is no more necessary.

Warning
It should not be called when some TemporaryData is active (but works correctly if attributes are present)

Definition at line 1311 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactTetraVector ( MeshType &  m)
inlinestatic

Wrapper without the PointerUpdater.

Definition at line 1417 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactVertexVector ( MeshType &  m,
PointerUpdater< VertexPointer > &  pu 
)
inlinestatic

Compact vector of vertices removing deleted elements. Deleted elements are put to the end of the vector and the vector is resized. Order between elements is preserved but not their position (hence the PointerUpdater) After calling this function the IsD() test in the scanning a vector, is no more necessary.

Warning
It should not be called when TemporaryData is active (but works correctly if attributes are present)

Definition at line 1045 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::CompactVertexVector ( MeshType &  m)
inlinestatic

Wrapper without the PointerUpdater.

Definition at line 1070 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::DeleteEdge ( MeshType &  m,
EdgeType &  e 
)
inlinestatic

Function to delete an edge from the mesh. NOTE: THIS FUNCTION ALSO UPDATE en

Definition at line 907 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::DeleteFace ( MeshType &  m,
FaceType &  f 
)
inlinestatic

Function to delete a face from the mesh. NOTE: THIS FUNCTION ALSO UPDATE FN

Definition at line 884 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::DeleteHEdge ( MeshType &  m,
HEdgeType &  h 
)
inlinestatic

Function to delete a hedge from the mesh. NOTE: THIS FUNCTION ALSO UPDATE en

Definition at line 918 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static void vcg::tri::Allocator< MeshType >::DeletePerEdgeAttribute ( MeshType &  m,
typename MeshType::template PerEdgeAttributeHandle< ATTR_TYPE > &  h 
)
inlinestatic

If the per-edge attribute exists, delete it.

Definition at line 1674 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static void vcg::tri::Allocator< MeshType >::DeletePerFaceAttribute ( MeshType &  m,
typename MeshType::template PerFaceAttributeHandle< ATTR_TYPE > &  h 
)
inlinestatic

If the per-face attribute exists, delete it.

Definition at line 1794 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static void vcg::tri::Allocator< MeshType >::DeletePerMeshAttribute ( MeshType &  m,
typename MeshType::template PerMeshAttributeHandle< ATTR_TYPE > &  h 
)
inlinestatic

If the per-mesh attribute exists, delete it.

Definition at line 2032 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static void vcg::tri::Allocator< MeshType >::DeletePerTetraAttribute ( MeshType &  m,
typename MeshType::template PerTetraAttributeHandle< ATTR_TYPE > &  h 
)
inlinestatic

If the per-face attribute exists, delete it.

Definition at line 1918 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static void vcg::tri::Allocator< MeshType >::DeletePerVertexAttribute ( MeshType &  m,
typename MeshType::template PerVertexAttributeHandle< ATTR_TYPE > &  h 
)
inlinestatic

If the per-vertex attribute exists, delete it.

Definition at line 1548 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::DeleteTetra ( MeshType &  m,
TetraType &  t 
)
inlinestatic

Function to delete a tetra from the mesh. NOTE: THIS FUNCTION ALSO UPDATE tn

Definition at line 929 of file allocate.h.

template<class MeshType>
static void vcg::tri::Allocator< MeshType >::DeleteVertex ( MeshType &  m,
VertexType &  v 
)
inlinestatic

Function to delete a vertex from the mesh. NOTE: THIS FUNCTION ALSO UPDATE vn

Definition at line 896 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static MeshType::template PerVertexAttributeHandle<ATTR_TYPE> vcg::tri::Allocator< MeshType >::FindPerVertexAttribute ( MeshType &  m,
const std::string &  name 
)
inlinestatic

Try to retrieve an handle to an attribute with a given name and ATTR_TYPE.

Returns
a invalid handle if no attribute with that name and type exists.

Definition at line 1491 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static void vcg::tri::Allocator< MeshType >::GetAllPerVertexAttribute ( MeshType &  m,
std::vector< std::string > &  all 
)
inlinestatic

query the mesh for all the attributes per vertex

Returns
the name of all attributes with a non-empy name.

Definition at line 1517 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static MeshType::template PerEdgeAttributeHandle<ATTR_TYPE> vcg::tri::Allocator< MeshType >::GetPerEdgeAttribute ( MeshType &  m,
std::string  name = std::string("") 
)
inlinestatic

gives a handle to a per-edge attribute with a given name and ATTR_TYPE

Returns
a valid handle. If the name is not empty and an attribute with that name and type exists returns a handle to it. Otherwise return a hanlde to a newly created.

Definition at line 1619 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static MeshType::template PerFaceAttributeHandle<ATTR_TYPE> vcg::tri::Allocator< MeshType >::GetPerFaceAttribute ( MeshType &  m,
std::string  name = std::string("") 
)
inlinestatic

gives a handle to a per-edge attribute with a given name and ATTR_TYPE

Returns
a valid handle. If the name is not empty and an attribute with that name and type exists returns a handle to it. Otherwise return a hanlde to a newly created.

Definition at line 1743 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static MeshType::template PerMeshAttributeHandle<ATTR_TYPE> vcg::tri::Allocator< MeshType >::GetPerMeshAttribute ( MeshType &  m,
std::string  name = std::string("") 
)
inlinestatic

gives a handle to a per-edge attribute with a given name and ATTR_TYPE

Returns
a valid handle. If the name is not empty and an attribute with that name and type exists returns a handle to it. Otherwise return a hanlde to a newly created.

Definition at line 1985 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static MeshType::template PerTetraAttributeHandle<ATTR_TYPE> vcg::tri::Allocator< MeshType >::GetPerTetraAttribute ( MeshType &  m,
std::string  name = std::string("") 
)
inlinestatic

gives a handle to a per-tetra attribute with a given name and ATTR_TYPE

Returns
a valid handle. If the name is not empty and an attribute with that name and type exists returns a handle to it. Otherwise return a hanlde to a newly created.

Definition at line 1862 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static MeshType::template PerVertexAttributeHandle<ATTR_TYPE> vcg::tri::Allocator< MeshType >::GetPerVertexAttribute ( MeshType &  m,
std::string  name = std::string("") 
)
inlinestatic

gives a handle to a per-vertex attribute with a given name and ATTR_TYPE

Returns
a valid handle. If the name is not empty and an attribute with that name and type exists returns a handle to it. Otherwise return a hanlde to a newly created.

Definition at line 1476 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static bool vcg::tri::Allocator< MeshType >::IsValidHandle ( MeshType &  m,
const typename MeshType::template PerVertexAttributeHandle< ATTR_TYPE > &  a 
)
inlinestatic

Check if an handle to a Per-Vertex Attribute is valid.

Definition at line 1430 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static bool vcg::tri::Allocator< MeshType >::IsValidHandle ( MeshType &  m,
const typename MeshType::template PerEdgeAttributeHandle< ATTR_TYPE > &  a 
)
inlinestatic

Per Edge Attributes.

Definition at line 1576 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static bool vcg::tri::Allocator< MeshType >::IsValidHandle ( MeshType &  m,
const typename MeshType::template PerFaceAttributeHandle< ATTR_TYPE > &  a 
)
inlinestatic

Per Face Attributes.

Definition at line 1700 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static bool vcg::tri::Allocator< MeshType >::IsValidHandle ( MeshType &  m,
const typename MeshType::template PerTetraAttributeHandle< ATTR_TYPE > &  a 
)
inlinestatic

Per Tetra Attributes.

Definition at line 1819 of file allocate.h.

template<class MeshType>
template<class ATTR_TYPE >
static bool vcg::tri::Allocator< MeshType >::IsValidHandle ( MeshType &  m,
const typename MeshType::template PerMeshAttributeHandle< ATTR_TYPE > &  a 
)
inlinestatic

Per Mesh Attributes.

Definition at line 1950 of file allocate.h.


The documentation for this class was generated from the following file: