From b586da1c64161de179db63a80ca3605a4d09354e Mon Sep 17 00:00:00 2001 From: ganovelli Date: Tue, 18 Oct 2005 14:27:22 +0000 Subject: [PATCH] EdgePLaneType added (_RT) --- vcg/simplex/faceplus/component_occ.h | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/vcg/simplex/faceplus/component_occ.h b/vcg/simplex/faceplus/component_occ.h index 46fe7b3e..7cec4750 100644 --- a/vcg/simplex/faceplus/component_occ.h +++ b/vcg/simplex/faceplus/component_occ.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.1 2005/10/15 16:23:39 ganovelli +Working release (compilata solo su MSVC), component_occ è migrato da component_opt + ****************************************************************************/ @@ -38,6 +41,7 @@ compare with OCF(Optional Component Fast) #include #include +#include namespace vcg { @@ -129,6 +133,37 @@ public: template class FFAdjOcc : public FFAdjOccBase,T>{}; +/*----------------------------- EdgePlane -----------------------------------*/ + +// questo tipo serve per tenere tutte le informazioni sull'adiacenza dentro una +// singola classe +template +struct EdgePlaneSup { + vcg::Point3 edge[3]; + vcg::Plane3 plane[3]; + }; + +template class EdgePlaneOcc: public T { +public: + + typedef A EdgePlaneType; + + Point3 &Edge(const int j) { + return (CAT< vector_occ,EdgePlaneSup >::Instance()->Get((FaceType*)this)).edge[j];} + + Point3 const Edge(const int j) const { + return (CAT< vector_occ,EdgePlaneSup >::Instance()->Get((FaceType*)this)).edge[j];} + + vcg::Plane3 Plane(){ + return (CAT< vector_occ,EdgePlaneSup >::Instance()->Get((FaceType*)this)).plane;} + + static bool HasEdgePlane() { return true; } + static bool HasEdgePlaneOcc() { return true; } + +}; + +template class EdgePlane : public EdgePlaneOcc,T>{}; + template class VertexRefOcc: public T { public: // typedef typename T::VertexType VertexType;