From 949637c795d37a94addf7f53fce65d7b752d78e7 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Tue, 28 Oct 2008 11:00:30 +0000 Subject: [PATCH] added private copy constructor and assignment operator to prevent people from doing those things added empty constructors to attribute handles --- vcg/complex/trimesh/base.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vcg/complex/trimesh/base.h b/vcg/complex/trimesh/base.h index 4a70ca02..8ffbfc4a 100644 --- a/vcg/complex/trimesh/base.h +++ b/vcg/complex/trimesh/base.h @@ -207,6 +207,7 @@ class TriMesh{ template class PerVertexAttributeHandle{ public: + PerVertexAttributeHandle(){} PerVertexAttributeHandle( void *ah):_handle ( (SimpleTempData *)ah ){} SimpleTempData * _handle; template @@ -216,6 +217,7 @@ class TriMesh{ template class PerFaceAttributeHandle{ public: + PerFaceAttributeHandle(){} PerFaceAttributeHandle(void *ah):_handle ( (SimpleTempData *)ah ){} SimpleTempData * _handle; template @@ -225,6 +227,7 @@ class TriMesh{ template class PerMeshAttributeHandle{ public: + PerMeshAttributeHandle(){} PerMeshAttributeHandle(void *ah):_handle ( (Attribute *)ah ){} Attribute * _handle; ATTR_TYPE & operator ()(){ return *((Attribute *)_handle)->attribute;} @@ -412,12 +415,22 @@ ScalarType Volume() return V/6.0; } +private: + // TriMesh cannot be copied. Use Append (see vcg/complex/trimesh/append.h) + TriMesh operator =(const TriMesh & m){} + TriMesh(const TriMesh & ){} }; // end class Mesh template < class VertContainerType, class FaceContainerType > bool HasPerVertexQuality (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return VertContainerType::value_type::HasQuality();} +template < class VertContainerType, class FaceContainerType > +bool HasPerVertexCurvature (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return VertContainerType::value_type::HasCurvature();} + +template < class VertContainerType, class FaceContainerType > +bool HasPerVertexCurvatureDir (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return VertContainerType::value_type::HasCurvatureDir();} + template < class VertContainerType, class FaceContainerType > bool HasPerVertexColor (const TriMesh < VertContainerType , FaceContainerType> & /*m*/) {return VertContainerType::value_type::HasColor();}