From a40dad5c08e723c9594af34f1b10f8815a4e5c88 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Fri, 4 May 2007 16:16:40 +0000 Subject: [PATCH] standardized to component style --- vcg/simplex/faceplus/component_rt.h | 41 +++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/vcg/simplex/faceplus/component_rt.h b/vcg/simplex/faceplus/component_rt.h index fb1a449f..c0511821 100644 --- a/vcg/simplex/faceplus/component_rt.h +++ b/vcg/simplex/faceplus/component_rt.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.1 2006/10/13 14:11:49 cignoni +first version + ****************************************************************************/ #ifndef __VCG_FACE_PLUS_COMPONENT_RT @@ -34,12 +37,40 @@ $Log: not supported by cvs2svn $ namespace vcg { namespace face { -template class RTInfo: public T { -public: - typename T::VertexType::CoordType edge[3]; - Plane3 plane; +template +struct EdgePlaneInfo{ + typename CoordType edge[3]; + ::vcg::Plane3 plane; + typename CoordType::ScalarType edgescale; }; - } // end namespace vert +template class EdgePlane: public T { +public: + typedef EdgePlaneInfo EdgePlaneType; + + typename T::VertexType::CoordType &Edge(const int j) { + return _ep.edge[j]; + } + typename T::VertexType::CoordType cEdge(const int j)const { + return _ep.edge[j]; + } + + typename vcg::Plane3 &Plane() { + return _ep.plane; + } + typename vcg::Plane3 cPlane()const { + return _ep.plane; + } + + static bool HasEdgePlane() { return true; } + + static void Name(std::vector & name){name.push_back(std::string("EdgePlane"));T::Name(name);} + +private: + +EdgePlaneType _ep; +}; + + } // end namespace face }// end namespace vcg #endif