From b8fc43e7c666ac3a53489289242a97bae22c2277 Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 18 Mar 2009 15:53:52 +0000 Subject: [PATCH] Added non optional per vertex radius component --- vcg/simplex/vertex/component.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vcg/simplex/vertex/component.h b/vcg/simplex/vertex/component.h index fb619c25..4adb13f6 100644 --- a/vcg/simplex/vertex/component.h +++ b/vcg/simplex/vertex/component.h @@ -510,7 +510,25 @@ public: static bool HasRadiusOcf() { return false; } static void Name(std::vector & name){ T::Name(name);} }; +/*-------------------------- Radius ----------------------------------*/ +template class Radius: public TT { +public: + typedef A RadiusType; + RadiusType &R() { return _radius; } + const RadiusType & cR() const {return _radius; } + template < class LeftV> + void ImportLocal(const LeftV & left ) { R() = left.cR(); TT::ImportLocal( left); } + static bool HasRadius() { return true; } + static void Name(std::vector & name){name.push_back(std::string("Radius"));TT::Name(name);} + +private: + RadiusType _radius; +}; + +template class Radiusf: public Radius { +public: static void Name(std::vector & name){name.push_back(std::string("Radiusf"));TT::Name(name);} +}; /*----------------------------- VEADJ ------------------------------*/