From a82ac9639f3383ea9d6e73c725a056e6cc90fc2f Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Tue, 10 Apr 2012 15:46:20 +0000 Subject: [PATCH] added constant accessors without the infamous "c" prefix for color (C()) and texcoord (T()). --- vcg/simplex/vertex/component_ocf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vcg/simplex/vertex/component_ocf.h b/vcg/simplex/vertex/component_ocf.h index 3fb14ae4..5ae5b0b8 100644 --- a/vcg/simplex/vertex/component_ocf.h +++ b/vcg/simplex/vertex/component_ocf.h @@ -402,6 +402,7 @@ template class ColorOcf: public T { public: typedef A ColorType; ColorType &C() { assert((*this).Base().ColorEnabled); return (*this).Base().CV[(*this).Index()]; } + const ColorType &C() const { return this->cC(); } const ColorType &cC() const { assert((*this).Base().ColorEnabled); return (*this).Base().CV[(*this).Index()]; } template void ImportData(const LeftV & leftV) @@ -445,6 +446,7 @@ template class TexCoordOcf: public TT { public: typedef A TexCoordType; TexCoordType &T() { assert((*this).Base().TexCoordEnabled); return (*this).Base().TV[(*this).Index()]; } + const TexCoordType &T() const { return this->cT(); } const TexCoordType &cT() const { assert((*this).Base().TexCoordEnabled); return (*this).Base().TV[(*this).Index()]; } template < class LeftV> void ImportData(const LeftV & leftV)