From 27a4ad3049bfdcb51a25b5b5a49d1149081f3109 Mon Sep 17 00:00:00 2001 From: Luigi Malomo Date: Wed, 23 Dec 2020 16:48:54 +0100 Subject: [PATCH] added VEStarVE overload returning also vertex indices --- vcg/simplex/edge/topology.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vcg/simplex/edge/topology.h b/vcg/simplex/edge/topology.h index 20688d78..6156a96d 100644 --- a/vcg/simplex/edge/topology.h +++ b/vcg/simplex/edge/topology.h @@ -75,6 +75,24 @@ void VEStarVE(const typename EdgeType::VertexType* vp, std::vector & } } +template +void VEStarVE(const typename EdgeType::VertexType * vp, + std::vector &starVec, + std::vector & indices) +{ + starVec.clear(); + indices.clear(); + starVec.reserve(16); + indices.reserve(16); + edge::VEIterator vei(vp); + while(!vei.End()) + { + starVec.push_back(vei.E()); + indices.push_back(vei.I()); + ++vei; + } +} + /// Completely detach an edge from the VE adjacency. Useful before deleting it template void VEDetach(EdgeType & e)