diff --git a/vcg/complex/base.h b/vcg/complex/base.h index 49f2ff88..814a9c60 100644 --- a/vcg/complex/base.h +++ b/vcg/complex/base.h @@ -264,6 +264,7 @@ class TriMesh PerVertexAttributeHandle( void *ah,const int & n):AttributeHandle(ah,n){} }; + template class PerFaceAttributeHandle: public AttributeHandle{ public: @@ -294,6 +295,17 @@ class TriMesh ATTR_TYPE & operator ()(){ return *((Attribute *)_handle)->attribute;} }; + // Some common Handle typedefs to simplify use + typedef typename MeshType::template PerVertexAttributeHandle PerVertexScalarHandle; + typedef typename MeshType::template PerVertexAttributeHandle PerVertexIntHandle; + typedef typename MeshType::template PerVertexAttributeHandle PerVertexBoolHandle; + typedef typename MeshType::template PerVertexAttributeHandle PerVertexCoordHandle; + + typedef typename MeshType::template PerFaceAttributeHandle PerFaceScalarHandle; + typedef typename MeshType::template PerFaceAttributeHandle PerFaceIntHandle; + typedef typename MeshType::template PerFaceAttributeHandle PerFaceBoolHandle; + typedef typename MeshType::template PerFaceAttributeHandle PerFaceCoordHandle; + // the camera member (that should keep the intrinsics) is no more needed since 2006, when intrisncs moved into the Shot structure //Camera camera; // intrinsic diff --git a/vcg/complex/used_types.h b/vcg/complex/used_types.h index a346636c..0109a2a5 100755 --- a/vcg/complex/used_types.h +++ b/vcg/complex/used_types.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include