diff --git a/vcg/complex/algorithms/stat.h b/vcg/complex/algorithms/stat.h index c9b0e7cb..14a6d8fd 100644 --- a/vcg/complex/algorithms/stat.h +++ b/vcg/complex/algorithms/stat.h @@ -250,7 +250,7 @@ public: return V; } - static ScalarType ComputeMeshVolume(const MeshType & m) + static ScalarType ComputeMeshVolume(MeshType & m) { Inertia I(m); return I.Mass(); diff --git a/vcg/complex/allocate.h b/vcg/complex/allocate.h index ee96b2c9..72b9255e 100644 --- a/vcg/complex/allocate.h +++ b/vcg/complex/allocate.h @@ -2049,7 +2049,7 @@ public: } template - static typename MeshType::template ConstPerTetraAttributeHandle FindPerTetraAttribute(MeshType &m, const std::string &name) + static typename MeshType::template ConstPerTetraAttributeHandle FindPerTetraAttribute(const MeshType &m, const std::string &name) { if(!name.empty()){ PointerToAttribute h1; diff --git a/vcg/simplex/tetrahedron/component.h b/vcg/simplex/tetrahedron/component.h index cb1a6e87..9ba9d0ed 100644 --- a/vcg/simplex/tetrahedron/component.h +++ b/vcg/simplex/tetrahedron/component.h @@ -48,7 +48,7 @@ template class EmptyCore : public T { public: //Empty vertexref inline typename T::VertexType * & V( const int ) { assert(0); static typename T::VertexType *vp=0; return vp; } - inline typename T::VertexType * const & V( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; } + inline const typename T::VertexType * V( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; } inline const typename T::VertexType * cV( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; } inline typename T::CoordType & P( const int ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } inline const typename T::CoordType & P( const int ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } @@ -181,7 +181,8 @@ public: typedef typename T::VertexType::ScalarType ScalarType; inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<4); return v[j]; } - inline const typename T::VertexType * cV( const int j ) { assert(j>=0 && j<4); return v[j]; } + inline const typename T::VertexType * V( const int j ) const { assert(j>=0 && j<4); return v[j]; } + inline const typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<4); return v[j]; } inline size_t cFtoVi (const int f, const int j) const { assert(f >= 0 && f < 4); assert(j >= 0 && j < 3); return findices[f][j]; } @@ -457,7 +458,8 @@ public: typename T::TetraPointer const cVTp( const int j ) const { assert( j >= 0 && j < 4 ); return _vtp[j]; } char & VTi( const int j ) { return _vti[j]; } - const char & cVTi( const int j ) const { return _vti[j]; } + char VTi( const int j ) const { return _vti[j]; } + char cVTi( const int j ) const { return _vti[j]; } static bool HasVTAdjacency() { return true; } static bool HasVTAdjacencyOcc() { return false; } diff --git a/vcg/simplex/vertex/component.h b/vcg/simplex/vertex/component.h index 37f27f93..251e3786 100644 --- a/vcg/simplex/vertex/component.h +++ b/vcg/simplex/vertex/component.h @@ -572,6 +572,7 @@ public: typename T::TetraPointer &VTp() { return _tp; } typename T::TetraPointer cVTp() const { return _tp; } int &VTi() {return _zp; } + int VTi() const { return _zp; } int cVTi() const { return _zp; } static bool HasVTAdjacency() { return true; } static void Name( std::vector< std::string > & name ) { name.push_back( std::string("VTAdj") ); T::Name(name); }