From 446400f6fcef5846ab9062e72e6b2cabb132df66 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 19 Feb 2010 00:21:26 +0000 Subject: [PATCH] Now the compactvertex and compactface funtions use the importlocal chain so we are sure that all the meaningful data is correctly copied (otherwise ocf stuff will not be copied) On the other hand when using ImportLocal we do not copy pointer based stuff like adjacency and *vertex pointers* that must be terefore copied by hand... --- vcg/complex/trimesh/allocate.h | 11 ++++++++--- vcg/simplex/face/component.h | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/vcg/complex/trimesh/allocate.h b/vcg/complex/trimesh/allocate.h index 90871a69..fcd9abc1 100644 --- a/vcg/complex/trimesh/allocate.h +++ b/vcg/complex/trimesh/allocate.h @@ -193,7 +193,7 @@ namespace vcg { // this one is called by the Compact and overridden by more specialized functions for OCF classes. // that manage also the additional types template - void ReorderFace( std::vector &newVertIndex, std::vector &vert) + void ReorderFace( std::vector & /*newVertIndex*/, std::vector & /*vert*/) {} template void ReorderVert( std::vector &newVertIndex, std::vector &vert) @@ -582,7 +582,7 @@ namespace vcg { for(unsigned int i=0;i=0 && j<3); return v[j]; } inline const typename T::VertexType * const & UberV( const int j ) const { assert(j>=0 && j<3); return v[j]; } + // Small comment about the fact that the pointers are zero filled. + // The importLocal is meant for copyng stuff between very different meshes, so copying the pointers would be meaningless. + // if you are using ImportLocal for copying internally simplex you have to set up all the pointers by hand. template void ImportLocal(const RightF & rightF){ V(0) = NULL; V(1) = NULL; V(2) = NULL; T::ImportLocal(rightF);} inline void Alloc(const int & ns){T::Alloc(ns);}