From 60bca978f7c23e22fa55850888095dd7263d742f Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Tue, 19 Feb 2013 13:55:15 +0000 Subject: [PATCH] added function VVExtendedStarVF --- vcg/simplex/face/topology.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/vcg/simplex/face/topology.h b/vcg/simplex/face/topology.h index b639add1..e705f2c2 100644 --- a/vcg/simplex/face/topology.h +++ b/vcg/simplex/face/topology.h @@ -614,6 +614,41 @@ void VVStarVF( typename FaceType::VertexType* vp, std::vector +void VVExtendedStarVF(typename FaceType::VertexType* vp, + const int num_step, + std::vector &vertVec) + { + typedef typename FaceType::VertexType VertexType; + ///initialize front + vertVec.clear(); + vcg::face::VVStarVF(vp,vertVec); + ///then dilate front + ///for each step + for (int step=0;step toAdd; + for (unsigned int i=0;i Vtemp; + vcg::face::VVStarVF(vp,Vtemp); + toAdd.insert(toAdd.end(),Vtemp.begin(),Vtemp.end()); + } + vertVec.insert(vertVec.end(),toAdd.begin(),toAdd.end()); + std::sort(vertVec.begin(),vertVec.end()); + typename std::vector::iterator new_end=std::unique(vertVec.begin(),vertVec.end()); + int dist=distance(vertVec.begin(),new_end); + vertVec.resize(dist); + } + } /*! * \brief Compute the set of faces adjacent to a given vertex using VF adjacency.