diff --git a/vcg/simplex/face/component_ep.h b/vcg/simplex/face/component_ep.h index 39f68788..02e2cf40 100644 --- a/vcg/simplex/face/component_ep.h +++ b/vcg/simplex/face/component_ep.h @@ -74,6 +74,25 @@ private: EdgePlaneType _ep; }; + +// This empty class is rarely useful but you need it if you have code +// where you eventually decide (not at compile time) what closest algorithm you need. +// (for example in unit testing...) + +template class EmptyEdgePlane: public T { +public: +typedef EdgePlaneInfo EdgePlaneType; + +typename T::VertexType::CoordType &Edge(const int ) { assert(0); static typename T::VertexType::CoordType dum; return dum;} +typename T::VertexType::CoordType &cEdge(const int ) const { assert(0); static typename T::VertexType::CoordType dum; return dum;} + +typename vcg::Plane3 &Plane() {assert(0); static typename vcg::Plane3 dum; return dum;} +typename vcg::Plane3 &cPlane() const {assert(0); static typename vcg::Plane3 dum; return dum;} +static bool HasEdgePlane() { return false; } + +static void Name(std::vector & name){name.push_back(std::string(""));T::Name(name);} +}; + } // end namespace face }// end namespace vcg #endif