Classes |
struct | Remap |
Public Types |
typedef MeshLeft::CoordType | CoordLeft |
typedef ConstMeshRight::CoordType | CoordRight |
typedef MeshLeft::EdgeIterator | EdgeIteratorLeft |
typedef
ConstMeshRight::EdgeIterator | EdgeIteratorRight |
typedef MeshLeft::EdgeType | EdgeLeft |
typedef ConstMeshRight::EdgeType | EdgeRight |
typedef MeshLeft::FaceIterator | FaceIteratorLeft |
typedef
ConstMeshRight::FaceIterator | FaceIteratorRight |
typedef MeshLeft::FaceType | FaceLeft |
typedef ConstMeshRight::FacePointer | FacePointerRight |
typedef ConstMeshRight::FaceType | FaceRight |
typedef MeshLeft::HEdgeIterator | HEdgeIteratorLeft |
typedef
ConstMeshRight::HEdgeIterator | HEdgeIteratorRight |
typedef MeshLeft::HEdgeType | HEdgeLeft |
typedef ConstMeshRight::HEdgeType | HEdgeRight |
typedef MeshLeft::ScalarType | ScalarLeft |
typedef ConstMeshRight::ScalarType | ScalarRight |
typedef MeshLeft::VertexIterator | VertexIteratorLeft |
typedef
ConstMeshRight::VertexIterator | VertexIteratorRight |
typedef MeshLeft::VertexType | VertexLeft |
typedef MeshLeft::VertexPointer | VertexPointerLeft |
typedef
ConstMeshRight::VertexPointer | VertexPointerRight |
typedef ConstMeshRight::VertexType | VertexRight |
Static Public Member Functions |
static void | ImportEdgeAdj (MeshLeft &ml, ConstMeshRight &mr, EdgeLeft &el, const EdgeRight &er, Remap &remap) |
static void | ImportFaceAdj (MeshLeft &ml, ConstMeshRight &mr, FaceLeft &fl, const FaceRight &fr, Remap &remap) |
static void | ImportHEdgeAdj (MeshLeft &ml, ConstMeshRight &mr, HEdgeLeft &hl, const HEdgeRight &hr, Remap &remap, bool) |
static void | ImportVertexAdj (MeshLeft &ml, ConstMeshRight &mr, VertexLeft &vl, VertexRight &vr, Remap &remap) |
static void | Mesh (MeshLeft &ml, ConstMeshRight &mr, const bool selected=false, const bool adjFlag=false) |
| Append the second mesh to the first one.
|
static void | MeshCopy (MeshLeft &ml, ConstMeshRight &mr, bool selected=false, const bool adjFlag=false) |
| Copy the second mesh over the first one. The first mesh is destroyed. If requested only the selected elements are copied.
|
static void | Selected (MeshLeft &ml, ConstMeshRight &mr) |
| Append only the selected elements of second mesh to the first one.
|
template<class MeshLeft, class ConstMeshRight>
class vcg::tri::Append< MeshLeft, ConstMeshRight >
Class to safely duplicate and append (portion of) meshes.
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 of a mesh to another one.
- See also:
- allocation
Definition at line 40 of file append.h.
template<class MeshLeft , class ConstMeshRight >
static void vcg::tri::Append< MeshLeft, ConstMeshRight >::Mesh |
( |
MeshLeft & |
ml, |
|
|
ConstMeshRight & |
mr, |
|
|
const bool |
selected = false , |
|
|
const bool |
adjFlag = false |
|
) |
| [inline, static] |
Append the second mesh to the first one.
The first mesh is not destroyed and no attempt of avoid duplication of already present elements is done. If requested only the selected elements are appended to the first one. The second mesh is not changed at all (it could be constant) with the exception of the selection (see below note).
- Note:
- If the the selection of the vertexes is not consistent with the face selection the append could build faces referencing non existent vertices so it is mandatory that the selection of the vertices reflects the loose selection from edges and faces (e.g. if a face is selected then all its vertices must be selected).
-
Attributes. This function will copy only those attributes that are present in both meshes. Two attributes in different meshes are considered the same iff they have the same name and the same type. This may be deceiving because they could in fact have different semantic, but this is up to the developer. If the left mesh has attributes that are not in the right mesh, their values for the elements of the right mesh will be uninitialized
Definition at line 203 of file append.h.